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
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform 0.12.10 / provider.azurerm 1.35.0
Affected Resource(s)
azurerm_log_profile
Debug Output
Error: Error retrieving Log Profile "foobar": insights.LogProfilesClient#Get: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="ResourceNotFound" Message="Log profile 'foobar' under scope '/subscriptions/xxxx' doesn't exist."
on ../../../modules/ui_workload/main.tf line 261, in resource "azurerm_monitor_log_profile" "workload_log_profile":
261: resource "azurerm_monitor_log_profile" "workload_log_profile" {
Expected Behavior
Log profile is created without error messages.
Actual Behavior
Log profile is created but due to replication lag Terraform sometimes gets a 404 response.
Steps to Reproduce
Create a basic log profile and run terraform apply
Note: This works in most cases so you may have to retry a few times.
Important Factoids
In most cases this works as expected but sometimes the replication takes a few seconds longer or you are asking an API endpoint which may not have the latest update due to lag.
There is already a retry function in place, but this sometimes isn't enough:
Create gets 201 response
Retry gets 200 response
3rd read gets 404 due to replication lag
How should we approach this? Should we add a sleep after the creation? (meh)
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!
ghost
locked and limited conversation to collaborators
Mar 28, 2020
Community Note
Terraform 0.12.10 / provider.azurerm 1.35.0
Affected Resource(s)
azurerm_log_profile
Debug Output
Expected Behavior
Log profile is created without error messages.
Actual Behavior
Log profile is created but due to replication lag Terraform sometimes gets a 404 response.
Steps to Reproduce
Create a basic log profile and run
terraform apply
Note: This works in most cases so you may have to retry a few times.
Important Factoids
In most cases this works as expected but sometimes the replication takes a few seconds longer or you are asking an API endpoint which may not have the latest update due to lag.
There is already a
retry
function in place, but this sometimes isn't enough:How should we approach this? Should we add a
sleep
after the creation? (meh)Relevant code:
https://github.com/terraform-providers/terraform-provider-azurerm/blob/9608d186084427707a806a4c25e3092f89584d0b/azurerm/resource_arm_monitor_log_profile.go#L142
The text was updated successfully, but these errors were encountered: