Open figadore opened 3 years ago
Faced with same bug, child module doesn't inherit provider configuration from parent module.
Terraform v1.0.0
+ provider registry.terraform.io/hashicorp/github v4.13.0
As a workaround, you can use the 'explicit' passing of providers to modules. This is quite cumbersome of course and not a good long-term solution.
module "example" { providers = { github = "github" }
... }
As a workaround, you can use the 'explicit' passing of providers to modules. This is quite cumbersome of course and not a good long-term solution.
if you use the module multiple times, it's enough to pass it explicitly once - the other occurrences seem to pick it up as well.
As a workaround, you can use the 'explicit' passing of providers to modules. This is quite cumbersome of course and not a good long-term solution.
Doesn't work for me :( I tried: A)
data "github_team" "dev-excellence-team" {
provider = github
slug = "dev-excellence-team"
}
Still getting 404.
B) What you suggested:
data "github_team" "dev-excellence-team" {
providers = {
github = "github"
}
slug = "dev-excellence-team"
}
and getting:
│ An argument named "providers" is not expected here.
As a workaround, you can use the 'explicit' passing of providers to modules. This is quite cumbersome of course and not a good long-term solution.
Doesn't work for me :( I tried: A)
data "github_team" "dev-excellence-team" { provider = github slug = "dev-excellence-team" }
Still getting 404.
B) What you suggested:
data "github_team" "dev-excellence-team" { providers = { github = "github" } slug = "dev-excellence-team" }
and getting:
│ An argument named "providers" is not expected here.
Sorry that workaround is for modules, not specific resources/data resources.
I am still seeing this with Terraform v1.3.2
and + provider registry.terraform.io/hashicorp/github v5.5.0
. The work around did work, but I had to remember to include a required providers block inside my module.
As a workaround, you can use the 'explicit' passing of providers to modules. This is quite cumbersome of course and not a good long-term solution.
module "example" { providers = { github = "github" } ... }
This issue may have some overlap with #1231.
👋 Hey Friends, this issue has been automatically marked as stale
because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned
label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!
Not stale :-)
I believe this is a bug based on what I read about provider config inheritance for modules, but it could also be that I just don't understand terraform very well yet
Terraform Version
1.0.1
Affected Resource(s)
Terraform Configuration Files
main.tf
submodule/main.tf
Expected Behavior
API calls to
https://api.github.com/repos/<owner>/<repo-name>
Actual Behavior
API calls to
https://api.github.com/repos//<repo-name>
No
owner
is passed in when constructing API urlsor
Steps to Reproduce
Please list the steps required to reproduce the issue, for example: