terraform-provider-azapi icon indicating copy to clipboard operation
terraform-provider-azapi copied to clipboard

feature: RetryGetAfterPut configurable via provider

Open sdeguchi opened this issue 11 months ago • 2 comments

Using the terraform-azurerm-avm-ptn-alz to create management groups and policy assignments, we want to use a service principle that does not have the entra role global admin assigned to it and only contributor role at the root management group. Creating the management group with these lowered permissions requires setting the env variable AZAPI_RETRY_GET_AFTER_PUT_MAX_TIME(https://github.com/Azure/terraform-provider-azapi/blob/main/internal/services/common.go#L14) to at least 20m as each level of management group takes at least 10m to create.

It would remove a step for customers to set the env variable if we could make this configurable through the provider.

sdeguchi avatar Jan 22 '25 19:01 sdeguchi

Hi @sdeguchi ,

Thank you for taking time to report this issue.

I think it would be better to use customized retry configurations in the management group and policy assignments, so these configs would be part of the module and transparent to the module users(which means users don't need to set up the environment variables).

WDYT? More could be found here

ms-henglu avatar Jan 26 '25 06:01 ms-henglu

See #745

matt-FFFFFF avatar Feb 01 '25 10:02 matt-FFFFFF