-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
azurerm_traffic_manager_profile
- support for new field max_return
and support for traffic_routing_method
to be MultiValue
#9487
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pr @brandon-dd - overall this looks good except could we update the docs with the new property? Should be good to merge once thats done 🙂
Yeah, sure will add! Also just figured out my issue with the acceptance tests, ran these two:
which are the ones I changed / added, and they both pass :) |
Ok, added docs and fixed up merge conflicts, should be good to go now! |
Okay, just fixed conflicts with master again, and acceptance tests still pass -- @katbyte do you think you could have another look again soon? Spending more time than I'd like to on merge conflicts 🙂 One thing to note is that, since tests were moved out of the |
Bump. If @katbyte is on vacation or something, is it possible for someone else to have a look at this PR instead? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @brandon-dd Thanks for this PR 👍
I have left some minor comments, one thing is that in the document you said max_return
defaults to 8
, but I didn't see it is set anywhere in code.
Besides, would you mind to fix the CI problems also?
azurerm/internal/services/trafficmanager/traffic_manager_profile_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/trafficmanager/traffic_manager_profile_resource.go
Outdated
Show resolved
Hide resolved
Hey @magodo, thanks for the review! Your suggestions were good, I've implemented them (I'm not too familiar with Go yet so I appreciated the tips). As for the default value, sorry I phrased that badly -- I meant that it seems like Azure's default value for this number is 8, since that's what they suggest in the UI when you try to make a Traffic Manager in the portal. It's still required for the API though, so I figured we should make it required here too (when using And, the tests actually only failed because of the GH Actions outage last week, they're all passing now that I've pushed a new commit 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @brandon-dd - this LGTM 👍
azurerm_traffic_manager_profile
- support for new field max_return
and support for traffic_routing_method
to be MultiValue
Thanks very much, guys! |
This has been released in version 2.41.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 2.41.0"
}
# ... other configuration ... |
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! |
👋 Hi all!
This PR adds a new optional field to the
azurerm_traffic_manager_profile
resource, which ismax_return
, which allows profiles with the routing methodsMultiValue
to be set. Without this field, resources like this that attempt to be created are always rejected by the Azure API because theMaxReturn
value isn't set, so it's impossible to create them with Terraform.Not coincidentally, this type of routing method was also omitted from the acceptance tests (probably because they wouldn't have passed if
MultiValue
was included). Thus I've done my best to add the missing tests there too, but did run into some trouble running the acceptance tests, so please let me know if there's anything I need to improve there!Manual tests run by me:
MultiValue
Traffic Manager withoutmax_return
set, verified we see our new error message complaining about how we need to set it (nicer than getting it from Azure itself)MultiValue
Traffic Manager withmax_return
set, but with a bad health check config, verified that we see a different error message about that issue insteadMultiValue
Traffic Manager withmax_return
set and everything else correct, verified it can create the Traffic Manger without issueMultiValue
Traffic Manager that already hadmax_return
set with a newmax_return
, verified it updated correctly on Azure's endHope this change is good with you guys, feedback welcome 🙂