Grafana Cloud resources #17
Workflow file for this run
This file contains 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: Grafana Cloud resources | ||
on: | ||
push: | ||
branches: [main] | ||
paths-ignore: | ||
- ".github/**" | ||
- .gitignore | ||
- LICENSE | ||
- "*.md" | ||
- renovate.json | ||
workflow_dispatch: | ||
permissions: | ||
id-token: write # This is required for requesting the JWT from OIDC provider | ||
contents: read # This is required for actions/checkout | ||
concurrency: terragrunt | ||
defaults: | ||
run: | ||
shell: bash | ||
jobs: | ||
deploy-to-grafana-cloud: | ||
strategy: | ||
matrix: | ||
environment: | ||
- sandbox | ||
- demo | ||
include: | ||
- environment: sandbox | ||
url: ${{ secrets.GRAFANA_CLOUD_URL_FOR_SANDBOX }} | ||
Check failure on line 34 in .github/workflows/grafana-objects-deploy.yaml
|
||
auth: ${{ secrets.GRAFANA_CLOUD_SERVICE_ACCOUNT_TOKEN_FOR_SANDBOX }} | ||
- environment: demo | ||
url: ${{ secrets.GRAFANA_CLOUD_URL_FOR_DEMO }} | ||
auth: ${{ secrets.GRAFANA_CLOUD_SERVICE_ACCOUNT_TOKEN_FOR_DEMO }} | ||
runs-on: ubuntu-latest | ||
container: | ||
image: dfdsdk/prime-pipeline:0.6.37 | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v4 | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: ${{ secrets.AWS_CORE_ROLE_TO_ASSUME }} | ||
role-session-name: provision-grafana-objects | ||
aws-region: eu-central-1 | ||
- name: Deploy resources to Grafana Cloud ${{ matrix.environment }} environment | ||
env: | ||
TF_VAR_grafana_url: ${{ matrix.url }} | ||
TF_VAR_grafana_auth: ${{ matrix.auth }} | ||
run: terragrunt run-all apply --terragrunt-working-dir ./environments/${{ matrix.environment }} --terragrunt-source-update --terragrunt-non-interactive -input=false -auto-approve | ||
# - name: Send alert if job fails | ||
# if: failure() | ||
# uses: dfds/shared-workflows/.github/actions/automation-slack-notifier@master | ||
# with: | ||
# slack_webhook: ${{ secrets.SLACK_WEBHOOK }} | ||
# slack_message: "Configure Grafana Cloud environment failed." |