chore(deps): update terraform github.com/binbashar/terraform-aws-kms-key to v0.12.2 #19
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
name: "Security Keys Layer: Unit Tests" | |
on: | |
pull_request: | |
branches: | |
- master | |
paths: | |
- apps-devstg/us-east-1/security-keys/** | |
- apps-devstg/us-east-2/security-keys/** | |
- apps-prd/us-east-1/security-keys/** | |
- data-science/us-east-1/security-keys/** | |
- management/us-east-1/security-keys/** | |
- network/us-east-1/security-keys/** | |
- network/us-eat-2/security-keys/** | |
- security/us-east-1/security-keys/** | |
- shared/us-east-1/security-keys/** | |
- shared/us-east-2/security-keys/** | |
jobs: | |
apps-devstg: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: LocalStack/[email protected] | |
with: | |
image-tag: "3.7.2" | |
install-awslocal: true | |
- name: Configure AWS Credentials | |
run: | | |
awslocal configure set aws_access_key_id fake --profile bb-security-devops | |
awslocal configure set aws_secret_access_key fake --profile bb-security-devops | |
awslocal configure set region us-east-1 --profile bb-security-devops | |
awslocal configure set endpoint_url http://localhost:4566 --profile bb-security-devops | |
- name: Create S3 Buckets | |
run: | | |
awslocal s3 mb s3://security --region us-east-1 | |
- uses: actions/checkout@v4 | |
- name: Copy Terraform State File for testing to S3 Bucket | |
run: | | |
awslocal s3 cp apps-devstg/us-east-1/security-keys/tests/terraform.tfstate-test s3://security/identities/terraform.tfstate | |
- uses: hashicorp/setup-terraform@v3 | |
with: | |
terraform_version: 1.7.0 | |
- name: Install tflocal | |
run: | | |
pip install terraform-local | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
us-east-1: | |
- 'apps-devstg/us-east-1/security-keys/**' | |
us-east-2: | |
- 'apps-devstg/us-east-2/security-keys/**' | |
- name: Terraform Init on us-east-1 | |
if: steps.filter.outputs.us-east-1 == 'true' | |
working-directory: apps-devstg/us-east-1/security-keys | |
run: tflocal init | |
- name: Run Unit Test on us-east-1 | |
if: steps.filter.outputs.us-east-1 == 'true' | |
working-directory: apps-devstg/us-east-1/security-keys | |
env: | |
AWS_DEFAULT_REGION: us-east-1 | |
AWS_ACCESS_KEY_ID: fake | |
AWS_SECRET_ACCESS_KEY: fake | |
run: | | |
cp ../../../config/common.tfvars.example ../../../config/common.tfvars | |
tflocal test -var-file=../../../config/common.tfvars -var-file=../../config/account.tfvars -var-file=../../config/backend.tfvars | |
#- name: Terraform Init on us-east-2 | |
# if: steps.filter.outputs.us-east-2 == 'true' | |
# working-directory: apps-devstg/us-east-2/security-keys | |
# run: terraform init | |
#- name: Run Unit Test on us-east-2 | |
# if: steps.filter.outputs.us-east-2 == 'true' | |
# working-directory: apps-devstg/us-east-2/security-keys | |
# run: | | |
# terraform test | |
# apps-prd: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: hashicorp/setup-terraform@v3 | |
# with: | |
# terraform_version: 1.7.0 | |
# - uses: dorny/paths-filter@v3 | |
# id: filter | |
# with: | |
# filters: | | |
# us-east-1: | |
# - 'apps-prd/us-east-1/security-keys/**' | |
# - name: Terraform Init on us-east-1 | |
# if: steps.filter.outputs.us-east-1 == 'true' | |
# working-directory: apps-prd/us-east-1/security-keys | |
# run: terraform init | |
# - name: Run Unit Test on us-east-1 | |
# if: steps.filter.outputs.us-east-1 == 'true' | |
# working-directory: apps-prd/us-east-1/security-keys | |
# run: | | |
# terraform test | |
# data-science: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: hashicorp/setup-terraform@v3 | |
# with: | |
# terraform_version: 1.7.0 | |
# - uses: dorny/paths-filter@v3 | |
# id: filter | |
# with: | |
# filters: | | |
# us-east-1: | |
# - 'data-science/us-east-1/security-keys/**' | |
# - name: Terraform Init on us-east-1 | |
# if: steps.filter.outputs.us-east-1 == 'true' | |
# working-directory: data-science/us-east-1/security-keys | |
# run: terraform init | |
# - name: Run Unit Test on us-east-1 | |
# if: steps.filter.outputs.us-east-1 == 'true' | |
# working-directory: data-science/us-east-1/security-keys | |
# run: | | |
# terraform test | |
# management: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: hashicorp/setup-terraform@v3 | |
# with: | |
# terraform_version: 1.7.0 | |
# - uses: dorny/paths-filter@v3 | |
# id: filter | |
# with: | |
# filters: | | |
# us-east-1: | |
# - 'management/us-east-1/security-keys/**' | |
# - name: Terraform Init on us-east-1 | |
# if: steps.filter.outputs.us-east-1 == 'true' | |
# working-directory: management/us-east-1/security-keys | |
# run: terraform init | |
# - name: Run Unit Test on us-east-1 | |
# if: steps.filter.outputs.us-east-1 == 'true' | |
# working-directory: management/us-east-1/security-keys | |
# run: | | |
# terraform test | |
# network: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: hashicorp/setup-terraform@v3 | |
# with: | |
# terraform_version: 1.7.0 | |
# - uses: dorny/paths-filter@v3 | |
# id: filter | |
# with: | |
# filters: | | |
# us-east-1: | |
# - 'network/us-east-1/security-keys/**' | |
# us-east-2: | |
# - 'network/us-east-2/security-keys/**' | |
# - name: Terraform Init on us-east-1 | |
# if: steps.filter.outputs.us-east-1 == 'true' | |
# working-directory: network/us-east-1/security-keys | |
# run: terraform init | |
# - name: Run Unit Test on us-east-1 | |
# if: steps.filter.outputs.us-east-1 == 'true' | |
# working-directory: network/us-east-1/security-keys | |
# run: | | |
# terraform test | |
# - name: Terraform Init on us-east-2 | |
# if: steps.filter.outputs.us-east-2 == 'true' | |
# working-directory: network/us-east-2/security-keys | |
# run: terraform init | |
# - name: Run Unit Test on us-east-2 | |
# if: steps.filter.outputs.us-east-2 == 'true' | |
# working-directory: network/us-east-2/security-keys | |
# run: | | |
# terraform test | |
# security: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: hashicorp/setup-terraform@v3 | |
# with: | |
# terraform_version: 1.7.0 | |
# - uses: dorny/paths-filter@v3 | |
# id: filter | |
# with: | |
# filters: | | |
# us-east-1: | |
# - 'security/us-east-1/security-keys/**' | |
# - name: Terraform Init on us-east-1 | |
# if: steps.filter.outputs.us-east-1 == 'true' | |
# working-directory: security/us-east-1/security-keys | |
# run: terraform init | |
# - name: Run Unit Test on us-east-1 | |
# if: steps.filter.outputs.us-east-1 == 'true' | |
# working-directory: security/us-east-1/security-keys | |
# run: | | |
# terraform test | |
# shared: | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: hashicorp/setup-terraform@v3 | |
# with: | |
# terraform_version: 1.7.0 | |
# - uses: dorny/paths-filter@v3 | |
# id: filter | |
# with: | |
# filters: | | |
# us-east-1: | |
# - 'shared/us-east-1/security-keys/**' | |
# us-east-2: | |
# - 'shared/us-east-2/security-keys/**' | |
# - name: Terraform Init on us-east-1 | |
# if: steps.filter.outputs.us-east-1 == 'true' | |
# working-directory: shared/us-east-1/security-keys | |
# run: terraform init | |
# - name: Run Unit Test on us-east-1 | |
# if: steps.filter.outputs.us-east-1 == 'true' | |
# working-directory: shared/us-east-1/security-keys | |
# run: | | |
# terraform test | |
# - name: Terraform Init on us-east-2 | |
# if: steps.filter.outputs.us-east-2 == 'true' | |
# working-directory: shared/us-east-2/security-keys | |
# run: terraform init | |
# - name: Run Unit Test on us-east-2 | |
# if: steps.filter.outputs.us-east-2 == 'true' | |
# working-directory: shared/us-east-2/security-keys | |
# run: | | |
# terraform test |