TFFR5 - AzAPI - replace_triggers_refs
ID: TFFR5 - Category: Composition - AzAPI - replace_triggers_refs
Authors MUST specify the replace_triggers_refs argument when using the AzAPI provider.
The values should contain the body paths that would cause the resource to be replaced when they change.
You do not need to include name, or location, as these already trigger replacement.
This is to ensure that changes to properties that require replacement of the resource are handled correctly by Terraform.
resource "azapi_resource" "example" {
type = "Microsoft.Example/resourceType@2021-01-01"
name = "example-resource"
location = "West US"
replace_triggers_refs = [
"properties.exampleProperty"
] # must be specified, even if empty
body = {
properties = {
exampleProperty = "exampleValue"
}
}
}