[#11] fix: swagger 배포시 보안그룹 로그 출력 제한 #11
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 : 'Terraform' | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'terraform/**' | |
- '.github/workflows/terraform.yml' | |
pull_request: | |
paths: | |
- 'terraform/**' | |
- '.github/workflows/terraform.yml' | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.NCP_ACCESS_KEY }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.NCP_SECRET_KEY }} | |
TF_VAR_access_key: ${{ secrets.NCP_ACCESS_KEY }} | |
TF_VAR_secret_key: ${{ secrets.NCP_SECRET_KEY }} | |
TF_VAR_admin_ip_cidrs: ${{ secrets.ADMIN_IP_CIDRS }} | |
permissions: | |
contents: read | |
jobs: | |
terraform: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./terraform | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Terraform | |
uses: hashicorp/setup-terraform@v3 | |
- name: Create terraform.tfvars | |
run: | | |
echo 'admin_ip_cidrs = ${{ secrets.ADMIN_IP_CIDRS }}' > terraform.tfvars 2>/dev/null | |
- name: Terraform Init | |
run: terraform init > /dev/null 2>&1 | |
- name: Terraform Plan | |
run: terraform plan -input=false | |
- name: Terraform Apply | |
if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
run: terraform apply -auto-approve -input=false > /dev/null 2>&1 |