Skip to content

Commit 9495748

Browse files
authored
Merge pull request #155 from dbt-labs/feature/identify-missing-resources
Feature - identify missing resources
2 parents 4bc755f + 6e86d2d commit 9495748

File tree

69 files changed

+408
-143
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+408
-143
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
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.0...HEAD)
5+
## [Unreleased](https://github.com/dbt-labs/terraform-provider-dbtcloud/compare/v0.2.1...HEAD)
6+
7+
## [0.2.1](https://github.com/dbt-labs/terraform-provider-dbtcloud/compare/v0.2.0...v0.2.1)
8+
9+
## Changes
10+
11+
- Resources deleted from dbt Cloud won't crash the provider and we now consider the resource as deleted, removing it from the state. This is the expected behaviour of a provider.
12+
- Add examples in the docs to resources that didn't have any so far
613

714
## [0.2.0](https://github.com/dbt-labs/terraform-provider-dbtcloud/compare/v0.1.12...v0.2.0)
815

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.0
1+
0.2.1

docs/resources/bigquery_credential.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,18 @@ description: |-
1010

1111

1212

13-
13+
## Example Usage
14+
15+
```terraform
16+
// use dbt_cloud_bigquery_credential instead of dbtcloud_bigquery_credential for the legacy resource names
17+
// legacy names will be removed from 0.3 onwards
18+
19+
resource "dbtcloud_bigquery_credential" "test_credential" {
20+
project_id = dbtcloud_project.my_project.id
21+
dataset = "my_bq_dataset"
22+
num_threads = 16
23+
}
24+
```
1425

1526
<!-- schema generated by tfplugindocs -->
1627
## Schema

docs/resources/databricks_credential.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,32 @@ description: |-
1010

1111

1212

13-
13+
## Example Usage
14+
15+
```terraform
16+
// use dbt_cloud_databricks_credential instead of dbtcloud_databricks_credential for the legacy resource names
17+
// legacy names will be removed from 0.3 onwards
18+
19+
# when using the Databricks adapter
20+
resource "dbtcloud_databricks_credential" "databricks_cred" {
21+
project_id = dbtcloud_project.my_project.id
22+
adapter_id = 123
23+
target_name = "prod"
24+
token = "abcdefgh"
25+
schema = "my_schema"
26+
adapter_type = "databricks"
27+
}
28+
29+
# when using the Spark adapter
30+
resource "dbtcloud_databricks_credential" "spark_cred" {
31+
project_id = dbtcloud_project.my_other_project.id
32+
adapter_id = 456
33+
target_name = "prod"
34+
token = "abcdefgh"
35+
schema = "my_schema"
36+
adapter_type = "spark"
37+
}
38+
```
1439

1540
<!-- schema generated by tfplugindocs -->
1641
## Schema

docs/resources/group.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ description: |-
1616
// legacy names will be removed from 0.3 onwards
1717
1818
resource "dbtcloud_group" "test_group" {
19-
name = "Test Group"
20-
group_permissions {
21-
permission_set = "member"
22-
all_projects = true
23-
}
24-
group_permissions {
25-
permission_set = "developer"
26-
all_projects = false
27-
project_id = dbt_cloud_project.test_project.id
28-
}
19+
name = "Test Group"
20+
group_permissions {
21+
permission_set = "member"
22+
all_projects = true
23+
}
24+
group_permissions {
25+
permission_set = "developer"
26+
all_projects = false
27+
project_id = dbt_cloud_project.test_project.id
28+
}
2929
}
3030
```
3131

docs/resources/job.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ resource "dbtcloud_job" "test" {
3535
"schedule" : false
3636
}
3737
# this is the default that gets set up when modifying jobs in the UI
38-
schedule_days = [0,1,2,3,4,5,6]
38+
schedule_days = [0, 1, 2, 3, 4, 5, 6]
3939
schedule_type = "days_of_week"
4040
}
4141
```

docs/resources/postgres_credential.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,22 @@ description: |-
1010

1111

1212

13-
13+
## Example Usage
14+
15+
```terraform
16+
// use dbt_cloud_postgres_credential instead of dbtcloud_postgres_credential for the legacy resource names
17+
// legacy names will be removed from 0.3 onwards
18+
19+
resource "dbtcloud_postgres_credential" "test_credential" {
20+
is_active = true
21+
project_id = dbt_cloud_project.test_project.id
22+
type = "postgres"
23+
default_schema = "my_schema"
24+
username = "my_username"
25+
password = "my_password"
26+
num_threads = 16
27+
}
28+
```
1429

1530
<!-- schema generated by tfplugindocs -->
1631
## Schema

docs/resources/project.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,21 @@ description: |-
1010

1111

1212

13+
## Example Usage
1314

15+
```terraform
16+
// use dbt_cloud_project instead of dbtcloud_project for the legacy resource names
17+
// legacy names will be removed from 0.3 onwards
18+
19+
resource "dbtcloud_project" "my_project" {
20+
name = "Analytics"
21+
}
22+
23+
resource "dbtcloud_project" "my_project_with_subdir" {
24+
name = "Analytics in Subdir"
25+
dbt_project_subdirectory = "/path"
26+
}
27+
```
1428

1529
<!-- schema generated by tfplugindocs -->
1630
## Schema

docs/resources/project_artefacts.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,18 @@ description: |-
1010

1111

1212

13-
13+
## Example Usage
14+
15+
```terraform
16+
// use dbt_cloud_project_artefacts instead of dbtcloud_project_artefacts for the legacy resource names
17+
// legacy names will be removed from 0.3 onwards
18+
19+
resource "dbtcloud_project_artefacts" "my_project_artefacts" {
20+
project_id = dbtcloud_project.my_project.id
21+
docs_job_id = dbtcloud_job.my_job.id
22+
freshness_job_id = dbtcloud_job.my_job.id
23+
}
24+
```
1425

1526
<!-- schema generated by tfplugindocs -->
1627
## Schema

docs/resources/project_connection.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,17 @@ description: |-
1010

1111

1212

13+
## Example Usage
1314

15+
```terraform
16+
// use dbt_cloud_project_connection instead of dbtcloud_project_connection for the legacy resource names
17+
// legacy names will be removed from 0.3 onwards
18+
19+
resource "dbtcloud_project_connection" "my_project_connection" {
20+
project_id = dbtcloud_project.my_project.id
21+
connection_id = dbtcloud_connection.my_connection.connection_id
22+
}
23+
```
1424

1525
<!-- schema generated by tfplugindocs -->
1626
## Schema

0 commit comments

Comments
 (0)