Open vikas027 opened 7 months ago
Hi @vikas027 , there is a message from the provider doc, in conclusion, if we are adding a listener, the provider will only send the two listeners to API, the remove is only a display issue in Terraform side, the real http-listener will not be removed or recreated, only new one will be added :
The
backend_address_pool
,backend_http_settings
,http_listener
,private_link_configuration
,request_routing_rule
,redirect_configuration
,probe
,ssl_certificate
, andfrontend_port
properties are Sets as the service API returns these lists of objects in a different order from how the provider sends them. As Sets are stored using a hash, if one value is added or removed from the Set, Terraform considers the entire list of objects changed and the plan shows that it is removing every value in the list and re-adding it with the new information. Though Terraform is showing all the values being removed and re-added, we are not actually removing anything unless the user specifies a removal in the configfile.
Hope this may help, thanks.
Hello @teowa , Please try it out, in real Terraform fails and throws an error.
Is there an existing issue for this?
Community Note
Terraform Version
1.7.4
AzureRM Provider Version
3.99.0
Affected Resource(s)/Data Source(s)
azurerm_application_gateway
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Terraform should create two listeners, one for HTTP and another for HTTPS.
Actual Behaviour
Terraform tries to recreate the existing HTTP listener
Steps to Reproduce
No response
Important Factoids
No response
References
No response