Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.2.19 #233

Merged
merged 5 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading