Skip to content

Commit

Permalink
chore: single multienv directory
Browse files Browse the repository at this point in the history
  • Loading branch information
vmttn committed Sep 27, 2023
1 parent e416d27 commit 7302f61
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 54 deletions.
File renamed without changes.
10 changes: 5 additions & 5 deletions deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This is preferably shared by environments.
Use the `-chdir=` option to target a specific environment:

```bash
docker compose run --rm tf -chdir=environments/staging plan
docker compose run --rm tf plan
```

### initializing the state backend
Expand All @@ -43,7 +43,7 @@ docker compose run --rm tf -chdir=environments/staging plan

```bash
set +o history
docker compose run --rm tf -chdir=environments/<ENVIRONMENT>/ init \
docker compose run --rm tf init \
-backend-config "bucket=data-inclusion-terraform" \
-backend-config "key=stack_data/<ENVIRONMENT>" \
-backend-config "region=fr-par" \
Expand All @@ -60,7 +60,7 @@ The deployment is configured through variables. The set of variables will be dif
To generate a configuration file for a specific environment:

```bash
USER_ID=$(id -u) docker compose run --rm tf-vars environments/<ENVIRONMENT>
USER_ID=$(id -u) docker compose run --rm tf-vars .
```

The generated `terraform.tfvars.json` file can be filled with the appropriate values for that environment.
Expand All @@ -73,10 +73,10 @@ The generated `terraform.tfvars.json` file can be filled with the appropriate va

```bash
# review changes
docker compose run --rm tf -chdir=environments/staging plan
docker compose run --rm tf plan

# apply
docker compose run --rm tf -chdir=environments/staging apply
docker compose run --rm tf apply
```

### updating auto generated documentation
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion deployment/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ services:
user: "${USER_UID:-1000}:0"
working_dir: /deployment
entrypoint: terraform-docs markdown --recursive --recursive-path ../../modules --output-file README.md
command: environments/staging
volumes:
- .:/deployment

Expand Down
47 changes: 0 additions & 47 deletions deployment/environments/staging/README.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ variable "ssh_private_key" {
}

module "stack_data" {
source = "../../modules/stack_data"
source = "./modules/stack_data"

scaleway_access_key = var.scaleway_access_key
scaleway_secret_key = var.scaleway_secret_key
Expand Down

0 comments on commit 7302f61

Please sign in to comment.