Skip to content

Error while running plan with this GA | Terraform 1.0.8 #410

@Sunil-Jacob

Description

@Sunil-Jacob

TL;DR

Getting the below error:

Error: storage.NewClient() failed: dialing: google: error getting credentials using GOOGLE_APPLICATION_CREDENTIALS environment variable: open /home/runner/work/_temp/651d8f6a44067dceb917e2cf: no such file or directory

Expected behavior
The plan should run successfully

Observed behavior
Getting the below error:

Error: storage.NewClient() failed: dialing: google: error getting credentials using GOOGLE_APPLICATION_CREDENTIALS environment variable: open /home/runner/work/_temp/651d8f6a44067dceb917e2cf: no such file or directory

Reproduction

Action YAML

steps:
      # Checkout the repository to the GitHub Actions runner
      - name: Checkout
        uses: actions/checkout@v2

      - name: Set up Cloud SDK
        uses: google-github-actions/setup-gcloud@master
        with:
          project_id: ${{ secrets.GCP_PROJECT_ID }}
          service_account_key: ${{ secrets.GOOGLE_PRIVATE_KEY }}
          export_default_credentials: true

      - name: Bucket creation DEV
        shell: bash
        run: |
          gsutil ls -b gs://${{ secrets.GCP_PROJECT_NAME}} || (gcloud services enable storage-api.googleapis.com && gsutil mb gs://${{ secrets.GCP_PROJECT_NAME}} && gsutil versioning set on gs://${{ secrets.GCP_PROJECT_NAME}} )
      - name: plan-dev
        uses: dflook/terraform-plan@v1
        env:
          GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
          TERRAFORM_HTTP_CREDENTIALS: |
            github.com/ebomart=${{ secrets.CI_USER}}:${{ secrets.CI_TOKEN}}
        with:
          path: ./
          var_file: environment/dev/variables.tfvars
          label: dev
          backend_config_file: environment/dev/gcs-bucket.tfvars

Additional information
Are you running custom workers? Doing something atypical? No

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions