-
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
support public_ips
for resource azurerm_batch_pool
#5967
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 @njuCZ,
Overall this is looking good. I've left a few minor comments inline that once addressed this should be good to merge 🙂
azurerm/helpers/azure/batch_pool.go
Outdated
publicIPs := make([]string, 0, len(confPublicIPs)) | ||
for _, publicIP := range confPublicIPs { | ||
publicIPs = append(publicIPs, publicIP.(string)) | ||
} |
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.
I think utils.ExplainStringArray()
might work here?
@@ -397,6 +397,14 @@ func resourceArmBatchPool() *schema.Resource { | |||
ForceNew: true, | |||
ValidateFunc: validation.StringIsNotEmpty, | |||
}, | |||
"public_ips": { | |||
Type: schema.TypeList, |
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.
This should probably be a TypeSet
@@ -1267,7 +1290,8 @@ resource "azurerm_batch_pool" "test" { | |||
} | |||
|
|||
network_configuration { | |||
subnet_id = "${azurerm_subnet.test.id}" | |||
subnet_id = "${azurerm_subnet.test.id}" |
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.
Could we make this .12
subnet_id = "${azurerm_subnet.test.id}" | |
subnet_id = azurerm_subnet.test.id |
@@ -275,6 +275,8 @@ A `network_configuration` block supports the following: | |||
|
|||
* `subnet_id` - (Optional) The ARM resource identifier of the virtual network subnet which the compute nodes of the pool will join. Changing this forces a new resource to be created. | |||
|
|||
* `public_ips` - (Optional) A list of public ip ids that will be allocated to nodes |
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.
Punctuation and we should note it is forcenew:
* `public_ips` - (Optional) A list of public ip ids that will be allocated to nodes | |
* `public_ips` - (Optional) A list of public ip ids that will be allocated to nodes. Changing this forces a new resource to be created. |
@katbyte thanks for your suggestion, Could you have a review again? |
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 revisions @njuCZ, LGTM 👍
This has been released in version 2.1.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.1.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! |
fix #5920
the original sdk version 2018-12-01 does not support fields
public_ips
, so I upgraded the version to 2019-08-01