From 32f46d724270c859cdbbba5923a0033d0a401dfb Mon Sep 17 00:00:00 2001 From: Valentin Matton Date: Wed, 13 Sep 2023 19:33:22 +0200 Subject: [PATCH] fix: environment env var --- .github/workflows/deployment.yml | 4 ++-- deployment/environments/staging/README.md | 2 +- deployment/environments/staging/main.tf | 4 ++-- deployment/modules/stack_data/README.md | 2 +- deployment/modules/stack_data/main.tf | 4 ++-- deployment/modules/stack_data/variables.tf | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index 167de036..adafdfff 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -34,9 +34,9 @@ jobs: TF_VAR_scaleway_access_key: ${{ secrets.SCALEWAY_ACCESS_KEY }} TF_VAR_scaleway_project_id: ${{ vars.SCALEWAY_PROJECT_ID }} TF_VAR_scaleway_secret_key: ${{ secrets.SCALEWAY_SECRET_KEY }} - TF_VAR_environment_name: ${{ vars.ENVIRONMENT_NAME }} + TF_VAR_environment: ${{ vars.ENVIRONMENT }} TF_VAR_airflow_admin_password: ${{ secrets.AIRFLOW_ADMIN_PASSWORD }} - ENV: ${{ vars.ENVIRONMENT_NAME }} + ENV: ${{ vars.ENVIRONMENT }} volumes: - .:/deployment options: --workdir /deployment diff --git a/deployment/environments/staging/README.md b/deployment/environments/staging/README.md index e4405540..f1e77043 100644 --- a/deployment/environments/staging/README.md +++ b/deployment/environments/staging/README.md @@ -29,7 +29,7 @@ No resources. | [datawarehouse\_di\_database](#input\_datawarehouse\_di\_database) | Identifier for the data inclusion database | `string` | n/a | yes | | [datawarehouse\_di\_password](#input\_datawarehouse\_di\_password) | Password for the main user of the postgres datawarehouse | `string` | n/a | yes | | [datawarehouse\_di\_username](#input\_datawarehouse\_di\_username) | Identifier for the main user of the postgres datawarehouse | `string` | n/a | yes | -| [environment\_name](#input\_environment\_name) | Identifier of the target environment | `string` | n/a | yes | +| [environment](#input\_environment) | Identifier of the target environment | `string` | n/a | yes | | [scaleway\_access\_key](#input\_scaleway\_access\_key) | Scaleway access key (https://console.scaleway.com/iam/api-keys) | `string` | n/a | yes | | [scaleway\_project\_id](#input\_scaleway\_project\_id) | Scaleway project id (https://console.scaleway.com/project/settings) | `string` | n/a | yes | | [scaleway\_secret\_key](#input\_scaleway\_secret\_key) | Scaleway secret key (https://console.scaleway.com/iam/api-keys) | `string` | n/a | yes | diff --git a/deployment/environments/staging/main.tf b/deployment/environments/staging/main.tf index 58f4bbfa..38768ca4 100644 --- a/deployment/environments/staging/main.tf +++ b/deployment/environments/staging/main.tf @@ -42,7 +42,7 @@ variable "datawarehouse_di_database" { type = string } -variable "environment_name" { +variable "environment" { description = "Identifier of the target environment" type = string } @@ -81,7 +81,7 @@ module "stack_data" { datawarehouse_di_username = var.datawarehouse_di_username datawarehouse_di_password = var.datawarehouse_di_password datawarehouse_di_database = var.datawarehouse_di_database - environment_name = var.environment_name + environment = var.environment airflow_admin_password = var.airflow_admin_password api_secret_key = var.api_secret_key api_version = var.api_version diff --git a/deployment/modules/stack_data/README.md b/deployment/modules/stack_data/README.md index 2f12a053..d3aa23b1 100644 --- a/deployment/modules/stack_data/README.md +++ b/deployment/modules/stack_data/README.md @@ -51,7 +51,7 @@ No modules. | [datawarehouse\_di\_database](#input\_datawarehouse\_di\_database) | Identifier for the data inclusion database | `string` | n/a | yes | | [datawarehouse\_di\_password](#input\_datawarehouse\_di\_password) | Password for the main user of the postgres datawarehouse | `string` | n/a | yes | | [datawarehouse\_di\_username](#input\_datawarehouse\_di\_username) | Identifier for the main user of the postgres datawarehouse | `string` | n/a | yes | -| [environment\_name](#input\_environment\_name) | Identifier of the target environment | `string` | n/a | yes | +| [environment](#input\_environment) | Identifier of the target environment | `string` | n/a | yes | | [scaleway\_access\_key](#input\_scaleway\_access\_key) | Scaleway access key (https://console.scaleway.com/iam/api-keys) | `string` | n/a | yes | | [scaleway\_project\_id](#input\_scaleway\_project\_id) | Scaleway project id (https://console.scaleway.com/project/settings) | `string` | n/a | yes | | [scaleway\_secret\_key](#input\_scaleway\_secret\_key) | Scaleway secret key (https://console.scaleway.com/iam/api-keys) | `string` | n/a | yes | diff --git a/deployment/modules/stack_data/main.tf b/deployment/modules/stack_data/main.tf index 6875b077..a2be5e3f 100644 --- a/deployment/modules/stack_data/main.tf +++ b/deployment/modules/stack_data/main.tf @@ -68,12 +68,12 @@ resource "scaleway_instance_server" "main" { # } resource "scaleway_object_bucket" "main" { - name = "data-inclusion-datalake-${var.environment_name}" + name = "data-inclusion-datalake-${var.environment}" } resource "scaleway_iam_application" "main" { organization_id = data.scaleway_account_project.main.organization_id - name = "${var.environment_name}--airflow--tf" + name = "${var.environment}--airflow--tf" } data "scaleway_account_project" "main" { diff --git a/deployment/modules/stack_data/variables.tf b/deployment/modules/stack_data/variables.tf index 18d439e5..bfed8117 100644 --- a/deployment/modules/stack_data/variables.tf +++ b/deployment/modules/stack_data/variables.tf @@ -42,7 +42,7 @@ variable "datawarehouse_di_database" { type = string } -variable "environment_name" { +variable "environment" { description = "Identifier of the target environment" type = string }