Skip to content

chore(deps): update terraform sysdig to v1.43.0 #263

chore(deps): update terraform sysdig to v1.43.0

chore(deps): update terraform sysdig to v1.43.0 #263

name: 51.Terraform - Sysdig
on:
push:
branches:
- main
paths:
- terraform/sysdig/**
- .github/workflows/terraform-sysdig.yml
pull_request:
paths:
- terraform/sysdig/**
- .github/workflows/terraform-sysdig.yml
env:
TF_VERSION: 1.5.7
jobs:
terraform:
runs-on: ubuntu-22.04
timeout-minutes: 5
environment:
name: tf-sysdig
steps:
- uses: hmarr/debug-action@f7318c783045ac39ed9bb497e22ce835fdafbfe6
- uses: actions/checkout@cbb722410c2e876e24abbe8de2cc27693e501dcb
- name: Setup Terraform
uses: hashicorp/setup-terraform@344fef46b6edc7c46ce8b3b8b0a3ece7e77e05f0
with:
terraform_version: ${{ env.TF_VERSION }}
- name: Authenticate and set context
uses: redhat-actions/oc-login@dfbd9912672664f9df2023c1c16e07bcf306043c
with:
openshift_server_url: ${{ secrets.OPENSHIFT_SERVER }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
namespace: ${{ vars.OPENSHIFT_NAMESPACE }}
insecure_skip_tls_verify: true
- name: Terraform Format
id: fmt
run: terraform fmt -check
working-directory: ./terraform/sysdig
- name: Terraform Variables
run: |
cat >"ci.auto.tfvars" <<EOF
silver_101ed4_team_sysdig_monitor_api_token="${{ secrets.SILVER_101ED4_TEAM_SYSDIG_MONITOR_API_TOKEN }}"
EOF
working-directory: ./terraform/sysdig
- name: Terraform Init
id: init
run: terraform init -upgrade
working-directory: ./terraform/sysdig
- name: Terraform Plan
id: plan
if: github.event_name == 'pull_request'
run: terraform plan -no-color
working-directory: ./terraform/sysdig
continue-on-error: true
- name: Create Comment
uses: actions/github-script@4020e461acd7a80762cdfff123a1fde368246fa4
if: github.event_name == 'pull_request'
env:
PLAN: "terraform\n${{ steps.plan.outputs.stdout }}"
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const output = `#### Terraform Format and Style 🖌\`${{ steps.fmt.outcome }}\`
#### Terraform Initialization ⚙️\`${{ steps.init.outcome }}\`
#### Terraform Plan 📖\`${{ steps.plan.outcome }}\`
<details><summary>Show Plan</summary>
\`\`\`${process.env.PLAN}\`\`\`
</details>
*Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`*`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: output
})
- name: Terraform Plan Status
if: steps.plan.outcome == 'failure'
run: exit 1
- name: Terraform Apply
if: github.event_name == 'push'
run: terraform apply -auto-approve
working-directory: ./terraform/sysdig