Skip to content
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

Merged
merged 6 commits into from
Mar 4, 2020

Conversation

njuCZ
Copy link
Contributor

@njuCZ njuCZ commented Mar 3, 2020

fix #5920

the original sdk version 2018-12-01 does not support fields public_ips, so I upgraded the version to 2019-08-01

Copy link
Collaborator

@katbyte katbyte left a 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 🙂

Comment on lines 576 to 579
publicIPs := make([]string, 0, len(confPublicIPs))
for _, publicIP := range confPublicIPs {
publicIPs = append(publicIPs, publicIP.(string))
}
Copy link
Collaborator

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,
Copy link
Collaborator

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}"
Copy link
Collaborator

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

Suggested change
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
Copy link
Collaborator

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:

Suggested change
* `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 katbyte added this to the v2.1.0 milestone Mar 3, 2020
@njuCZ
Copy link
Contributor Author

njuCZ commented Mar 4, 2020

@katbyte thanks for your suggestion, Could you have a review again?

@ghost ghost removed the waiting-response label Mar 4, 2020
@njuCZ njuCZ requested a review from katbyte March 4, 2020 04:02
Copy link
Collaborator

@katbyte katbyte left a 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 👍

@katbyte katbyte merged commit 4753007 into hashicorp:master Mar 4, 2020
katbyte added a commit that referenced this pull request Mar 4, 2020
katbyte added a commit that referenced this pull request Mar 5, 2020
@ghost
Copy link

ghost commented Mar 11, 2020

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 ...

@ghost
Copy link

ghost commented Apr 4, 2020

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 ghost locked and limited conversation to collaborators Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for 'public_ips' in the network_configuration block of azurerm_batch_pool
2 participants