tfvalidate per file change on PR and fmt example (#21)
This commit is contained in:
1 parent
a04a23cb6c
commit
7e61bfc4be
2 files changed
+16
-8
No files matched your search
@@ -35,9 +35,17 @@ jobs:
|
||||
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
|
||||
with:
|
||||
egress-policy: audit
|
||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
||||
- name: Clone repo
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- id: matrix
|
||||
run: echo "value=$(find ./ -type f -name '*.tf' | awk -F/ 'BEGIN { OFS="/" } ; {$NF=""; print }' | sort -u | jq -c -s -R 'split("\n")[:-1]')" >> ${GITHUB_OUTPUT}
|
||||
run: |
|
||||
if [[ "${{ github.event_name }}" = "pull_request" ]]; then
|
||||
echo "value=$(git diff --name-only origin/${{ github.base_ref }} | awk -F/ 'BEGIN { OFS="/" }; { if ( $NF ~ "\.tf$") { $NF=""; print "./" $0 } }' | sort -u | jq -c -s -R 'split("\n")[:-1]')" >> ${GITHUB_OUTPUT}
|
||||
else
|
||||
echo "value=$(find ./ -type f -name '*.tf' | awk -F/ 'BEGIN { OFS="/" } ; {$NF=""; print }' | sort -u | jq -c -s -R 'split("\n")[:-1]')" >> ${GITHUB_OUTPUT}
|
||||
fi
|
||||
tfvalidate:
|
||||
name: terraform validate
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
+6
-6
@@ -74,8 +74,8 @@ module "fleet" {
|
||||
max_capacity = 5
|
||||
}
|
||||
# 4GB Required for vulnerability scanning. 512MB works without.
|
||||
mem = 4096
|
||||
cpu = 512
|
||||
mem = 4096
|
||||
cpu = 512
|
||||
extra_environment_variables = merge(
|
||||
local.fleet_environment_variables,
|
||||
# uncomment if using a3 carves
|
||||
@@ -87,10 +87,10 @@ module "fleet" {
|
||||
# extra_secrets = module.mdm.extra_secrets
|
||||
# extra_execution_iam_policies = module.mdm.extra_execution_iam_policies
|
||||
# extra_iam_policies = concat(
|
||||
# uncomment if using a3 carves
|
||||
# module.osquery-carve.fleet_extra_iam_policies,
|
||||
# uncomment if using firehose
|
||||
# module.firehose-logging.fleet_extra_iam_policies,
|
||||
# uncomment if using a3 carves
|
||||
# module.osquery-carve.fleet_extra_iam_policies,
|
||||
# uncomment if using firehose
|
||||
# module.firehose-logging.fleet_extra_iam_policies,
|
||||
# )
|
||||
}
|
||||
rds_config = {
|
||||
|
||||
Reference in new issue
Block a user