Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terragrunt is failing on GitHub Actions and works locally & on Gitlab - Unsure of the reason #81

Open
2 tasks
SakharamS opened this issue Nov 29, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@SakharamS
Copy link

Describe the bug
Getting the error when running the terragrunt appy in GitHub Actions. This started happening 2-3 days and the same code was working without any issue.

Error: The variable resource_groups cannot be set using the -var and -var-file
│ options when applying a saved plan file, because a saved plan includes the
│ variable values that were set when it was created. The saved plan specifies
│ "{"dev-rg-common-01":{"location":"centralindia","name":"dev-rg-common-01","tags":{"resource_type":"rg"}}}"
│ as the value whereas during apply the value object with 1 attribute
│ "dev-rg-common-01" was set by an environment variable. To declare an
│ ephemeral variable which is not saved in the plan file, use ephemeral =
│ true.

To Reproduce

  1. Clone the repository https://github.com/cloudutsukpilot/developerportal
  2. Update the azure credentials in Github "Secrets and Variables"

ARM_CLIENT_ID
ARM_CLIENT_SECRET
ARM_SUBSCRIPTION_ID
ARM_TENANT_ID

  1. Run the workflow "Deploy Azure Infrastructure" (infrastructure-deployment.yaml)
  2. Terragrunt should failed while running the apply command for Common resources (does not matter if the resource is created or not)

Expected behavior
Terragrunt apply should work as expected

Nice to have

  • Terminal output
  • Screenshots

Versions
TERRAGRUNT_VERSION: 0.69.2
TERRAFORM_VERSION: v1.10.0

Additional context
Add any other context about the problem here.

@SakharamS SakharamS added the bug Something isn't working label Nov 29, 2024
@yhakbar
Copy link

yhakbar commented Dec 13, 2024

Hey @SakharamS ,

There are known issues around Terraform 1.10+ and saved plans, as described here:
gruntwork-io/terragrunt#3604

Until it's fully supported, you may have to take advantage of workarounds like adding ephemeral to variables or waiting for Terraform to fix the bug with applying saved plans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants