-
Notifications
You must be signed in to change notification settings - Fork 44
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
azapi - not all resources support tags #209
Comments
For now I've just excluded all azapi resources with the filter option |
@hbuckle this is indeed a challenge. maybe a white list approach. E.g asking ourselves what type of resources we would like to tag. type = "Microsoft.App/containerApps/* is a no... |
Please confirm that this is what we're looking for: |
I haven't seen that list before, I note it hasn't been updated in some time though... |
I'm not sure if there is a good way to tell just from the resource type - it isn't really consistent, some sub-resources do support tags and some don't |
this is more up-to-date: allow me some time to review and come up with a solution. |
I may take a look at the azapi provider and see if it can be addressed there - as they are allowing the tags property to be set even if the underlying resource doesn't support it. |
Describe the bug
Support was added in 0.5.1 for tagging azapi resources, but not all resources in ARM support tags (particularly sub-resources), leading to errors at plan time.
To Reproduce
Planning failed. Terraform encountered an error while generating this plan.
╷
│ Error: Invalid configuration
│
│ with azapi_resource.example,
│ on main.tf line 8, in resource "azapi_resource" "example":
│ 8: resource "azapi_resource" "example" {
│
│ embedded schema validation failed: the argument "body" is invalid:
│
tags
is not expected here. Do you meanproperties
?Expected behavior
I'm not sure what the best way to handle this is - we can use the
-filter
option as a workaround, but there are so many of these sub-resources in ARM I feel like that would become unworkable.I'm also not sure there is any way to handle this from the terratag side, it seems like the azapi provider is doing some dynamic validation at plan time.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: