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

Fix documentation #359

Merged
merged 5 commits into from
Sep 12, 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
23 changes: 19 additions & 4 deletions docs/guides/dbt_private_git_deploy_key.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,39 @@ resource "fivetran_dbt_project" "project" {
}
```

Then you need to set up the dbt Project public key (field `public_key` in created resource) as a deploy key into your repo using [GitHub Provider Repository Deploy Key Resource](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_deploy_key):
Then you need to set up the dbt Project public key (field `public_key` in created resource) as a deploy key into your repo using:

[GitHub Provider Repository Deploy Key Resource](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_deploy_key):
```hcl
resource "github_repository_deploy_key" "example_repository_deploy_key" {
title = "Repository test key"
repository = "your-repo"
key = fivetran_dbt_project.project.public_key
repository = "repo-owner/repo-name"
key = fivetran_dbt_project.test_project.public_key
read_only = true
}
```

or

[Bitbucket Provider Repository Deploy Key Resource]https://registry.terraform.io/providers/DrFaust92/bitbucket/latest/docs/resources/deploy_key)
```hcl
resource "bitbucket_deploy_key" "test" {
workspace = "repo-owner"
repository = "repo-name"
key = fivetran_dbt_project.test_project.public_key
label = "Repository test key"
}
```

Since we recommend using third-party providers in this case, please make sure that access to the repositories is provided correctly and the providers are configured correctly for connection.

And after that you can configure your project in `fivetran_dbt_git_project_config` resource:

```hcl
resource "fivetran_dbt_git_project_config" "project_config" {
id = fivetran_dbt_project.project.id

git_remote_url = "[email protected]:your-repo.git"
git_remote_url = "[email protected]:repo-owner/repo-name.git"
git_branch = "main"
}
```
Expand Down
31 changes: 28 additions & 3 deletions docs/guides/version_1.3.0_update_guides.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ resource "fivetran_dbt_project" "test_project" {
type = "GIT"
project_config {
folder_path = "/folder/path"
git_remote_url = "[email protected]:fivetran/dbt_demo.git"
git_remote_url = "[email protected]:fivetran/repo-name.git"
git_branch = "main"
}
}
Expand All @@ -71,12 +71,37 @@ resource "fivetran_dbt_project" "test_project" {
default_schema = "dbt_demo_test_e2e_terraform"
type = "GIT"
}
```

For GitHub based repositories
```hcl
resource "github_repository_deploy_key" "example_repository_deploy_key" {
title = "Repository test key"
repository = "fivetran/repo-name"
key = fivetran_dbt_project.test_project.public_key
read_only = true
}
```

For Bitbucket based repositories
```hcl
resource "bitbucket_deploy_key" "test" {
workspace = "fivetran"
repository = "repo-name"
key = fivetran_dbt_project.test_project.public_key
label = "Repository test key"
}
```

Since we recommend using third-party providers in this case, please make sure that access to the repositories is provided correctly and the providers are configured correctly for connection.


```hcl
resource "fivetran_dbt_git_project_config" "test_project_config" {
id = fivetran_dbt_project.test_project.id
project_id = fivetran_dbt_project.test_project.id

folder_path = "/folder/path"
git_remote_url = "[email protected]:fivetran/dbt_demo.git"
git_remote_url = "[email protected]:fivetran/repo-name.git"
git_branch = "main"
}

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/dbt_git_project_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This resource allows you to add and manage dbt Git Projects Configs.

```hcl
resource "fivetran_dbt_git_project_config" "git_project_config" {
id = "project_id"
project_id = "project_id"
git_remote_url = "your_git_remote_url"
git_branch = "main"
folder_path = "/dbt/project/folder/path"
Expand Down
5 changes: 0 additions & 5 deletions docs/resources/dbt_project.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ resource "fivetran_dbt_project" "project" {
environment_vars = ["environment_var=value"]
threads = 8
type = "GIT"
project_config {
git_remote_url = "your_git_remote_url"
git_branch = "main"
folder_path = "/dbt/project/folder/path"
}
}
```

Expand Down
23 changes: 19 additions & 4 deletions templates/guides/dbt_private_git_deploy_key.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,39 @@ resource "fivetran_dbt_project" "project" {
}
```

Then you need to set up the dbt Project public key (field `public_key` in created resource) as a deploy key into your repo using [GitHub Provider Repository Deploy Key Resource](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_deploy_key):
Then you need to set up the dbt Project public key (field `public_key` in created resource) as a deploy key into your repo using:

[GitHub Provider Repository Deploy Key Resource](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/repository_deploy_key):
```hcl
resource "github_repository_deploy_key" "example_repository_deploy_key" {
title = "Repository test key"
repository = "your-repo"
key = fivetran_dbt_project.project.public_key
repository = "repo-owner/repo-name"
key = fivetran_dbt_project.test_project.public_key
read_only = true
}
```

or

[Bitbucket Provider Repository Deploy Key Resource]https://registry.terraform.io/providers/DrFaust92/bitbucket/latest/docs/resources/deploy_key)
```hcl
resource "bitbucket_deploy_key" "test" {
workspace = "repo-owner"
repository = "repo-name"
key = fivetran_dbt_project.test_project.public_key
label = "Repository test key"
}
```

Since we recommend using third-party providers in this case, please make sure that access to the repositories is provided correctly and the providers are configured correctly for connection.

And after that you can configure your project in `fivetran_dbt_git_project_config` resource:

```hcl
resource "fivetran_dbt_git_project_config" "project_config" {
id = fivetran_dbt_project.project.id

git_remote_url = "[email protected]:your-repo.git"
git_remote_url = "[email protected]:repo-owner/repo-name.git"
git_branch = "main"
}
```
Expand Down
29 changes: 27 additions & 2 deletions templates/guides/version_1.3.0_update_guides.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ resource "fivetran_dbt_project" "test_project" {
type = "GIT"
project_config {
folder_path = "/folder/path"
git_remote_url = "[email protected]:fivetran/dbt_demo.git"
git_remote_url = "[email protected]:fivetran/repo-name.git"
git_branch = "main"
}
}
Expand All @@ -71,12 +71,37 @@ resource "fivetran_dbt_project" "test_project" {
default_schema = "dbt_demo_test_e2e_terraform"
type = "GIT"
}
```

For GitHub based repositories
```hcl
resource "github_repository_deploy_key" "example_repository_deploy_key" {
title = "Repository test key"
repository = "fivetran/repo-name"
key = fivetran_dbt_project.test_project.public_key
read_only = true
}
```

For Bitbucket based repositories
```hcl
resource "bitbucket_deploy_key" "test" {
workspace = "fivetran"
repository = "repo-name"
key = fivetran_dbt_project.test_project.public_key
label = "Repository test key"
}
```

Since we recommend using third-party providers in this case, please make sure that access to the repositories is provided correctly and the providers are configured correctly for connection.


```hcl
resource "fivetran_dbt_git_project_config" "test_project_config" {
project_id = fivetran_dbt_project.test_project.id

folder_path = "/folder/path"
git_remote_url = "[email protected]:fivetran/dbt_demo.git"
git_remote_url = "[email protected]:fivetran/repo-name.git"
git_branch = "main"
}

Expand Down
2 changes: 1 addition & 1 deletion templates/resources/dbt_git_project_config.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This resource allows you to add and manage dbt Git Projects Configs.

```hcl
resource "fivetran_dbt_git_project_config" "git_project_config" {
id = "project_id"
project_id = "project_id"
git_remote_url = "your_git_remote_url"
git_branch = "main"
folder_path = "/dbt/project/folder/path"
Expand Down
5 changes: 0 additions & 5 deletions templates/resources/dbt_project.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ resource "fivetran_dbt_project" "project" {
environment_vars = ["environment_var=value"]
threads = 8
type = "GIT"
project_config {
git_remote_url = "your_git_remote_url"
git_branch = "main"
folder_path = "/dbt/project/folder/path"
}
}
```

Expand Down
Loading