-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Flatten TF module structure via
.tfvars
/.tfbackend
, update to TF …
…v1.5.3
- Loading branch information
Showing
32 changed files
with
174 additions
and
790 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ on: | |
- '.github/workflows/ci-iac.yml' | ||
|
||
env: | ||
tf_version: "1.4.5" # must match value in terraform-iac/*/app/main.tf | ||
tf_version: "1.5.3" # must match value in terraform-iac/app/main.tf | ||
|
||
jobs: | ||
env: | ||
|
@@ -23,7 +23,6 @@ jobs: | |
"env":[ | ||
{ | ||
"environment_name":"dev", | ||
"tf_working_dir":"./terraform-iac/dev/app", | ||
"aws_account":"977306314792", | ||
"aws_gha_role":"hw-fargate-api-dev-gha" | ||
} | ||
|
@@ -38,7 +37,6 @@ jobs: | |
"env":[ | ||
{ | ||
"environment_name":"stg", | ||
"tf_working_dir":"./terraform-iac/stg/app", | ||
"aws_account":"977306314792", | ||
"aws_gha_role":"hw-fargate-api-stg-gha" | ||
} | ||
|
@@ -53,13 +51,11 @@ jobs: | |
"env":[ | ||
{ | ||
"environment_name":"prd", | ||
"tf_working_dir":"./terraform-iac/prd/app", | ||
"aws_account":"539738229445", | ||
"aws_gha_role":"hw-fargate-api-prd-gha" | ||
}, | ||
{ | ||
"environment_name":"cpy", | ||
"tf_working_dir":"./terraform-iac/cpy/app", | ||
"aws_account":"539738229445", | ||
"aws_gha_role":"hw-fargate-api-cpy-gha" | ||
} | ||
|
@@ -113,26 +109,26 @@ jobs: | |
terraform_version: ${{ env.tf_version }} | ||
|
||
- name: Terraform Init | ||
working-directory: ${{ matrix.env.tf_working_dir }} | ||
run: terraform init | ||
working-directory: terraform-iac/app | ||
run: terraform init -backend-config=${{ matrix.env.environment_name }}.s3.tfbackend | ||
|
||
- name: Terraform Plan | ||
working-directory: ${{ matrix.env.tf_working_dir }} | ||
run: terraform plan -var 'image_tag=ci_test' -input=false -out plan -lock=false | ||
working-directory: terraform-iac/app | ||
run: terraform plan -var-file=${{ matrix.env.environment_name }}.tfvars -var 'image_tag=ci_test' -input=false -out plan -lock=false | ||
|
||
- name: Comment Terraform Plan | ||
uses: byu-oit/github-action-tf-plan-comment@v1 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
working-directory: ${{ matrix.env.tf_working_dir }} | ||
working-directory: terraform-iac/app | ||
terraform-plan-file: plan | ||
|
||
- name: Analyze Terraform Plan | ||
uses: byu-oit/github-action-tf-plan-analyzer@v2 | ||
if: github.repository_owner == 'byu-oit' | ||
# If you're at BYU, but outside the byu-oit GitHub org, you may be able to obtain credentials by contacting [email protected] | ||
with: | ||
working-directory: ${{ matrix.env.tf_working_dir }} | ||
working-directory: terraform-iac/app | ||
terraform-plan-file: plan | ||
divvycloud-username: ${{ secrets.DIVVYCLOUD_USERNAME }} | ||
divvycloud-password: ${{ secrets.DIVVYCLOUD_PASSWORD }} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ on: | |
- '.gitignore' | ||
env: | ||
node_version: "18.x" | ||
tf_version: "1.4.5" # must match value in terraform-iac/*/app/main.tf | ||
tf_version: "1.5.3" # must match value in terraform-iac/app/main.tf | ||
FORCE_COLOR: 3 | ||
concurrency: ${{ github.ref }} | ||
jobs: | ||
|
@@ -25,7 +25,6 @@ jobs: | |
{ | ||
"environment_name":"dev", | ||
"ecr_repo_name":"hw-fargate-api-dev", | ||
"tf_working_dir":"./terraform-iac/dev/app", | ||
"aws_account":"977306314792", | ||
"aws_gha_role":"hw-fargate-api-dev-gha", | ||
"rfc_key_name":"standard_change_sandbox_client_key", | ||
|
@@ -44,7 +43,6 @@ jobs: | |
{ | ||
"environment_name":"stg", | ||
"ecr_repo_name":"hw-fargate-api-stg", | ||
"tf_working_dir":"./terraform-iac/stg/app", | ||
"aws_account":"977306314792", | ||
"aws_gha_role":"hw-fargate-api-stg-gha", | ||
"rfc_key_name":"standard_change_sandbox_client_key", | ||
|
@@ -67,7 +65,6 @@ jobs: | |
{ | ||
"environment_name":"prd", | ||
"ecr_repo_name":"hw-fargate-api-prd", | ||
"tf_working_dir":"./terraform-iac/prd/app", | ||
"aws_account":"539738229445", | ||
"aws_gha_role":"hw-fargate-api-prd-gha", | ||
"rfc_key_name":"standard_change_sandbox_client_key", | ||
|
@@ -77,7 +74,6 @@ jobs: | |
{ | ||
"environment_name":"cpy", | ||
"ecr_repo_name":"hw-fargate-api-cpy", | ||
"tf_working_dir":"./terraform-iac/cpy/app", | ||
"aws_account":"539738229445", | ||
"aws_gha_role":"hw-fargate-api-cpy-gha", | ||
"rfc_key_name":"standard_change_sandbox_client_key", | ||
|
@@ -245,19 +241,19 @@ jobs: | |
terraform_wrapper: false | ||
|
||
- name: Terraform Init | ||
working-directory: ${{ matrix.env.tf_working_dir }} | ||
run: terraform init | ||
working-directory: terraform-iac/app | ||
run: terraform init -backend-config=${{ matrix.env.environment_name }}.s3.tfbackend | ||
|
||
- name: Terraform Plan | ||
working-directory: ${{ matrix.env.tf_working_dir }} | ||
run: terraform plan -var 'image_tag=${{ steps.date.outputs.timestamp }}' -input=false -out=plan | ||
working-directory: terraform-iac/app | ||
run: terraform plan -var-file=${{ matrix.env.environment_name }}.tfvars -var 'image_tag=${{ steps.date.outputs.timestamp }}' -input=false -out=plan | ||
|
||
- name: Analyze Terraform Plan | ||
uses: byu-oit/github-action-tf-plan-analyzer@v2 | ||
if: github.repository_owner == 'byu-oit' | ||
# If you're at BYU, but outside the byu-oit GitHub org, you may be able to obtain credentials by contacting [email protected] | ||
with: | ||
working-directory: ${{ matrix.env.tf_working_dir }} | ||
working-directory: terraform-iac/app | ||
terraform-plan-file: plan | ||
divvycloud-username: ${{ secrets.DIVVYCLOUD_USERNAME }} | ||
divvycloud-password: ${{ secrets.DIVVYCLOUD_PASSWORD }} | ||
|
@@ -271,12 +267,12 @@ jobs: | |
template-id: ${{ matrix.env.rfc_template_id }} | ||
|
||
- name: Terraform Apply | ||
working-directory: ${{ matrix.env.tf_working_dir }} | ||
working-directory: terraform-iac/app | ||
run: terraform apply plan | ||
|
||
- name: Get Terraform Outputs | ||
id: terraform-outputs | ||
working-directory: ${{ matrix.env.tf_working_dir }} | ||
working-directory: terraform-iac/app | ||
run: | | ||
echo "codedeploy_app_name=$(terraform output -raw codedeploy_app_name)" >> $GITHUB_OUTPUT | ||
echo "codedeploy_deployment_group_name=$(terraform output -raw codedeploy_deployment_group_name)" >> $GITHUB_OUTPUT | ||
|
34 changes: 17 additions & 17 deletions
34
terraform-iac/cpy/app/.terraform.lock.hcl → terraform-iac/app/.terraform.lock.hcl
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
bucket = "terraform-state-storage-539738229445" | ||
dynamodb_table = "terraform-state-lock-539738229445" | ||
key = "hw-fargate-api/cpy/app.tfstate" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
env = "cpy" | ||
|
||
# image_tag provided by pipeline (or user) | ||
codedeploy_termination_wait_time = 0 | ||
deploy_test_postman_collection = "../../.postman/hw-fargate-api.postman_collection.json" | ||
deploy_test_postman_environment = "../../.postman/cpy-tst.postman_environment.json" | ||
log_retention_days = 7 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
bucket = "terraform-state-storage-977306314792" | ||
dynamodb_table = "terraform-state-lock-977306314792" | ||
key = "hw-fargate-api/dev/app.tfstate" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
env = "dev" | ||
|
||
# image_tag provided by pipeline (or user) | ||
codedeploy_termination_wait_time = 0 | ||
deploy_test_postman_collection = "../../.postman/hw-fargate-api.postman_collection.json" | ||
deploy_test_postman_environment = "../../.postman/dev-tst.postman_environment.json" | ||
log_retention_days = 1 |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
bucket = "terraform-state-storage-539738229445" | ||
dynamodb_table = "terraform-state-lock-539738229445" | ||
key = "hw-fargate-api/prd/app.tfstate" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
env = "prd" | ||
|
||
# image_tag provided by pipeline (or user) | ||
codedeploy_termination_wait_time = 0 # You probably want to change this to 15 when your service is really prd | ||
deploy_test_postman_collection = "../../.postman/hw-fargate-api.postman_collection.json" | ||
deploy_test_postman_environment = "../../.postman/prd-tst.postman_environment.json" | ||
log_retention_days = 7 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
bucket = "terraform-state-storage-977306314792" | ||
dynamodb_table = "terraform-state-lock-977306314792" | ||
key = "hw-fargate-api/stg/app.tfstate" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
env = "stg" | ||
|
||
# image_tag provided by pipeline (or user) | ||
codedeploy_termination_wait_time = 0 | ||
deploy_test_postman_collection = "../../.postman/hw-fargate-api.postman_collection.json" | ||
deploy_test_postman_environment = "../../.postman/stg-tst.postman_environment.json" | ||
log_retention_days = 1 |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.