Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gr6.1 #30

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 19 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ jobs:
persist-credentials: false
fetch-depth: 0

- name: echo
run: |
echo ${{ github.event.pull_request.head.repo.full_name }}
echo ${{ github.repository }}

- name: Get changed packages
id: get-changed-packages
run: |
Expand All @@ -38,6 +43,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v3


- name: Check for missing test directories
run: |
chmod +x tests/compare_directories_test.sh
Expand All @@ -49,7 +55,7 @@ jobs:
echo "$output"
exit 1
fi

- name: Compare variables in test file and in the module
run: |
if [[ ${{ matrix.package }} != "locals_variables" ]]; then
Expand All @@ -63,30 +69,34 @@ jobs:
exit 1
fi
fi

- name: Configure AWS credentials

- if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
name: Configure AWS credentials
env:
AWS_ACCESS_KEY_ID: ${{ secrets.TESTING_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.TESTING_SECRET_ACCESS_KEY }}
run: |
echo "AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}" >> $GITHUB_ENV
echo "AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}" >> $GITHUB_ENV

- name: Terraform init

- if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
name: Terraform init
run: |
if [[ ${{ matrix.package }} != "locals_variables" ]];then
cd "tests/${{ matrix.package }}"
terraform init
fi

- name: Terraform validate

- if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
name: Terraform validate
run: |
if [[ ${{ matrix.package }} != "locals_variables" ]];then
cd "tests/${{ matrix.package }}"
terraform validate
fi

- name: Terraform plan

- if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
name: Terraform plan
run: |
if [[ ${{ matrix.package }} != "locals_variables" ]];then
cd "tests/${{ matrix.package }}"
Expand Down
2 changes: 2 additions & 0 deletions modules/s3/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ module "locals" {
random_string = random_string.this.result
}



locals {
sns_enable = var.integration_type == "s3-sns" || var.integration_type == "cloudtrail-sns" ? true : false
}
Expand Down
Loading