Skip to content

Update desktopvirtualization API to 2024-04-03#28771

Merged
sreallymatt merged 4 commits intohashicorp:mainfrom
sinbai:desktopvirtuallization/api_upgrade
Feb 26, 2025
Merged

Update desktopvirtualization API to 2024-04-03#28771
sreallymatt merged 4 commits intohashicorp:mainfrom
sinbai:desktopvirtuallization/api_upgrade

Conversation

@sinbai
Copy link
Contributor

@sinbai sinbai commented Feb 14, 2025

Community Note

  • Please vote on this PR by adding a 👍 reaction to the original PR to help the community and maintainers prioritize for review
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for PR followers and do not help prioritize for review

Description

Update desktopvirtualization API to 2024-04-03.

PR Checklist

  • I have followed the guidelines in our Contributing Documentation.
  • I have checked to ensure there aren't other open Pull Requests for the same update/change.
  • I have checked if my changes close any open issues. If so please include appropriate closing keywords below.
  • I have updated/added Documentation as required written in a helpful and kind way to assist users that may be unfamiliar with the resource / data source.
  • I have used a meaningful PR title to help maintainers and other users understand this change and help prevent duplicate work.
    For example: “resource_name_here - description of change e.g. adding property new_property_name_here

Testing

  • My submission includes Test coverage as described in the Contribution Guide and the tests pass. (if this is not possible for any reason, please include details of why you did or could not add test coverage)

image

Change Log

Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.

  • desktopvirtualization - update api to 2024-04-03

This is a (please select all that apply):

  • Bug Fix
  • New Feature (ie adding a service, resource, or data source)
  • Enhancement
  • Breaking Change

@sinbai sinbai changed the title Upgrade desktopvirtualization API to 2024-04-03 Update desktopvirtualization API to 2024-04-03 Feb 14, 2025
@sinbai sinbai marked this pull request as ready for review February 14, 2025 08:58
@sinbai sinbai requested a review from a team as a code owner February 14, 2025 08:58
Copy link
Collaborator

@sreallymatt sreallymatt 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 this PR @sinbai, I've left a few comments inline if you wouldn't mind taking a look!

state.ApplicationGroupName = id.ApplicationGroupName
state.ResourceGroupName = id.ResourceGroupName
state.Location = location.NormalizeNilable(model.Location)
state.Location = location.NormalizeNilable(&model.Location)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
state.Location = location.NormalizeNilable(&model.Location)
state.Location = location.Normalize(model.Location)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.


if model := resp.Model; model != nil {
d.Set("location", location.NormalizeNilable(model.Location))
d.Set("location", location.NormalizeNilable(&model.Location))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
d.Set("location", location.NormalizeNilable(&model.Location))
d.Set("location", location.Normalize(model.Location))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.


if model := resp.Model; model != nil {
d.Set("location", location.NormalizeNilable(model.Location))
d.Set("location", location.NormalizeNilable(&model.Location))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
d.Set("location", location.NormalizeNilable(&model.Location))
d.Set("location", location.Normalize(model.Location))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.


if model := resp.Model; model != nil {
d.Set("location", location.NormalizeNilable(model.Location))
d.Set("location", location.NormalizeNilable(&model.Location))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
d.Set("location", location.NormalizeNilable(&model.Location))
d.Set("location", location.Normalize(model.Location))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.


hostPoolStr := hostPoolId.ID()
if scalingPlanHostPoolAssociationExists(model.Properties, hostPoolStr) {
if scalingPlanHostPoolAssociationExists(&model.Properties, hostPoolStr) {
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 update scalingPlanHostPoolAssociationExists to accept a value rather than a pointer instead of passing the address here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

if model := scalingPlan.Model; model != nil {
hostPoolId := id.HostPool.ID()
exists := scalingPlanHostPoolAssociationExists(model.Properties, hostPoolId)
exists := scalingPlanHostPoolAssociationExists(&model.Properties, hostPoolId)
Copy link
Collaborator

@sreallymatt sreallymatt Feb 25, 2025

Choose a reason for hiding this comment

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

Same comment as above regarding updating scalingPlanHostPoolAssociationExists

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

}
model := *existing.Model
if !scalingPlanHostPoolAssociationExists(model.Properties, id.HostPool.ID()) {
if !scalingPlanHostPoolAssociationExists(&model.Properties, id.HostPool.ID()) {
Copy link
Collaborator

@sreallymatt sreallymatt Feb 25, 2025

Choose a reason for hiding this comment

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

Same comment as above regarding updating scalingPlanHostPoolAssociationExists

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

d.Set("schedule", flattenScalingPlanSchedule(props.Schedules))
d.Set("host_pool", flattenScalingHostpoolReference(props.HostPoolReferences))
}
d.Set("location", location.NormalizeNilable(&model.Location))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
d.Set("location", location.NormalizeNilable(&model.Location))
d.Set("location", location.Normalize(model.Location))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

}

state.Location = location.NormalizeNilable(model.Location)
state.Location = location.NormalizeNilable(&model.Location)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
state.Location = location.NormalizeNilable(&model.Location)
state.Location = location.Normalize(model.Location)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.


if model := resp.Model; model != nil {
d.Set("location", location.NormalizeNilable(model.Location))
d.Set("location", location.NormalizeNilable(&model.Location))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
d.Set("location", location.NormalizeNilable(&model.Location))
d.Set("location", location.Normalize(model.Location))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@sinbai
Copy link
Contributor Author

sinbai commented Feb 26, 2025

Thanks for this PR @sinbai, I've left a few comments inline if you wouldn't mind taking a look!

Hi @sreallymatt thanks for your detailed feedback. I have updated the code. Could you please take another look?

Copy link
Collaborator

@sreallymatt sreallymatt left a comment

Choose a reason for hiding this comment

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

Thanks @sinbai, LGTM!

@sreallymatt sreallymatt merged commit 928a53d into hashicorp:main Feb 26, 2025
30 checks passed
@github-actions github-actions bot added this to the v4.21.0 milestone Feb 26, 2025
sreallymatt added a commit that referenced this pull request Feb 26, 2025
jackofallops added a commit that referenced this pull request Feb 27, 2025
* Update CHANGELOG.md for #28840

* Update CHANGELOG.md #28808

* Update CHANGELOG.md #27962

* Update CHANGELOG.md for #28859

* Update for #28825

* Update CHANGELOG.md for #28864

* Update CHANGELOG.md #28539

* Update CHANGELOG.md #28685

* Update CHANGELOG.md for #28818

* Update for #28857 #28799 #28856

* Update for #28122

* Update for #28248 #27805

* Update for #28853

* Update for #28316 #28494 #28696

* Update for #28754

* Update CHANGELOG.md #28771

* Update CHANGELOG.md #28842

* Update for #28879

* Update for #28199

* Update CHANGELOG.md #28862

* prep for release v4.21.0

---------

Co-authored-by: sreallymatt <106555974+sreallymatt@users.noreply.github.com>
Co-authored-by: Wodans Son <20408400+WodansSon@users.noreply.github.com>
Co-authored-by: stephybun <steph@hashicorp.com>
Co-authored-by: catriona-m <86247157+catriona-m@users.noreply.github.com>
Co-authored-by: Matthew Frahry <mbfrahry@gmail.com>
Co-authored-by: Wyatt Fry <wyattfry@gmail.com>
@github-actions
Copy link
Contributor

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 Mar 29, 2025
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.

2 participants