-
-
Notifications
You must be signed in to change notification settings - Fork 997
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 not respecting the provider.tf variables #3524
Comments
Running terragrunt like this works:
|
I've also removed the following from the provider and it still works because it uses the users default tenant. So it's as if these aren't recognized unless set via ENV. tenant_id = "${local.tenant_id}"
tenant_name = "${local.tenant_name}" |
I found a workaround but this seems like it should work without this by default: terraform {
extra_arguments "project_vars" {
commands = ["init", "plan", "apply", "destroy"]
env_vars = {
OS_PROJECT_ID = local.project_vars.locals.os_project_id
}
}
... |
Hi, |
Hey @cheops82 , To avoid having this go stale, can we either close out this issue or continue the discussion? |
I have an odd issue. I have this root terragrunt.hcl:
I have a module down a couple of levels:
When I run the terragrunt apply, it will create these resources, but in the wrong tenant, the tenant that is default to the keystone user I'm using.
The provider.tf being generated in .terragrunt-cache is correct:
The only way I can get this to work with terragrunt is if I set the OS_PROJECT_ID="5aaaaaaaaaa" via export. Then it works as expected but that is not an option since this is something generated by a project.hcl file in the project level.
Interesting enough, I can go into the .terragrunt-cache directory where all the files are generated, backend.tf, main.tf, outputs.tf, provider.tf and variables.tf and using this, I can run a terraform apply or a tofu apply and the resources will be created in the correct tenant.
I've tried literally everything I know to troubleshoot this and tried very different version of terragrunt to see if this is the issue but no luck.
Looking for any insight. Thanks!
The text was updated successfully, but these errors were encountered: