Last active
March 22, 2023 17:53
-
-
Save alanplatt/85ddf1a27c07a3447043658d5745c565 to your computer and use it in GitHub Desktop.
Docker compose terraform, gitlab backend, aws
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
services: | |
terraform: | |
image: hashicorp/terraform:1.4.0 | |
working_dir: ${PWD} | |
entrypoint: ../tf.sh | |
volumes: | |
- ${PWD}:/${PWD} | |
- /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem:/etc/ssl/certs/ca-certificates.crt | |
environment: | |
- TF_CLI_CONFIG_FILE=.terraformrc | |
- TF_VAR_environment | |
- TF_HTTP_USERNAME | |
- TF_HTTP_PASSWORD | |
- TF_HTTP_ADDRESS=https://gitlab/api/v4/projects/9999/terraform/state/${TF_VAR_environment} | |
- TF_HTTP_LOCK_METHOD=POST | |
- TF_HTTP_LOCK_ADDRESS=https://gitlab/api/v4/projects/9999/terraform/state/${TF_VAR_environment}/lock | |
- TF_HTTP_UNLOCK_ADDRESS=https://gitlab/api/v4/projects/9999/terraform/state/${TF_VAR_environment}/lock | |
- TF_HTTP_UNLOCK_METHOD=DELETE | |
- AWS_ACCESS_KEY_ID | |
- AWS_SECRET_ACCESS_KEY | |
- AWS_SESSION_TOKEN | |
- AWS_SECURITY_TOKEN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment