From f6143997b2200cded71b286d6f24353fc8388b02 Mon Sep 17 00:00:00 2001 From: Renato Rudnicki Date: Tue, 2 Jul 2024 16:35:13 -0300 Subject: [PATCH] small fixes for lint and documentation --- 2-environments/README.md | 6 +++--- .../artifact-publish/ml_business_unit/shared/README.md | 1 - .../service-catalog/ml_business_unit/shared/README.md | 1 + .../ml_business_unit/development/README.md | 2 ++ .../ml_business_unit/development/variables.tf | 4 ++-- .../ml_business_unit/non-production/README.md | 2 ++ .../ml_business_unit/non-production/locals.tf | 8 ++++---- .../ml_business_unit/non-production/variables.tf | 4 ++-- .../ml_business_unit/production/README.md | 2 ++ .../ml_business_unit/production/locals.tf | 8 ++++---- .../ml_business_unit/production/variables.tf | 4 ++-- .../machine-learning-pipeline/modules/base_env/main.tf | 2 +- 12 files changed, 25 insertions(+), 19 deletions(-) diff --git a/2-environments/README.md b/2-environments/README.md index 0af2973f..d50999ed 100644 --- a/2-environments/README.md +++ b/2-environments/README.md @@ -196,7 +196,7 @@ You will be doing this procedure for each environment (`development`, `non-produ Make sure your git is checked out to the development branch by running `git checkout development` on `GCP_ENVIRONMENTS_PATH`. ```bash - (cd $GCP_ENVIRONMENTS_PATH && git checkout development) + (cd $GCP_ENVIRONMENTS_PATH && git checkout development && cd $GCP_ENVIRONMENTS_PATH/envs/development && terraform init) ``` 2. Retrieve the bucket name and project id from terraform outputs. @@ -244,7 +244,7 @@ You will be doing this procedure for each environment (`development`, `non-produ Make sure your git is checked out to the `non-production` branch by running `git checkout non-production` on `GCP_ENVIRONMENTS_PATH`. ```bash - (cd $GCP_ENVIRONMENTS_PATH && git checkout non-production) + (cd $GCP_ENVIRONMENTS_PATH && git checkout non-production && cd $GCP_ENVIRONMENTS_PATH/envs/non-production && terraform init) ``` 2. Retrieve the bucket name and project id from terraform outputs. @@ -292,7 +292,7 @@ You will be doing this procedure for each environment (`development`, `non-produ Make sure your git is checked out to the `production` branch by running `git checkout production` on `GCP_ENVIRONMENTS_PATH`. ```bash - (cd $GCP_ENVIRONMENTS_PATH && git checkout production) + (cd $GCP_ENVIRONMENTS_PATH && git checkout production && cd $GCP_ENVIRONMENTS_PATH/envs/production && terraform init) ``` 2. Retrieve the bucket name and project id from terraform outputs. diff --git a/5-app-infra/projects/artifact-publish/ml_business_unit/shared/README.md b/5-app-infra/projects/artifact-publish/ml_business_unit/shared/README.md index 210f623d..c255b2ef 100644 --- a/5-app-infra/projects/artifact-publish/ml_business_unit/shared/README.md +++ b/5-app-infra/projects/artifact-publish/ml_business_unit/shared/README.md @@ -4,7 +4,6 @@ | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | instance\_region | The region where compute instance will be created. A subnetwork must exists in the instance region. | `string` | n/a | yes | -| log\_bucket | Log bucket to be used by Service Catalog Bucket | `string` | n/a | yes | | remote\_state\_bucket | Backend bucket to load remote state information from previous steps. | `string` | n/a | yes | ## Outputs diff --git a/5-app-infra/projects/service-catalog/ml_business_unit/shared/README.md b/5-app-infra/projects/service-catalog/ml_business_unit/shared/README.md index 849fc76c..55c6e6bb 100644 --- a/5-app-infra/projects/service-catalog/ml_business_unit/shared/README.md +++ b/5-app-infra/projects/service-catalog/ml_business_unit/shared/README.md @@ -4,6 +4,7 @@ | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | instance\_region | The region where compute instance will be created. A subnetwork must exists in the instance region. | `string` | n/a | yes | +| log\_bucket | Log bucket to be used by Service Catalog Bucket | `string` | n/a | yes | | remote\_state\_bucket | Backend bucket to load remote state information from previous steps. | `string` | n/a | yes | ## Outputs diff --git a/examples/machine-learning-pipeline/ml_business_unit/development/README.md b/examples/machine-learning-pipeline/ml_business_unit/development/README.md index a782b0fb..454f1218 100644 --- a/examples/machine-learning-pipeline/ml_business_unit/development/README.md +++ b/examples/machine-learning-pipeline/ml_business_unit/development/README.md @@ -7,6 +7,8 @@ | github\_remote\_uri | The remote uri of your github repository | `string` | n/a | yes | | instance\_region | The region where notebook instance will be created. A subnetwork must exists in the instance region. | `string` | n/a | yes | | remote\_state\_bucket | Backend bucket to load remote state information from previous steps. | `string` | n/a | yes | +| repository\_id | Common artifacts repository id | `string` | `"c-publish-artifacts"` | no | +| seed\_state\_bucket | Remote state bucket from 0-bootstrap | `string` | n/a | yes | ## Outputs diff --git a/examples/machine-learning-pipeline/ml_business_unit/development/variables.tf b/examples/machine-learning-pipeline/ml_business_unit/development/variables.tf index 04c82721..69ff309f 100644 --- a/examples/machine-learning-pipeline/ml_business_unit/development/variables.tf +++ b/examples/machine-learning-pipeline/ml_business_unit/development/variables.tf @@ -41,6 +41,6 @@ variable "seed_state_bucket" { variable "repository_id" { description = "Common artifacts repository id" - type = string - default = "c-publish-artifacts" + type = string + default = "c-publish-artifacts" } diff --git a/examples/machine-learning-pipeline/ml_business_unit/non-production/README.md b/examples/machine-learning-pipeline/ml_business_unit/non-production/README.md index 3255fd1a..9cd094b9 100644 --- a/examples/machine-learning-pipeline/ml_business_unit/non-production/README.md +++ b/examples/machine-learning-pipeline/ml_business_unit/non-production/README.md @@ -7,6 +7,8 @@ | github\_remote\_uri | The remote uri of your github repository | `string` | n/a | yes | | instance\_region | The region where notebook instance will be created. A subnetwork must exists in the instance region. | `string` | n/a | yes | | remote\_state\_bucket | Backend bucket to load remote state information from previous steps. | `string` | n/a | yes | +| repository\_id | Common artifacts repository id | `string` | `"c-publish-artifacts"` | no | +| seed\_state\_bucket | Remote state bucket from 0-bootstrap | `string` | n/a | yes | ## Outputs diff --git a/examples/machine-learning-pipeline/ml_business_unit/non-production/locals.tf b/examples/machine-learning-pipeline/ml_business_unit/non-production/locals.tf index 58e05b47..c638e586 100644 --- a/examples/machine-learning-pipeline/ml_business_unit/non-production/locals.tf +++ b/examples/machine-learning-pipeline/ml_business_unit/non-production/locals.tf @@ -15,10 +15,10 @@ */ locals { - business_unit = "ml_business_unit" - business_code = "ml" - env = "non-production" - environment_code = "n" + business_unit = "ml_business_unit" + business_code = "ml" + env = "non-production" + environment_code = "n" region_kms_keyring = [for i in local.env_keyrings : i if split("/", i)[3] == var.instance_region] } diff --git a/examples/machine-learning-pipeline/ml_business_unit/non-production/variables.tf b/examples/machine-learning-pipeline/ml_business_unit/non-production/variables.tf index 04c82721..69ff309f 100644 --- a/examples/machine-learning-pipeline/ml_business_unit/non-production/variables.tf +++ b/examples/machine-learning-pipeline/ml_business_unit/non-production/variables.tf @@ -41,6 +41,6 @@ variable "seed_state_bucket" { variable "repository_id" { description = "Common artifacts repository id" - type = string - default = "c-publish-artifacts" + type = string + default = "c-publish-artifacts" } diff --git a/examples/machine-learning-pipeline/ml_business_unit/production/README.md b/examples/machine-learning-pipeline/ml_business_unit/production/README.md index 3255fd1a..9cd094b9 100644 --- a/examples/machine-learning-pipeline/ml_business_unit/production/README.md +++ b/examples/machine-learning-pipeline/ml_business_unit/production/README.md @@ -7,6 +7,8 @@ | github\_remote\_uri | The remote uri of your github repository | `string` | n/a | yes | | instance\_region | The region where notebook instance will be created. A subnetwork must exists in the instance region. | `string` | n/a | yes | | remote\_state\_bucket | Backend bucket to load remote state information from previous steps. | `string` | n/a | yes | +| repository\_id | Common artifacts repository id | `string` | `"c-publish-artifacts"` | no | +| seed\_state\_bucket | Remote state bucket from 0-bootstrap | `string` | n/a | yes | ## Outputs diff --git a/examples/machine-learning-pipeline/ml_business_unit/production/locals.tf b/examples/machine-learning-pipeline/ml_business_unit/production/locals.tf index 7ff7437d..d96d7691 100644 --- a/examples/machine-learning-pipeline/ml_business_unit/production/locals.tf +++ b/examples/machine-learning-pipeline/ml_business_unit/production/locals.tf @@ -15,10 +15,10 @@ */ locals { - business_unit = "ml_business_unit" - business_code = "ml" - env = "production" - environment_code = "p" + business_unit = "ml_business_unit" + business_code = "ml" + env = "production" + environment_code = "p" region_kms_keyring = [for i in local.env_keyrings : i if split("/", i)[3] == var.instance_region] } diff --git a/examples/machine-learning-pipeline/ml_business_unit/production/variables.tf b/examples/machine-learning-pipeline/ml_business_unit/production/variables.tf index 04c82721..69ff309f 100644 --- a/examples/machine-learning-pipeline/ml_business_unit/production/variables.tf +++ b/examples/machine-learning-pipeline/ml_business_unit/production/variables.tf @@ -41,6 +41,6 @@ variable "seed_state_bucket" { variable "repository_id" { description = "Common artifacts repository id" - type = string - default = "c-publish-artifacts" + type = string + default = "c-publish-artifacts" } diff --git a/examples/machine-learning-pipeline/modules/base_env/main.tf b/examples/machine-learning-pipeline/modules/base_env/main.tf index b93eaeab..01911a5c 100644 --- a/examples/machine-learning-pipeline/modules/base_env/main.tf +++ b/examples/machine-learning-pipeline/modules/base_env/main.tf @@ -67,7 +67,7 @@ module "big_query" { # Metadata # ######################## -module "metadata" { +module "metadata" { source = "git::https://source.developers.google.com/p/SERVICE_CATALOG_PROJECT_ID/r/service-catalog//modules/metadata?ref=main" project_id = var.project_id