-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Send list of resources/data sources in use in Configure protocol message #25568
Comments
Hi @paultyng, This sounds like an interesting use-case! Can you say a little more about what underlying concern prompted you to record it? I assume you have a specific provider or set of providers in mind here so I'd be interested to learn how exactly you are hoping those providers would behave with this new information, just in the interests of understanding the underlying use-case as well as your proposed solution to it. Thanks! |
Hey @apparentlymart - the use case for azure is that we need to register all RP's the provider uses ahead of time. Right now we just register all possible ones which works, but does have some security implications on the microsoft side and they have requested that we stop. So the best solution we have thought of is to get a list of all resources used and then from that determine what RPs we will use and ensure they are registered. |
Briefly, here's two other use cases that I believe are related on this topic. Please reach out if you would like me to write up more details or if I am off-base. 😄
|
Thanks for sharing those use-cases, @katbyte and @bflad! I think I can guess what is meant by "RP" from the context -- some sort of intentionally-constrained access token? -- but just for completeness/concreteness can you say what that abbreviation is short for, so we can refer to the documentation about it to understand what it entails? Also, for the use-case of services only being available in certain regions, @bflad can you say a little more about what the AWS provider would do with that information that it couldn't instead do when Terraform sends the resource-specific |
Interesting question and I apologize I did not think about |
@apparentlymart RP refers to Resource Providers for Azure: https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-providers-and-types If you limit the providers registered, then the API is unable to create resources of the unregistered types, so yes, essentially constraining the services available to the subscription I believe. |
Another nuance on this, if we also sent counts or something to that effect, we could do quota calculations, or perhaps that could be part of a new call to the provider to check counts against known resource limits or something. AWS has quota lookup data sources, and an API to check quotas, so knowledge of the full count would allow the provider to validate these things earlier (similar to a dynamic max items on a resource type). |
Current Terraform Version
Use-cases
When providers are being configured, if they knew all the different types of resources/data sources that are in use in the configuration, they could make sure their security footprint is as small as possible.
Attempted Solutions
Proposal
In the
Configure.Request
message, I propose adding the following fields:These would be populated from the configuration with the list of all resource/data source types names that are in use in that provider.
References
The text was updated successfully, but these errors were encountered: