Apply IAC to Akuity Platform (main) π #16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Akuity Platform Setup | |
| run-name: Apply IAC to Akuity Platform (main) π | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'akuity-bootstrap/**' | |
| - 'argocd-bootstrap/**' | |
| - '.github/workflows/akuity*' | |
| permissions: | |
| id-token: write | |
| pull-requests: write | |
| jobs: | |
| akuity_setup: | |
| env: | |
| AKUITY_API_KEY_ID: ${{ secrets.AKUITY_API_KEY_ID }} | |
| AKUITY_API_KEY_SECRET: ${{ secrets.AKUITY_API_KEY_SECRET }} | |
| TF_VAR_ARGO_ADMIN_PASSWORD: ${{ secrets.TF_VAR_ARGO_ADMIN_PASSWORD }} | |
| defaults: | |
| run: | |
| working-directory: akuity-bootstrap | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@main # Or a specific version | |
| with: | |
| role-to-assume: arn:aws:iam::218691292270:role/sedemo-iac-pipeline-role | |
| aws-region: us-west-2 | |
| - name: Verify AWS identity | |
| run: | | |
| # Your commands that require AWS credentials | |
| aws sts get-caller-identity | |
| - name: Verify Tofu | |
| uses: opentofu/setup-opentofu@v1 | |
| - name: OpenTofu fmt | |
| id: fmt | |
| run: tofu fmt -check | |
| - run: tofu init | |
| - id: plan | |
| run: tofu plan -var argo_admin_password=$TF_VAR_ARGO_ADMIN_PASSWORD | |
| - id: apply | |
| run: tofu apply --auto-approve -var argo_admin_password=$TF_VAR_ARGO_ADMIN_PASSWORD | |
| app_of_apps: | |
| needs: [akuity_setup] | |
| defaults: | |
| run: | |
| working-directory: argocd-bootstrap | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@main # Or a specific version | |
| with: | |
| role-to-assume: arn:aws:iam::218691292270:role/sedemo-iac-pipeline-role | |
| aws-region: us-west-2 | |
| - name: Verify AWS identity | |
| run: | | |
| # Your commands that require AWS credentials | |
| aws sts get-caller-identity | |
| - name: Verify Tofu | |
| uses: opentofu/setup-opentofu@v1 | |
| - name: OpenTofu fmt | |
| id: fmt | |
| run: tofu fmt -check | |
| - run: tofu init | |
| - id: plan | |
| run: tofu plan | |
| - id: apply | |
| run: tofu apply --auto-approve |