From e4f04be5dfb215a33cd4daeece48ea4f61bb2b16 Mon Sep 17 00:00:00 2001 From: Chris Kalafarski Date: Mon, 22 Apr 2024 17:49:27 -0400 Subject: [PATCH] Add CUR deploy action --- .../deploy-cur-cost-and-usage-report.yml | 38 +++++++++++++++++++ .../cost-and-usage-report/template.yml | 0 2 files changed, 38 insertions(+) create mode 100644 .github/workflows/deploy-cur-cost-and-usage-report.yml rename {etc => cur}/cost-and-usage-report/template.yml (100%) diff --git a/.github/workflows/deploy-cur-cost-and-usage-report.yml b/.github/workflows/deploy-cur-cost-and-usage-report.yml new file mode 100644 index 000000000..377a775a9 --- /dev/null +++ b/.github/workflows/deploy-cur-cost-and-usage-report.yml @@ -0,0 +1,38 @@ +name: Deploy Cost and Usage Report + +on: + push: + branches: + - main + paths: + - cur/cost-and-usage-report/template.yml + +concurrency: + group: ${{ github.workflow }} + +permissions: + id-token: write + contents: read + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-region: us-east-1 + role-to-assume: arn:aws:iam::048723829744:role/PRX-GHA-AccessRole + role-session-name: gha-deploy-cur-report + + - name: Deploy to management account + working-directory: cur/cost-and-usage-report + run: | + aws cloudformation deploy \ + --region us-east-1 \ + --stack-name cur \ + --template-file template.yml \ + --no-fail-on-empty-changeset \ + --role-arn arn:aws:iam::048723829744:role/PRX-GHA-ServiceRoleForCloudFormation diff --git a/etc/cost-and-usage-report/template.yml b/cur/cost-and-usage-report/template.yml similarity index 100% rename from etc/cost-and-usage-report/template.yml rename to cur/cost-and-usage-report/template.yml