hashicorp / setup-terraform

Sets up Terraform CLI in your GitHub Actions workflow.
https://developer.hashicorp.com/terraform/tutorials/automation/github-actions
Mozilla Public License 2.0
1.34k stars 235 forks source link

Need some help #396

Open markgov opened 5 months ago

markgov commented 5 months ago

i am trying to create a new workflow to do a fmt and a plan but the init is failing this is my code name: Terraform plan

on: pull_request:

Sequence of patterns matched against refs/heads

branches:
  - main

jobs: terraform_pr: runs-on: ubuntu-latest
permissions: pull-requests: write
steps:

this is the error https://github.com/mk1micros/awsbuild/actions/runs/7932809272/job/21660109945?pr=44

where am i going wrong?

markgov commented 5 months ago

this is the error incase the url does not let you see it Run terraform init terraform init shell: /usr/bin/bash -e {0} env: AWS_DEFAULT_REGION: eu-west-2 AWS_REGION: eu-west-2 AWS_ACCESS_KEY_ID: AWS_SECRET_ACCESS_KEY: TERRAFORM_CLI_PATH: /home/runner/work/_temp/17157bf9-6484-4cb0-bd4e-5c6b70d72f66

╷ │ Error: failed to get shared config profile, default │ │ Initializing the backend... ╵

Error: Terraform exited with code 1. Error: Process completed with exit code 1.

markgov commented 5 months ago

i don't have any workspaces and i can run a plan locally on my pc and it works

hbauzan commented 3 weeks ago

Same issue here. https://github.com/hashicorp/terraform-provider-aws/issues/34444