-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Adding IP restrictions to Web App #1231
Adding IP restrictions to Web App #1231
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.
hey @paktek123
Thanks for this PR :)
I've taken a look through and left some comments inline - since this PR is so close, I hope you don't mind but I've pushed a couple of commits to fix the issues I've raised - and this now LGTM 👍
Thanks!
"subnet_mask": { | ||
Type: schema.TypeString, | ||
Optional: true, | ||
Default: "255.255.255.255", |
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.
context from the Azure Portal: Specify an IP address range by providing a subnet mask (i.e. 255.255.255.0). If no mask is provided 255.255.255.255 is assumed.
|
||
ip_restriction { | ||
ip_address = "10.10.10.10" | ||
subnet_mask = "255.255.255.255" |
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.
since it's defaulted, we can remove this value
|
||
ip_restriction { | ||
ip_address = "10.10.10.10" | ||
subnet_mask = "255.255.255.255" |
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.
(same here)
azurerm/resource_arm_app_service.go
Outdated
ipSecurityRestrictions := configResp.SiteConfig.IPSecurityRestrictions | ||
if ipSecurityRestrictions != nil { | ||
d.Set("ip_restrictions", flattenAppServiceIpRestrictions(ipSecurityRestrictions)) | ||
} |
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.
we should set this all the time (but return an empty list) - I'll push a commit to fix this
azurerm/data_source_app_service.go
Outdated
ipSecurityRestrictions := configResp.SiteConfig.IPSecurityRestrictions | ||
if ipSecurityRestrictions != nil { | ||
d.Set("ip_restriction", flattenAppServiceIpRestrictions(ipSecurityRestrictions)) | ||
} |
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.
we should set this all the time (but return an empty list) - I'll push a commit to fix this
@@ -123,6 +123,23 @@ func dataSourceArmAppService() *schema.Resource { | |||
Computed: true, | |||
}, | |||
|
|||
"ip_restriction": { |
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.
can we add some additional documentation for these fields?
Thanks @tombuildsstuff ! |
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 fix for issue #1157