GitHub repository used to store infrastructure code related to auction-vesting-interface application.
In order to separate environments it was decided using workspaces.
- AWS S3 bucket for TF state
{environment}.hclfile with backend configuration (AWS S3 bucket, key, region)
-
Backend configuration:
terraform init -backend-config=backend/{environment}.hclwhere environment is
production -
Workspace creation and selection:
NOTE: When a workspace is created S3 automatically creates env/{environment} directory for tfstate
terraform workspace new {environment} -
Terraform plan:
terraform plan -var-file=tfvars/{environment}.tfvars -out=terraform.tfplan -
Terraform apply:
terraform apply "terraform.tfplan" -
After creating resources create new workspace:
terraform workspace new {environment} -
Repeat steps 1, 3 and 4
NOTE: When you need change workspace please do:
terraform workspace select {environment}To document the Terraform resources used the CLI tool terraform-docs. After each Terraform code update please use the terraform-docs.sh file:
bash terraform-docs.sh
or
./terraform-docs.sh| Name | Version |
|---|---|
| terraform | 1.8.5 |
| aws | 5.35.0 |
| Name | Version |
|---|---|
| aws | 5.35.0 |
| aws.cloudfront | 5.35.0 |
| aws.dns | 5.35.0 |
No modules.
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| aws_profile | AWS - Profile | string |
"563576219775" |
no |
| aws_region | AWS - Region | string |
"eu-central-1" |
no |
| default_tags | AWS - Default tags | map(any) |
n/a | yes |
| domain | Route53 - Domain | string |
"voltage.finance" |
no |
| github_branch | GitHub - Branch | string |
n/a | yes |
| name | Global - Name | string |
n/a | yes |
| website | Application - Website hostnames | list(string) |
n/a | yes |
No outputs.