-
Notifications
You must be signed in to change notification settings - Fork 768
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
[BUG]: Cannot authenticate with provider #2010
Comments
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with |
Hi, I am not totally sure from your code above which is part of a root module and which is the non-root module. However, below is how I have it setup and it works fine. Root Module:
Code in the non-root module:
|
My apologies, root/parent module is this:
Problem is I can't define a provider in the child as Terraform gives me an error due to using for_each in the root. |
Can you just update the providers block so it is like:
The end of this page suggests you can do that: But I haven't had to do this myself - but may test it next week. |
Immediately upon running
In my providers.tf at the root level I have it set up like so:
In my root (parent) module it is configured like this:
The code in the child modules are these 2 parts, a third exists but is commented. The structure is all top level in the parent module and calls the sub module for each resource it needs. Backend exists in the parent only. I have fully wiped out the state file and all resources and recieve the same error
|
This works for me: root/parent module:
child module:
|
👋 Hey Friends, this issue has been automatically marked as |
Expected Behavior
Provider should be taking my code and authenticating to create a github secret and github file respectively each.
I have tested on 5.40.0, 5.41.0, and 5.42.0, auth fails.
Github resource is in a child module, configuration for providers is in parent respectively.
I have even tried hardcoding the token to the provider and to no avail. The git:: works to download the source but the rest fails in the github provider.
This is also pulling the hashicorp/github provider even though its not required, called, or needed.
Actual Behavior
Terraform Version
Terraform: 1.6.3
On Linux AMD64
Version is integrations/github ~>5, 5.40.0, 5.41.0, 5.42.0
Affected Resource(s)
resource github_actions_secret
resource github_repository_file
data github_actions_public_key
Terraform Configuration Files
Steps to Reproduce
No response
Debug Output
Panic Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: