From 4551775e43c4aabdf76e5a938f0fb64697d2ee45 Mon Sep 17 00:00:00 2001 From: David Arnold <10138997+djaboxx@users.noreply.github.com> Date: Wed, 14 Aug 2024 12:32:48 -0700 Subject: [PATCH 1/3] Delete .github/workflows/arm-rhel-pipeline.yml --- .github/workflows/arm-rhel-pipeline.yml | 29 ------------------------- 1 file changed, 29 deletions(-) delete mode 100644 .github/workflows/arm-rhel-pipeline.yml diff --git a/.github/workflows/arm-rhel-pipeline.yml b/.github/workflows/arm-rhel-pipeline.yml deleted file mode 100644 index 50872a7..0000000 --- a/.github/workflows/arm-rhel-pipeline.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: ARM RHEL AMI Pipeline - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - workflow_dispatch: - -jobs: - build: - runs-on: [ self-hosted ] - - steps: - - uses: actions/checkout@v3 - - - name: Set up Terraform - uses: hashicorp/setup-terraform@v1 - with: - terraform_version: 1.1.0 - - - name: Terraform Init - run: terraform init - - - name: Terraform Plan - run: terraform plan - - - name: Terraform Apply - run: terraform apply -auto-approve \ No newline at end of file From b78d44b21fca8bf8d6772e939832a53de9515d6d Mon Sep 17 00:00:00 2001 From: David Arnold <10138997+djaboxx@users.noreply.github.com> Date: Wed, 14 Aug 2024 12:34:16 -0700 Subject: [PATCH 2/3] Create terraform-apply.yaml.tpl --- terraform-apply.yaml.tpl | 59 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 terraform-apply.yaml.tpl diff --git a/terraform-apply.yaml.tpl b/terraform-apply.yaml.tpl new file mode 100644 index 0000000..879ba17 --- /dev/null +++ b/terraform-apply.yaml.tpl @@ -0,0 +1,59 @@ +# This is a basic workflow to help you get started with Actions +name: Terraform Apply + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the "main" branch + push: + branches: [ "main" ] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: [ aws-image-pipeline ] + env: + AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}" + AWS_ACCESS_KEY_ID: "${{ vars.AWS_ACCESS_KEY_ID }}" + AWS_SESSION_TOKEN: "${{ secrets.AWS_SESSION_TOKEN }}" + + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v3 + + + - uses: CSVD/gh-actions-setup-node@v3 + with: + node-version: 16 + + - uses: CSVD/gh-actions-setup-terraform@v2 + with: + terraform_wrapper: false + terraform_version: "1.9.1" + + - name: Terraform Format + id: fmt + run: | + terraform fmt -check + + - name: Autoformat Halt + if: env.auto_format == 'true' + run: exit 1 + + - name: Terraform Init + id: init + run: terraform init -upgrade + + - name: Terraform Validate + id: validate + run: terraform validate + + - name: Terraform Apply + id: apply + run: terraform apply -auto-approve + continue-on-error: true From 486bf750e3433b67634870d63b5852539178b31c Mon Sep 17 00:00:00 2001 From: David Arnold <10138997+djaboxx@users.noreply.github.com> Date: Wed, 14 Aug 2024 12:35:00 -0700 Subject: [PATCH 3/3] Create terraform-plan.yaml.tpl --- terraform-plan.yaml.tpl | 1 + 1 file changed, 1 insertion(+) create mode 100644 terraform-plan.yaml.tpl diff --git a/terraform-plan.yaml.tpl b/terraform-plan.yaml.tpl new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/terraform-plan.yaml.tpl @@ -0,0 +1 @@ +