Skip to content

Commit 2c6624e

Browse files
authored
Merge pull request #233 from dbt-labs/release-0.2.19
Release 0.2.19
2 parents dcb68b1 + 92b9852 commit 2c6624e

10 files changed

+45
-8
lines changed

CHANGELOG.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,18 @@
22

33
All notable changes to this project will be documented in this file.
44

5-
## [Unreleased](https://github.com/dbt-labs/terraform-provider-dbtcloud/compare/v0.2.18...HEAD)
5+
## [Unreleased](https://github.com/dbt-labs/terraform-provider-dbtcloud/compare/v0.2.19...HEAD)
6+
7+
8+
## [0.2.18](https://github.com/dbt-labs/terraform-provider-dbtcloud/compare/v0.2.18...v0.2.19)
9+
10+
## Changes
11+
12+
- Update permissions allowed for groups and token to include `job_runner`
13+
14+
## Documentations
15+
16+
- Add guide on `dbtcloud-terraforming` to import existing resources
617

718
## [0.2.18](https://github.com/dbt-labs/terraform-provider-dbtcloud/compare/v0.2.17...v0.2.18)
819

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ The provider documentation is directly available [on the Terraform Registry](htt
5353
- Under [Guides](https://registry.terraform.io/providers/dbt-labs/dbtcloud/latest/docs/guides/1_getting_started), you will find a simple example of how to use the provider
5454
- Each resource ([example for jobs](https://registry.terraform.io/providers/dbt-labs/dbtcloud/latest/docs/resources/job)) has some usage examples and contains the list of parameters available
5555

56+
## Importing existing dbt Cloud configuration
57+
58+
The CLI [dbtcloud-terraforming](https://github.com/dbt-labs/dbtcloud-terraforming) can be used to generate the Terraform configuration and import statements based on your existing dbt Cloud configuration.
59+
5660
## Running Acceptance Tests
5761

5862
Currently, acceptance tests, run via `make test-acceptance` must be done on your
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
page_title: "3. Importing existing configuration"
3+
subcategory: ""
4+
---
5+
6+
# 3. Importing existing configuration"
7+
8+
The [CLI dbtcloud-terraforming](https://github.com/dbt-labs/dbtcloud-terraforming) can be used to generate the Terraform configuration files as well as import statements for existing dbt Cloud configuration.
9+
10+
This tool can then be used to either start managing the dbt Cloud configuration in Terraform or to replicate objects (jobs for example) between different projects or environments.

docs/resources/databricks_credential.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ description: |-
2020
# when using the Databricks adapter
2121
resource "dbtcloud_databricks_credential" "my_databricks_cred" {
2222
project_id = dbtcloud_project.dbt_project.id
23-
adapter_id = 123
23+
adapter_id = dbtcloud_connection.my_databricks_connection.adapter_id
2424
target_name = "prod"
2525
token = "abcdefgh"
2626
schema = "my_schema"
@@ -30,7 +30,7 @@ resource "dbtcloud_databricks_credential" "my_databricks_cred" {
3030
# when using the Spark adapter
3131
resource "dbtcloud_databricks_credential" "my_spark_cred" {
3232
project_id = dbtcloud_project.dbt_project.id
33-
adapter_id = 456
33+
adapter_id = dbtcloud_connection.my_databricks_connection.adapter_id
3434
target_name = "prod"
3535
token = "abcdefgh"
3636
schema = "my_schema"

examples/resources/dbtcloud_databricks_credential/resource.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# when using the Databricks adapter
66
resource "dbtcloud_databricks_credential" "my_databricks_cred" {
77
project_id = dbtcloud_project.dbt_project.id
8-
adapter_id = 123
8+
adapter_id = dbtcloud_connection.my_databricks_connection.adapter_id
99
target_name = "prod"
1010
token = "abcdefgh"
1111
schema = "my_schema"
@@ -15,7 +15,7 @@ resource "dbtcloud_databricks_credential" "my_databricks_cred" {
1515
# when using the Spark adapter
1616
resource "dbtcloud_databricks_credential" "my_spark_cred" {
1717
project_id = dbtcloud_project.dbt_project.id
18-
adapter_id = 456
18+
adapter_id = dbtcloud_connection.my_databricks_connection.adapter_id
1919
target_name = "prod"
2020
token = "abcdefgh"
2121
schema = "my_schema"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
page_title: "3. Importing existing configuration"
3+
subcategory: ""
4+
---
5+
6+
# 3. Importing existing configuration"
7+
8+
The [CLI dbtcloud-terraforming](https://github.com/dbt-labs/dbtcloud-terraforming) can be used to generate the Terraform configuration files as well as import statements for existing dbt Cloud configuration.
9+
10+
This tool can then be used to either start managing the dbt Cloud configuration in Terraform or to replicate objects (jobs for example) between different projects or environments.

pkg/resources/fabric_connection_acceptance_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func TestAccDbtCloudFabricConnectionResource(t *testing.T) {
1818
connectionName2 := strings.ToUpper(acctest.RandStringFromCharSet(10, acctest.CharSetAlpha))
1919
projectName := strings.ToUpper(acctest.RandStringFromCharSet(10, acctest.CharSetAlpha))
2020
database := strings.ToUpper(acctest.RandStringFromCharSet(10, acctest.CharSetAlpha))
21-
server := strings.ToUpper(acctest.RandStringFromCharSet(10, acctest.CharSetAlpha))
21+
server := "example.com"
2222
port := 1337
2323

2424
resource.Test(t, resource.TestCase{

pkg/resources/fabric_credential_acceptance_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ resource "dbtcloud_fabric_connection" "fabric" {
9999
project_id = dbtcloud_project.test_project.id
100100
name = "Fabric"
101101
database = "testdb"
102-
server = "testserver"
102+
server = "example.com"
103103
port = 1234
104104
}
105105
@@ -126,7 +126,7 @@ resource "dbtcloud_fabric_connection" "fabric" {
126126
project_id = dbtcloud_project.test_project.id
127127
name = "Fabric"
128128
database = "testdb"
129-
server = "testserver"
129+
server = "example.com"
130130
port = 1234
131131
}
132132

pkg/resources/group.go

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ var (
2323
"git_admin",
2424
"team_admin",
2525
"job_admin",
26+
"job_runner",
2627
"job_viewer",
2728
"analyst",
2829
"developer",

pkg/resources/service_token.go

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ var (
2323
"git_admin",
2424
"team_admin",
2525
"job_admin",
26+
"job_runner",
2627
"job_viewer",
2728
"analyst",
2829
"developer",

0 commit comments

Comments
 (0)