-
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_batch_pool] - support for custom images with the storage_image_reference
property
#3530
[azurerm_batch_pool] - support for custom images with the storage_image_reference
property
#3530
Conversation
The custom image id needs to be set in the
or add an extra property to the pool, which is not nested to the image reference (like proposed in the issue) and do the assignation in the code. @tombuildsstuff @katbyte any thoughts? |
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.
@jcorioland thanks for this PR, this look really good just want a quick change to the docs if you don't mind. Thanks. :)
@@ -120,6 +120,21 @@ The following arguments are supported: | |||
|
|||
* `storage_image_reference` - (Required) A `storage_image_reference` for the virtual machines that will compose the Batch pool. | |||
|
|||
~> **NOTE:** It's possible to reference a custom VM image for the pool by specifying it's `id` in the `id` property of the `storage_image_reference`. This property is mutually exclusive with other properties. The VM image should be in the same region that the batch pool you are about to create. See [official documentation](https://docs.microsoft.com/en-us/azure/batch/batch-custom-images) for more details. | |||
|
|||
``` |
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.
Shouldn't this code sample be moved to a new section under the Example Usage section? Say something like ## Example Usage with Custom Image?
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.
Yes, totally agree.
@jeffreyCline thank you for the review! I've made some updates according to your comment. |
Hey @jeffreyCline @tombuildsstuff @katbyte - any more change required on this one? |
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.
Seeing test errors for this PR:
------- Stdout: -------
=== RUN TestAccAzureRMBatchPool_customImage
=== PAUSE TestAccAzureRMBatchPool_customImage
=== CONT TestAccAzureRMBatchPool_customImage
--- FAIL: TestAccAzureRMBatchPool_customImage (5.30s)
testing.go:568: Step 0 error: errors during refresh:
Error: Error: Image "ubuntu1604base-img" (Resource Group "batch-custom-img-rg") was not found
on /opt/teamcity-agent/temp/buildTmp/tf-test282980552/main.tf line 7:
(source code not available)
FAIL
@katbyte - the tests are now fixed :) the travis ci fails because of spell checking failing on hdinsight, but nothing that seems related to this PR. |
Hi @katbyte - is it anything that you're waiting from me on this PR? |
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 @jcorioland,
thanks for the updates, overall this looks good to me. I've left some comments inline mostly around with documentation and the examples. I am curious about changing ID to force new, it appears this property was ignored before?
@katbyte thank you for the review! I've fixed the issue in the documentation and also split the example into a |
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 @jcorioland! LGTM now 🙂
Running acc tests and will merge once they pass
storage_image_reference
property
This has been released in version 1.32.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 = "~> 1.32.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! |
This PR brings support to custom image for Azure Batch Pool.
It fixes #3352.