You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we try to create a resource group in a subscription with an Azure Policy requiring mandatory tags for the resource group, it will fail. Seems Azapi is doing a two stage create / update. Possible fix is to apply tags upon creation?
Workaround - Use AzureRM instead of Azap.
##[error]Bash wrote one or more lines to the standard error stream.
##[error]2024-05-09T23:11:30.191Z [ERROR] provider.terraform-provider-azapi_v1.13.1: Response contains error diagnostic: tf_provider_addr=registry.terraform.io/Azure/azapi tf_resource_type=azapi_resource @caller=github.com/hashicorp/terraform-plugin-go@v0.22.1/tfprotov6/internal/diag/diagnostics.go:58 diagnostic_detail="creating/updating Resource: (ResourceId "/subscriptions/xyz/resourceGroups/rg-xyz-test-001" / Api Version "2021-04-01"): PUT https://management.azure.com/subscriptions/xyz/resourceGroups/rg-xyz-test-001
Does this mean that you have found the cause? The azapi_resource is able to create the resource in one PUT request, the tags should be in the request body if specified in the config.
If we try to create a resource group in a subscription with an Azure Policy requiring mandatory tags for the resource group, it will fail. Seems Azapi is doing a two stage create / update. Possible fix is to apply tags upon creation?
Workaround - Use AzureRM instead of Azap.
##[error]Bash wrote one or more lines to the standard error stream.
##[error]2024-05-09T23:11:30.191Z [ERROR] provider.terraform-provider-azapi_v1.13.1: Response contains error diagnostic: tf_provider_addr=registry.terraform.io/Azure/azapi tf_resource_type=azapi_resource @caller=github.com/hashicorp/terraform-plugin-go@v0.22.1/tfprotov6/internal/diag/diagnostics.go:58 diagnostic_detail="creating/updating Resource: (ResourceId "/subscriptions/xyz/resourceGroups/rg-xyz-test-001" / Api Version "2021-04-01"): PUT https://management.azure.com/subscriptions/xyz/resourceGroups/rg-xyz-test-001
RESPONSE 403: 403 Forbidden
ERROR CODE: RequestDisallowedByPolicy
The text was updated successfully, but these errors were encountered: