From b643826360d7b80a0c90f88dac0124a86e2e12da Mon Sep 17 00:00:00 2001 From: Valentin Matton Date: Wed, 13 Sep 2023 18:27:59 +0200 Subject: [PATCH] docs: update --- deployment/README.md | 2 ++ deployment/environments/staging/README.md | 4 ++++ deployment/modules/stack_data/README.md | 12 +++++++----- deployment/modules/stack_data/main.tf | 9 +++++++-- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/deployment/README.md b/deployment/README.md index f8451643..bdcd59f7 100644 --- a/deployment/README.md +++ b/deployment/README.md @@ -42,6 +42,7 @@ docker compose run --rm tf -chdir=environments/staging plan *Use the prerequisites for the state backend* ```bash +set +o history docker compose run --rm tf -chdir=environments// init \ -backend-config "bucket=data-inclusion-terraform" \ -backend-config "key=stack_data/" \ @@ -49,6 +50,7 @@ docker compose run --rm tf -chdir=environments// init \ -backend-config "endpoint=https://s3.fr-par.scw.cloud" \ -backend-config "access_key=" \ -backend-config "secret_key=" +set -o history ``` ### configuring the provisioning diff --git a/deployment/environments/staging/README.md b/deployment/environments/staging/README.md index c432a346..e4405540 100644 --- a/deployment/environments/staging/README.md +++ b/deployment/environments/staging/README.md @@ -21,6 +21,9 @@ No resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| +| [airflow\_admin\_password](#input\_airflow\_admin\_password) | Password for airflow admin panel | `string` | n/a | yes | +| [api\_secret\_key](#input\_api\_secret\_key) | Secret key used for cryptographic signing by the api | `string` | n/a | yes | +| [api\_version](#input\_api\_version) | Version (e.g. sha or semver) of the api to deploy | `string` | n/a | yes | | [datawarehouse\_admin\_password](#input\_datawarehouse\_admin\_password) | Password for the first user of the postgres datawarehouse | `string` | n/a | yes | | [datawarehouse\_admin\_username](#input\_datawarehouse\_admin\_username) | Identifier for the first user of the postgres datawarehouse | `string` | n/a | yes | | [datawarehouse\_di\_database](#input\_datawarehouse\_di\_database) | Identifier for the data inclusion database | `string` | n/a | yes | @@ -30,6 +33,7 @@ No resources. | [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 | +| [ssh\_private\_key](#input\_ssh\_private\_key) | The associated public key will be deployed to the instance | `string` | n/a | yes | ## Outputs diff --git a/deployment/modules/stack_data/README.md b/deployment/modules/stack_data/README.md index 7d7d77b0..2f12a053 100644 --- a/deployment/modules/stack_data/README.md +++ b/deployment/modules/stack_data/README.md @@ -7,6 +7,7 @@ Provision a compute instance with docker in the given scaleway project. | Name | Version | |------|---------| +| [null](#requirement\_null) | 3.2.1 | | [scaleway](#requirement\_scaleway) | 2.26.0 | | [time](#requirement\_time) | 0.9.1 | @@ -14,6 +15,7 @@ Provision a compute instance with docker in the given scaleway project. | Name | Version | |------|---------| +| [null](#provider\_null) | 3.2.1 | | [scaleway](#provider\_scaleway) | 2.26.0 | | [time](#provider\_time) | 0.9.1 | @@ -25,6 +27,7 @@ No modules. | Name | Type | |------|------| +| [null_resource.up](https://registry.terraform.io/providers/hashicorp/null/3.2.1/docs/resources/resource) | resource | | [scaleway_iam_api_key.main](https://registry.terraform.io/providers/scaleway/scaleway/2.26.0/docs/resources/iam_api_key) | resource | | [scaleway_iam_application.main](https://registry.terraform.io/providers/scaleway/scaleway/2.26.0/docs/resources/iam_application) | resource | | [scaleway_instance_ip.main](https://registry.terraform.io/providers/scaleway/scaleway/2.26.0/docs/resources/instance_ip) | resource | @@ -32,11 +35,6 @@ No modules. | [scaleway_instance_server.main](https://registry.terraform.io/providers/scaleway/scaleway/2.26.0/docs/resources/instance_server) | resource | | [scaleway_object_bucket.main](https://registry.terraform.io/providers/scaleway/scaleway/2.26.0/docs/resources/object_bucket) | resource | | [scaleway_object_bucket_policy.main](https://registry.terraform.io/providers/scaleway/scaleway/2.26.0/docs/resources/object_bucket_policy) | resource | -| [scaleway_rdb_acl.main](https://registry.terraform.io/providers/scaleway/scaleway/2.26.0/docs/resources/rdb_acl) | resource | -| [scaleway_rdb_database.main](https://registry.terraform.io/providers/scaleway/scaleway/2.26.0/docs/resources/rdb_database) | resource | -| [scaleway_rdb_instance.main](https://registry.terraform.io/providers/scaleway/scaleway/2.26.0/docs/resources/rdb_instance) | resource | -| [scaleway_rdb_privilege.main](https://registry.terraform.io/providers/scaleway/scaleway/2.26.0/docs/resources/rdb_privilege) | resource | -| [scaleway_rdb_user.main](https://registry.terraform.io/providers/scaleway/scaleway/2.26.0/docs/resources/rdb_user) | resource | | [time_rotating.api_key_rotation](https://registry.terraform.io/providers/hashicorp/time/0.9.1/docs/resources/rotating) | resource | | [scaleway_account_project.main](https://registry.terraform.io/providers/scaleway/scaleway/2.26.0/docs/data-sources/account_project) | data source | | [scaleway_iam_group.editors](https://registry.terraform.io/providers/scaleway/scaleway/2.26.0/docs/data-sources/iam_group) | data source | @@ -45,6 +43,9 @@ No modules. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| +| [airflow\_admin\_password](#input\_airflow\_admin\_password) | Password for airflow admin panel | `string` | n/a | yes | +| [api\_secret\_key](#input\_api\_secret\_key) | Secret key used for cryptographic signing by the api | `string` | n/a | yes | +| [api\_version](#input\_api\_version) | Version (e.g. sha or semver) of the api to deploy | `string` | n/a | yes | | [datawarehouse\_admin\_password](#input\_datawarehouse\_admin\_password) | Password for the first user of the postgres datawarehouse | `string` | n/a | yes | | [datawarehouse\_admin\_username](#input\_datawarehouse\_admin\_username) | Identifier for the first user of the postgres datawarehouse | `string` | n/a | yes | | [datawarehouse\_di\_database](#input\_datawarehouse\_di\_database) | Identifier for the data inclusion database | `string` | n/a | yes | @@ -54,6 +55,7 @@ No modules. | [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 | +| [ssh\_private\_key](#input\_ssh\_private\_key) | The associated public key will be deployed to the instance | `string` | n/a | yes | ## Outputs diff --git a/deployment/modules/stack_data/main.tf b/deployment/modules/stack_data/main.tf index 7870a8e8..6875b077 100644 --- a/deployment/modules/stack_data/main.tf +++ b/deployment/modules/stack_data/main.tf @@ -26,6 +26,11 @@ resource "scaleway_instance_server" "main" { security_group_id = scaleway_instance_security_group.main.id } +# TODO: the postgis extension must be enabled manually +# Until we figure out a good enough way of doing that, +# the resources linked to the managed database are commented out +# and the datawarehouse is deployed as a container on the VM +# # resource "scaleway_rdb_instance" "main" { # name = "datawarehouse" # node_type = "DB-DEV-S" @@ -81,8 +86,8 @@ data "scaleway_iam_group" "editors" { } resource "scaleway_object_bucket_policy" "main" { - # disable resource. TODO: find a way to retrieve the user/app associated to the access key - count = 0 + # TODO: find a way to retrieve the user/app associated to the access key + count = 0 # disable resource bucket = scaleway_object_bucket.main.name policy = jsonencode(