opentofu / setup-opentofu

Mozilla Public License 2.0
84 stars 10 forks source link

Even with version setted, get the 1.7.0 version #33

Closed samuelrcarvalho closed 5 months ago

samuelrcarvalho commented 5 months ago

Hello.

This is a part of my github action file.

`jobs: DeployTerraform: runs-on: ubuntu-latest

name: "Deploy S"
steps:
  - name: Git clone the repository
    uses: actions/checkout@v3
  - name: configure aws credentials
    uses: aws-actions/configure-aws-credentials@v2
    with:
      role-to-assume: arn:aws:iam::9999999:role/github-devops
      role-session-name: devops-s
      aws-region: ${{ env.REGION }}
  - name: Setup OpenToFu
    uses: opentofu/setup-opentofu@v1
    with:
      terraform_version: 1.6.0
  - name: OpenToFu Init
    run: |
      cd environments/${{ env.ENVIRONMENT }}/${{ env.REGION }}
      tofu init
  - name: OpenToFu Plan
    run: |
      cd environments/${{ env.ENVIRONMENT }}/${{ env.REGION }}
      tofu plan -out=terraform.to.execute
  - name: OpenToFu Apply
    if: github.event_name != 'schedule'
    run: |
      cd environments/${{ env.ENVIRONMENT }}/${{ env.REGION }}
      tofu apply terraform.to.execute`

I have terraform_version in 1.6.0, but this error happen.

`Successfully configured the backend "s3"! OpenTofu will automatically use this backend unless the backend configuration changes. Initializing modules...

samuelrcarvalho commented 5 months ago

The parameter terraform_version is not valid. I changed to tofu_version.