-
Notifications
You must be signed in to change notification settings - Fork 765
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
Deprecate anonymous
Flag For Provider Configuration
#506
Conversation
Why is this being deprecated? Is there some alternative method of using the provider without providing a token that will be provided? A common use case for this parameter is to retrieve the github IP range using the
|
da4f6af
to
6e9f678
Compare
@nwsparks see this comment for ongoing discussion around this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good syntactically, but I assume that there is an amount of users which use the provider without authentication to obtain the IP ranges, as mentioned in https://github.com/terraform-providers/terraform-provider-github/issues/502
Perhaps the absence of a token can signal anonymous mode . We can use this approach to our benefit to enable token-less operations (like IP Range requests) as a fallback when no token is provided, instead of erroring out.
That sounds like a pragmatic solution. I'm not as closely familiar with the needs of the broader user base or priorities, but it may be worth exploring a solution prior to deprecating this flag.
I'm not sure though how easy it is going to be to implement and if the upstream SDK makes it easy to "lazy load" the authentication only when it's needed. Also there are some benefits to validating credentials early.
Perhaps we could turn this into skip_credentials_validation
to reflect how AWS provider deals with similar problem?
@bflad Do you have any wisdom to share around this field and/or how AWS provider users get around this when they need to use https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/ip_ranges ?
It is also worth checking how the Fastly provider deals with this: https://www.terraform.io/docs/providers/fastly/d/ip_ranges.html
and Packet has similar data source: https://www.terraform.io/docs/providers/packet/d/ip_block_ranges.html
The latest commit explores a solution alongside deprecating the flag. We continue to provide an Shipping this will help unblock re-instating the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - just a comment to add this new provider schema/provider deprecation in the website
docs as well
* Deprecate `anonymous` flag for provider configuration * Add Configuration Tests * fixup! Fix Spelling * fixup! hard-code values for CI environment
Looking for wider feedback on this approach. Please raise any concerns with this deprecation. It may be possible to shape
v3.0.0
to include resource-level anonymous access if there are use cases that need better representation./cc https://github.com/terraform-providers/terraform-provider-github/issues/502#issuecomment-652399602