From aa5c0637873bd12fecaa3c15ab5a5e0ea29f38ee Mon Sep 17 00:00:00 2001 From: Aleksandr Boldyrev Date: Wed, 11 Sep 2024 17:24:38 +0200 Subject: [PATCH] Fix documentation --- docs/guides/dbt_private_git_deploy_key.md | 4 ++-- docs/guides/version_1.3.0_update_guides.md | 24 ++++++++++++++++++- docs/resources/dbt_git_project_config.md | 2 +- docs/resources/dbt_project.md | 5 ---- .../guides/dbt_private_git_deploy_key.md.tmpl | 4 ++-- .../version_1.3.0_update_guides.md.tmpl | 22 +++++++++++++++++ .../resources/dbt_git_project_config.md.tmpl | 2 +- templates/resources/dbt_project.md.tmpl | 5 ---- 8 files changed, 51 insertions(+), 17 deletions(-) diff --git a/docs/guides/dbt_private_git_deploy_key.md b/docs/guides/dbt_private_git_deploy_key.md index 204bfc7c..1c4e91ba 100644 --- a/docs/guides/dbt_private_git_deploy_key.md +++ b/docs/guides/dbt_private_git_deploy_key.md @@ -28,7 +28,7 @@ Then you need to set up the dbt Project public key (field `public_key` in create ```hcl resource "github_repository_deploy_key" "example_repository_deploy_key" { title = "Repository test key" - repository = "your-repo" + repository = "repo-owner/repo-name" key = fivetran_dbt_project.project.public_key read_only = true } @@ -40,7 +40,7 @@ And after that you can configure your project in `fivetran_dbt_git_project_confi resource "fivetran_dbt_git_project_config" "project_config" { id = fivetran_dbt_project.project.id - git_remote_url = "git@github.com:your-repo.git" + git_remote_url = "git@github.com:repo-owner/repo-name.git" git_branch = "main" } ``` diff --git a/docs/guides/version_1.3.0_update_guides.md b/docs/guides/version_1.3.0_update_guides.md index beadf23f..05a00c30 100644 --- a/docs/guides/version_1.3.0_update_guides.md +++ b/docs/guides/version_1.3.0_update_guides.md @@ -72,8 +72,30 @@ resource "fivetran_dbt_project" "test_project" { type = "GIT" } + +For GitHub based repositories +```hcl +resource "github_repository_deploy_key" "example_repository_deploy_key" { + title = "Repository test key" + repository = "fivetran/dbt_demo" + key = fivetran_dbt_project.test_project.public_key + read_only = true +} +``` + +For Bitbucket based repositories +```hcl +resource "bitbucket_deploy_key" "test" { + workspace = "fivetran" + repository = "dbt_demo" + key = fivetran_dbt_project.test_project.public_key + label = "Repository test key" +} +``` + +```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 = "git@github.com:fivetran/dbt_demo.git" diff --git a/docs/resources/dbt_git_project_config.md b/docs/resources/dbt_git_project_config.md index 21ddd5ea..81f29780 100644 --- a/docs/resources/dbt_git_project_config.md +++ b/docs/resources/dbt_git_project_config.md @@ -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" diff --git a/docs/resources/dbt_project.md b/docs/resources/dbt_project.md index 7b18238b..f6eccf5b 100644 --- a/docs/resources/dbt_project.md +++ b/docs/resources/dbt_project.md @@ -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" - } } ``` diff --git a/templates/guides/dbt_private_git_deploy_key.md.tmpl b/templates/guides/dbt_private_git_deploy_key.md.tmpl index 204bfc7c..1c4e91ba 100644 --- a/templates/guides/dbt_private_git_deploy_key.md.tmpl +++ b/templates/guides/dbt_private_git_deploy_key.md.tmpl @@ -28,7 +28,7 @@ Then you need to set up the dbt Project public key (field `public_key` in create ```hcl resource "github_repository_deploy_key" "example_repository_deploy_key" { title = "Repository test key" - repository = "your-repo" + repository = "repo-owner/repo-name" key = fivetran_dbt_project.project.public_key read_only = true } @@ -40,7 +40,7 @@ And after that you can configure your project in `fivetran_dbt_git_project_confi resource "fivetran_dbt_git_project_config" "project_config" { id = fivetran_dbt_project.project.id - git_remote_url = "git@github.com:your-repo.git" + git_remote_url = "git@github.com:repo-owner/repo-name.git" git_branch = "main" } ``` diff --git a/templates/guides/version_1.3.0_update_guides.md.tmpl b/templates/guides/version_1.3.0_update_guides.md.tmpl index ea2fd235..05a00c30 100644 --- a/templates/guides/version_1.3.0_update_guides.md.tmpl +++ b/templates/guides/version_1.3.0_update_guides.md.tmpl @@ -72,6 +72,28 @@ resource "fivetran_dbt_project" "test_project" { type = "GIT" } + +For GitHub based repositories +```hcl +resource "github_repository_deploy_key" "example_repository_deploy_key" { + title = "Repository test key" + repository = "fivetran/dbt_demo" + key = fivetran_dbt_project.test_project.public_key + read_only = true +} +``` + +For Bitbucket based repositories +```hcl +resource "bitbucket_deploy_key" "test" { + workspace = "fivetran" + repository = "dbt_demo" + key = fivetran_dbt_project.test_project.public_key + label = "Repository test key" +} +``` + +```hcl resource "fivetran_dbt_git_project_config" "test_project_config" { project_id = fivetran_dbt_project.test_project.id diff --git a/templates/resources/dbt_git_project_config.md.tmpl b/templates/resources/dbt_git_project_config.md.tmpl index 8838439e..5a717ffd 100644 --- a/templates/resources/dbt_git_project_config.md.tmpl +++ b/templates/resources/dbt_git_project_config.md.tmpl @@ -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" diff --git a/templates/resources/dbt_project.md.tmpl b/templates/resources/dbt_project.md.tmpl index 7de2e4b2..b1249ff3 100644 --- a/templates/resources/dbt_project.md.tmpl +++ b/templates/resources/dbt_project.md.tmpl @@ -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" - } } ```