Skip to content

Commit

Permalink
Merge pull request #233 from dbt-labs/release-0.2.19
Browse files Browse the repository at this point in the history
Release 0.2.19
  • Loading branch information
b-per authored Feb 2, 2024
2 parents dcb68b1 + 92b9852 commit 2c6624e
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 8 deletions.
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,18 @@

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

## [Unreleased](https://github.com/dbt-labs/terraform-provider-dbtcloud/compare/v0.2.18...HEAD)
## [Unreleased](https://github.com/dbt-labs/terraform-provider-dbtcloud/compare/v0.2.19...HEAD)


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

## Changes

- Update permissions allowed for groups and token to include `job_runner`

## Documentations

- Add guide on `dbtcloud-terraforming` to import existing resources

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

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ The provider documentation is directly available [on the Terraform Registry](htt
- 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
- 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

## Importing existing dbt Cloud configuration

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.

## Running Acceptance Tests

Currently, acceptance tests, run via `make test-acceptance` must be done on your
Expand Down
10 changes: 10 additions & 0 deletions docs/guides/3_importing_existing_configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
page_title: "3. Importing existing configuration"
subcategory: ""
---

# 3. Importing existing configuration"

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.

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.
4 changes: 2 additions & 2 deletions docs/resources/databricks_credential.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ description: |-
# when using the Databricks adapter
resource "dbtcloud_databricks_credential" "my_databricks_cred" {
project_id = dbtcloud_project.dbt_project.id
adapter_id = 123
adapter_id = dbtcloud_connection.my_databricks_connection.adapter_id
target_name = "prod"
token = "abcdefgh"
schema = "my_schema"
Expand All @@ -30,7 +30,7 @@ resource "dbtcloud_databricks_credential" "my_databricks_cred" {
# when using the Spark adapter
resource "dbtcloud_databricks_credential" "my_spark_cred" {
project_id = dbtcloud_project.dbt_project.id
adapter_id = 456
adapter_id = dbtcloud_connection.my_databricks_connection.adapter_id
target_name = "prod"
token = "abcdefgh"
schema = "my_schema"
Expand Down
4 changes: 2 additions & 2 deletions examples/resources/dbtcloud_databricks_credential/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# when using the Databricks adapter
resource "dbtcloud_databricks_credential" "my_databricks_cred" {
project_id = dbtcloud_project.dbt_project.id
adapter_id = 123
adapter_id = dbtcloud_connection.my_databricks_connection.adapter_id
target_name = "prod"
token = "abcdefgh"
schema = "my_schema"
Expand All @@ -15,7 +15,7 @@ resource "dbtcloud_databricks_credential" "my_databricks_cred" {
# when using the Spark adapter
resource "dbtcloud_databricks_credential" "my_spark_cred" {
project_id = dbtcloud_project.dbt_project.id
adapter_id = 456
adapter_id = dbtcloud_connection.my_databricks_connection.adapter_id
target_name = "prod"
token = "abcdefgh"
schema = "my_schema"
Expand Down
10 changes: 10 additions & 0 deletions guides/3_importing_existing_configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
page_title: "3. Importing existing configuration"
subcategory: ""
---

# 3. Importing existing configuration"

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.

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.
2 changes: 1 addition & 1 deletion pkg/resources/fabric_connection_acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func TestAccDbtCloudFabricConnectionResource(t *testing.T) {
connectionName2 := strings.ToUpper(acctest.RandStringFromCharSet(10, acctest.CharSetAlpha))
projectName := strings.ToUpper(acctest.RandStringFromCharSet(10, acctest.CharSetAlpha))
database := strings.ToUpper(acctest.RandStringFromCharSet(10, acctest.CharSetAlpha))
server := strings.ToUpper(acctest.RandStringFromCharSet(10, acctest.CharSetAlpha))
server := "example.com"
port := 1337

resource.Test(t, resource.TestCase{
Expand Down
4 changes: 2 additions & 2 deletions pkg/resources/fabric_credential_acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ resource "dbtcloud_fabric_connection" "fabric" {
project_id = dbtcloud_project.test_project.id
name = "Fabric"
database = "testdb"
server = "testserver"
server = "example.com"
port = 1234
}
Expand All @@ -126,7 +126,7 @@ resource "dbtcloud_fabric_connection" "fabric" {
project_id = dbtcloud_project.test_project.id
name = "Fabric"
database = "testdb"
server = "testserver"
server = "example.com"
port = 1234
}
Expand Down
1 change: 1 addition & 0 deletions pkg/resources/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ var (
"git_admin",
"team_admin",
"job_admin",
"job_runner",
"job_viewer",
"analyst",
"developer",
Expand Down
1 change: 1 addition & 0 deletions pkg/resources/service_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ var (
"git_admin",
"team_admin",
"job_admin",
"job_runner",
"job_viewer",
"analyst",
"developer",
Expand Down

0 comments on commit 2c6624e

Please sign in to comment.