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

r\managed_disk: Add support for trusted_launch_enabled #13849

Merged
merged 3 commits into from
Oct 28, 2021

Conversation

myc2h6o
Copy link
Contributor

@myc2h6o myc2h6o commented Oct 22, 2021

  • Add support for https://docs.microsoft.com/en-us/rest/api/compute/disks/create-or-update#disksecurityprofile, which is part of the coverage tasks for managed_disk.
  • This property is part of the disk security profile, which can only be decided at creation time, and is used to specify whether to use trusted launch feature when using this disk as an OS disk.
  • It can only be set to TrustedLaunch, and requires create_option to be FromImage or Import
  • It can only be used with a gen2 image, in the new test case, UbuntuServer 18_04-LTS-gen2 is used as the image
  • Test Result:
    $ TF_ACC=1 go test -v ./internal/services/compute -run=TestAccAzureRMManagedDisk_create_withTrustedLaunchEnabled -timeout 60m -ldflags="-X=github.com/hashicorp/terraform-provider-azurerm/version.ProviderVersion=acc"
    === RUN TestAccAzureRMManagedDisk_create_withTrustedLaunchEnabled
    === PAUSE TestAccAzureRMManagedDisk_create_withTrustedLaunchEnabled
    === CONT TestAccAzureRMManagedDisk_create_withTrustedLaunchEnabled
    --- PASS: TestAccAzureRMManagedDisk_create_withTrustedLaunchEnabled (333.34s)
    PASS
    ok github.com/hashicorp/terraform-provider-azurerm/internal/services/compute 334.051s

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hey @myc2h6o

Thanks for this PR.

I've taken a look through and left a few comments inline - if we can fix those up then we should be good to go 👍

Thanks!

internal/services/compute/managed_disk_resource.go Outdated Show resolved Hide resolved
internal/services/compute/managed_disk_resource.go Outdated Show resolved Hide resolved
website/docs/r/managed_disk.html.markdown Outdated Show resolved Hide resolved
internal/services/compute/managed_disk_resource.go Outdated Show resolved Hide resolved
internal/services/compute/managed_disk_resource.go Outdated Show resolved Hide resolved
@myc2h6o
Copy link
Contributor Author

myc2h6o commented Oct 27, 2021

@tombuildsstuff thanks for reviewing the change! I've update the pr according to your suggestions. Please take another look.

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 @myc2h6o - LGTM 🙌

@katbyte katbyte merged commit d655f9c into hashicorp:main Oct 28, 2021
katbyte added a commit that referenced this pull request Oct 28, 2021
@myc2h6o myc2h6o deleted the disk_security_profile branch October 28, 2021 04:53
@myc2h6o myc2h6o changed the title r\managed_disk: Add support for security_type r\managed_disk: Add support for trusted_launch_enabled Oct 28, 2021
@github-actions
Copy link

This functionality has been released in v2.83.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 Nov 28, 2021
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.

3 participants