-
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
Add possible_outbound_ip_addresses
to app service
#2513
Add possible_outbound_ip_addresses
to app service
#2513
Conversation
I think this may be better to export as a |
Yeah, I actually thought so too, but decided to follow #700 as closely as possible. The rationale in the discussion there was that it's easy enough to get that list using I think it's reasonable that they match, but I don't really care which way as long as they both go the same way :) But since changing |
Rational decision to me @tomasaschan, CSV for now it is! |
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 @tomasaschan
Thanks for the contribution. In general, it looks good to me, however it appears that you missed adding the schema and documentation for the data source.
And could we add some validations for this new field in data source and resource test ?
For the test you could just add it to the basic one, like: func TestAccDataSourceAzureRMAppService_basic(t *testing.T) {
dataSourceName := "data.azurerm_app_service.test"
rInt := acctest.RandInt()
location := testLocation()
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
Steps: []resource.TestStep{
{
Config: testAccDataSourceAppService_basic(rInt, location),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrSet(dataSourceName, "app_service_plan_id"),
resource.TestCheckResourceAttrSet(dataSourceName, "possible_outbound_ip_addresses"),
resource.TestCheckResourceAttrSet(dataSourceName, "outbound_ip_addresses"),
resource.TestCheckResourceAttr(dataSourceName, "tags.%", "0"),
),
},
},
})
} |
@katbyte @metacpp Thanks for the review! I honestly hadn't thought about the data source getting the same properties, but of course that makes sense. I've added the new property to the schema for the data source as well. I've also added a few assertions to the basic tests for both resource and data source, as well as documentation of these properties to the data source (it seems the reason I missed it in the first place is that the |
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.
hey @tomasaschan
Thanks for pushing those changes - this now LGTM, I'll kick off the tests shortly 👍
Thanks!
dismissing since changes have been pushed
Woop woop! Thanks for taking this - will significantly simplify my deployments, once released 🎉 |
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! |
This is useful for e.g. setting up firewall rules for Azure SQL - since an App Service can be rescheduled, it's possible that the
outbound_ip_addresses
field output at deploy-time does not catch all IP addresses you need to open up to be future-safe.Note: I couldn't get the code to build and run tests on my Windows machine (neither from PowerShell, inspecting the makefile to see what was required, nor from WSL), so I've basically just looked at #700 to see what I need to do to support this. (I think this could have been made easier with a
.gitattributes
and an.editorconfig
at the project root, that - at the very least - specify line endings to be what we expect.) Please feel free to request changes if I missed something 😄