Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
vmttn committed Sep 13, 2023
1 parent 96bd75c commit b643826
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
2 changes: 2 additions & 0 deletions deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@ 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/<ENVIRONMENT>/ init \
-backend-config "bucket=data-inclusion-terraform" \
-backend-config "key=stack_data/<ENVIRONMENT>" \
-backend-config "region=fr-par" \
-backend-config "endpoint=https://s3.fr-par.scw.cloud" \
-backend-config "access_key=<ACCESS_KEY>" \
-backend-config "secret_key=<SECRET_KEY>"
set -o history
```

### configuring the provisioning
Expand Down
4 changes: 4 additions & 0 deletions deployment/environments/staging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ No resources.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_airflow_admin_password"></a> [airflow\_admin\_password](#input\_airflow\_admin\_password) | Password for airflow admin panel | `string` | n/a | yes |
| <a name="input_api_secret_key"></a> [api\_secret\_key](#input\_api\_secret\_key) | Secret key used for cryptographic signing by the api | `string` | n/a | yes |
| <a name="input_api_version"></a> [api\_version](#input\_api\_version) | Version (e.g. sha or semver) of the api to deploy | `string` | n/a | yes |
| <a name="input_datawarehouse_admin_password"></a> [datawarehouse\_admin\_password](#input\_datawarehouse\_admin\_password) | Password for the first user of the postgres datawarehouse | `string` | n/a | yes |
| <a name="input_datawarehouse_admin_username"></a> [datawarehouse\_admin\_username](#input\_datawarehouse\_admin\_username) | Identifier for the first user of the postgres datawarehouse | `string` | n/a | yes |
| <a name="input_datawarehouse_di_database"></a> [datawarehouse\_di\_database](#input\_datawarehouse\_di\_database) | Identifier for the data inclusion database | `string` | n/a | yes |
Expand All @@ -30,6 +33,7 @@ No resources.
| <a name="input_scaleway_access_key"></a> [scaleway\_access\_key](#input\_scaleway\_access\_key) | Scaleway access key (https://console.scaleway.com/iam/api-keys) | `string` | n/a | yes |
| <a name="input_scaleway_project_id"></a> [scaleway\_project\_id](#input\_scaleway\_project\_id) | Scaleway project id (https://console.scaleway.com/project/settings) | `string` | n/a | yes |
| <a name="input_scaleway_secret_key"></a> [scaleway\_secret\_key](#input\_scaleway\_secret\_key) | Scaleway secret key (https://console.scaleway.com/iam/api-keys) | `string` | n/a | yes |
| <a name="input_ssh_private_key"></a> [ssh\_private\_key](#input\_ssh\_private\_key) | The associated public key will be deployed to the instance | `string` | n/a | yes |

## Outputs

Expand Down
12 changes: 7 additions & 5 deletions deployment/modules/stack_data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ Provision a compute instance with docker in the given scaleway project.

| Name | Version |
|------|---------|
| <a name="requirement_null"></a> [null](#requirement\_null) | 3.2.1 |
| <a name="requirement_scaleway"></a> [scaleway](#requirement\_scaleway) | 2.26.0 |
| <a name="requirement_time"></a> [time](#requirement\_time) | 0.9.1 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_null"></a> [null](#provider\_null) | 3.2.1 |
| <a name="provider_scaleway"></a> [scaleway](#provider\_scaleway) | 2.26.0 |
| <a name="provider_time"></a> [time](#provider\_time) | 0.9.1 |

Expand All @@ -25,18 +27,14 @@ 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 |
| [scaleway_instance_security_group.main](https://registry.terraform.io/providers/scaleway/scaleway/2.26.0/docs/resources/instance_security_group) | resource |
| [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 |
Expand All @@ -45,6 +43,9 @@ No modules.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_airflow_admin_password"></a> [airflow\_admin\_password](#input\_airflow\_admin\_password) | Password for airflow admin panel | `string` | n/a | yes |
| <a name="input_api_secret_key"></a> [api\_secret\_key](#input\_api\_secret\_key) | Secret key used for cryptographic signing by the api | `string` | n/a | yes |
| <a name="input_api_version"></a> [api\_version](#input\_api\_version) | Version (e.g. sha or semver) of the api to deploy | `string` | n/a | yes |
| <a name="input_datawarehouse_admin_password"></a> [datawarehouse\_admin\_password](#input\_datawarehouse\_admin\_password) | Password for the first user of the postgres datawarehouse | `string` | n/a | yes |
| <a name="input_datawarehouse_admin_username"></a> [datawarehouse\_admin\_username](#input\_datawarehouse\_admin\_username) | Identifier for the first user of the postgres datawarehouse | `string` | n/a | yes |
| <a name="input_datawarehouse_di_database"></a> [datawarehouse\_di\_database](#input\_datawarehouse\_di\_database) | Identifier for the data inclusion database | `string` | n/a | yes |
Expand All @@ -54,6 +55,7 @@ No modules.
| <a name="input_scaleway_access_key"></a> [scaleway\_access\_key](#input\_scaleway\_access\_key) | Scaleway access key (https://console.scaleway.com/iam/api-keys) | `string` | n/a | yes |
| <a name="input_scaleway_project_id"></a> [scaleway\_project\_id](#input\_scaleway\_project\_id) | Scaleway project id (https://console.scaleway.com/project/settings) | `string` | n/a | yes |
| <a name="input_scaleway_secret_key"></a> [scaleway\_secret\_key](#input\_scaleway\_secret\_key) | Scaleway secret key (https://console.scaleway.com/iam/api-keys) | `string` | n/a | yes |
| <a name="input_ssh_private_key"></a> [ssh\_private\_key](#input\_ssh\_private\_key) | The associated public key will be deployed to the instance | `string` | n/a | yes |

## Outputs

Expand Down
9 changes: 7 additions & 2 deletions deployment/modules/stack_data/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit b643826

Please sign in to comment.