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

azurerm_automation_software_update_configuration - fix windows update classification use a comma separate string #18539

Merged
merged 4 commits into from
Sep 29, 2022

Conversation

wuxu92
Copy link
Contributor

@wuxu92 wuxu92 commented Sep 27, 2022

swagger definition as a comma-separated string

"includedUpdateClassifications": {
  "description": "Update classification included in the software update configuration. A comma separated string with required values",
  "type": "string",
  "enum": [
  "Unclassified",

https://github.com/Azure/azure-rest-api-specs/blob/99977890f7a2e8cf9b4e229f452c1af7b30184e4/specification/automation/resource-manager/Microsoft.Automation/stable/2019-06-01/softwareUpdateConfiguration.json#L400

--- PASS: TestAccSoftwareUpdateConfiguration_basic (166.01s)
--- PASS: TestAccSoftwareUpdateConfiguration_update (125.49s)
--- PASS: TestAccSoftwareUpdateConfiguration_windows (160.53s)
PASS

Fixes: #18537

@@ -512,12 +513,20 @@ func (m SoftwareUpdateConfigurationResource) Arguments() map[string]*pluginsdk.S
"classification_included": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is supposed to be a list, and this property is misnamed can we deprecate this and create a new property classifications_included that takes a list and translates it to a CSV list for the api?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tried with a new property but we have to make it compatible with the deprecated one or there will be diff in the terraform plan. So I have to set both properties as Computed: true to ignore the diff. I don't think it's a so good solution. Is there better practice for this scenario?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes you will need to set both to computed, always set both, make them conflict, and the use the one that is set. that is the right way to deprecate.

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.

LGTM 🧄

@katbyte katbyte merged commit e93d987 into hashicorp:main Sep 29, 2022
@github-actions github-actions bot added this to the v3.25.0 milestone Sep 29, 2022
katbyte added a commit that referenced this pull request Sep 29, 2022
@github-actions
Copy link

This functionality has been released in v3.25.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 30, 2022
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.

azurerm_automation_software_update_configuration not accepting multiple update classifications
2 participants