-
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
Update azurerm_shared_image
- flip generalized
to specialized
#7525
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! LGTM 👍
related to #7277 |
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.
Whilst this mostly looks good - it's worth noting that using a Specialized image has some not-immediately-obvious side effects which can cause serious issues (for example, data corruption from Machine UUID's being reused when running a cluster on-top of specialized images). As such it'd be worth calling out this issue and that we recommend using a Generalized image where possible
Thanks!
@@ -68,7 +68,7 @@ The following arguments are supported: | |||
|
|||
* `eula` - (Optional) The End User Licence Agreement for the Shared Image. | |||
|
|||
* `generalized` - (Optional) Should the Operating System present in this Shared Image be generalized? Defaults to `true`. Setting this to `false` creates a specialized imagine which is the equivalent of sysprepping in windows. Changing this forces a new resource to be created. | |||
* `specialized` - (Optional) Should the Operating System present in this Shared Image be specialized? Defaults to `false`. Setting this to `true` creates a specialized imagine which is the equivalent of sysprepping in windows. Changing this forces a new resource to be created. |
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.
a Generalized image is one where SysPrep has been applied - Specialised is one where the machine data (including the UUID) is reused - which can cause serious issues (I've personally seen production incidents/data corruption from where sysprep wasn't run) - so we should probably have a warning recommending to use a Generalized image where possible
* `specialized` - (Optional) Should the Operating System present in this Shared Image be specialized? Defaults to `false`. Setting this to `true` creates a specialized imagine which is the equivalent of sysprepping in windows. Changing this forces a new resource to be created. | |
* `specialized` - (Optional) Specifies that the Operating System used inside this Image has not been Generalized (for example, `sysprep` on Windows has not been run). Defaults to `false`. Changing this forces a new resource to be created. | |
!> **Note:** It's recommended to Generalize images where possible - Specialized Images reuse the same UUID internally within each Virtual Machine, which can have unintended side-effects. |
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 understand. I will soon make another PR to update this doc entry
@@ -43,7 +43,7 @@ The following attributes are exported: | |||
|
|||
* `location` - The supported Azure location where the Shared Image Gallery exists. | |||
|
|||
* `generalized` - Is the Operating System present in this Shared Image generalized or not. `false` indicates this image is specialized which for windows images means they have been sysprepped. | |||
* `specialized` - Is the Operating System present in this Shared Image specialized or not. `true` indicates this image is specialized which for windows images means they have been sysprepped. |
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)
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 understand. I will soon make another PR to update this doc entry
This has been released in version 2.17.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.17.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! |
Since the changes on
azurerm_shared_image
has not been released yet, this should not be a breaking change. I suppose it could make more sense if we name this new attributespecialized
to emphasize when we are assigning a non-zero value to it, the image is specialized. Rather than previous behaviour that we assigngeneralized
tofalse
to indicate this is specialized.