Skip to content

Commit 79c99b9

Browse files
authored
Merge pull request #26 from gary-beautypie/main
2 parents fce14a8 + 732f148 commit 79c99b9

File tree

17 files changed

+286
-68
lines changed

17 files changed

+286
-68
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.terraform
2-
vendor/
2+
vendor/
3+
terraform-provider*

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
NAME=dbt-cloud
22
BINARY=terraform-provider-$(NAME)
3-
VERSION=0.1
3+
VERSION=$(shell cat VERSION)
44

55
default: install
66

@@ -10,3 +10,6 @@ build:
1010
install: build
1111
mkdir -p ~/.terraform.d/plugins/gthesheep/dbt_cloud/0.1/darwin_amd64
1212
mv $(BINARY) ~/.terraform.d/plugins/gthesheep/dbt_cloud/0.1/darwin_amd64/$(BINARY)
13+
14+
docs:
15+
go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# terraform-provider-dbt-cloud
22
Terraform Provider for DBT Cloud
33

4+
Primarily focused on managing jobs in DBT Cloud, given what
5+
is available via the API.
6+
Data sources for other concepts are added for convenience.
7+
48
```terraform
59
provider "dbt" {
610
// required

VERSION

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.0.40

docs/data-sources/dbt_cloud_job.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "dbt_cloud_job Data Source - terraform-provider-dbt-cloud"
4+
subcategory: ""
5+
description: |-
6+
7+
---
8+
9+
# dbt_cloud_job (Data Source)
10+
11+
12+
13+
14+
15+
<!-- schema generated by tfplugindocs -->
16+
## Schema
17+
18+
### Required
19+
20+
- **job_id** (Number) ID of the job
21+
- **project_id** (Number) ID of the project the job is in
22+
23+
### Optional
24+
25+
- **id** (String) The ID of this resource.
26+
27+
### Read-Only
28+
29+
- **environment_id** (Number) ID of the environment the job is in
30+
- **name** (String) Given name for the job
31+
32+
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "dbt_cloud_project Data Source - terraform-provider-dbt-cloud"
4+
subcategory: ""
5+
description: |-
6+
7+
---
8+
9+
# dbt_cloud_project (Data Source)
10+
11+
12+
13+
14+
15+
<!-- schema generated by tfplugindocs -->
16+
## Schema
17+
18+
### Required
19+
20+
- **project_id** (Number) ID of the project to represent
21+
22+
### Optional
23+
24+
- **id** (String) The ID of this resource.
25+
26+
### Read-Only
27+
28+
- **name** (String) Given name for project
29+
- **state** (Number) Project state should be 1 = active, as 2 = deleted
30+
31+

docs/data_sources/job.md

Whitespace-only changes.

docs/index.md

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
2-
page_title: "Provider: dbt-cloud"
3-
description: Manage DBT Cloud with Terraform.
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "dbt-cloud Provider"
4+
subcategory: ""
5+
description: |-
6+
47
---
58

69
# DBT Cloud Provider
@@ -18,7 +21,10 @@ provider "dbt" {
1821
}
1922
```
2023

24+
<!-- schema generated by tfplugindocs -->
25+
## Schema
26+
2127
### Required
2228

23-
- **account_id** (Integer)
24-
- **token** (String)
29+
- **account_id** (Number) Account identifier for your DBT Cloud implementation
30+
- **token** (String) API token for your DBT Cloud

docs/resources/dbt_cloud_job.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "dbt_cloud_job Resource - terraform-provider-dbt-cloud"
4+
subcategory: ""
5+
description: |-
6+
7+
---
8+
9+
# dbt_cloud_job (Resource)
10+
11+
## Example Usage
12+
13+
```terraform
14+
resource "dbt_cloud_job" "test" {
15+
project_id = 101
16+
environment_id = 1
17+
name = "Test job"
18+
execute_steps = [
19+
"dbt run",
20+
"dbt test"
21+
]
22+
}
23+
```
24+
25+
<!-- schema generated by tfplugindocs -->
26+
## Schema
27+
28+
### Required
29+
30+
- **environment_id** (Number) Environment ID to create the job in
31+
- **execute_steps** (List of String) List of commands to execute for the job
32+
- **name** (String) Job name
33+
- **project_id** (Number) Project ID to create the job in
34+
35+
### Optional
36+
37+
- **dbt_version** (String) Version number of DBT to use in this job
38+
- **generate_docs** (Boolean) Flag for whether the job should generate documentation
39+
- **id** (String) The ID of this resource.
40+
- **is_active** (Boolean) Flag for whether the job is marked active or deleted
41+
- **num_threads** (Number) Number of threads to use in the job
42+
- **run_generate_sources** (Boolean) Flag for whether the job should run generate sources
43+
- **target_name** (String) Target name for the DBT profile
44+
- **triggers** (Map of Boolean) Flags for which types of triggers to use, keys of github_webhook, schedule, custom_branch_only
45+
46+

docs/resources/job.md

-52
This file was deleted.
File renamed without changes.

go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module github.com/gthesheep/terraform-provider-dbt-cloud
33
go 1.15
44

55
require (
6+
github.com/hashicorp/terraform-plugin-docs v0.5.0 // indirect
67
github.com/hashicorp/terraform-plugin-sdk/v2 v2.7.1
78
github.com/stretchr/testify v1.7.0
89
)

0 commit comments

Comments
 (0)