terraform-provider-azurerm icon indicating copy to clipboard operation
terraform-provider-azurerm copied to clipboard

new resource `azurerm_stack_hci_deployment_setting`

Open teowa opened this issue 10 months ago • 4 comments

Community Note

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

Description

Azure Doc: https://learn.microsoft.com/en-us/azure-stack/hci/deploy/deployment-azure-resource-manager-template REST API: https://github.com/Azure/azure-rest-api-specs/blob/c4e661cdf92c8f579574008d0cd11874cc303da0/specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/stable/2024-01-01/deploymentSettings.json

PR Checklist

  • [x] I have followed the guidelines in our Contributing Documentation.
  • [x] I have checked to ensure there aren't other open Pull Requests for the same update/change.
  • [x] I have checked if my changes close any open issues. If so please include appropriate closing keywords below.
  • [x] 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.
  • [x] 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

Changes to existing Resource / Data Source

  • [x] I have added an explanation of what my changes do and why I'd like you to include them (This may be covered by linking to an issue above, but may benefit from additional explanation).
  • [x] I have written new tests for my resource or datasource changes & updated any relevent documentation.
  • [x] I have successfully run tests with my changes locally. If not, please provide details on testing challenges that prevented you running the tests.
  • [ ] (For changes that include a state migration only). I have manually tested the migration path between relevant versions of the provider.

Testing

  • [x] 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)

The test can only run on Windows Administrator PowerShell, and can only run based on a VM image customized to simulate Azure VM as a HCI host, since real Azure Stack HCI needs hardware to deploy.

test env:

$env:ARM_TEST_HCI_IMAGE_ID='/subscriptions/xxxx/resourceGroups/xxxx/providers/Microsoft.Compute/galleries/xxxx/images/xxxx/versions/xxxx'
$env:ARM_TEST_HCI_LOCAL_ADMIN_USER='xxxx'
$env:ARM_TEST_HCI_LOCAL_ADMIN_USER_PASSWORD='xxxx'
$env:ARM_TEST_HCI_DOMAIN_ADMIN_USER='xxxx'
$env:ARM_TEST_HCI_DOMAIN_ADMIN_USER_PASSWORD='xxxx'
$env:ARM_TEST_HCI_DEPLOYMENT_USER='xxxx'
$env:ARM_TEST_HCI_DEPLOYMENT_USER_PASSWORD=xxxx'

My local test:

>> go test -v .\internal\services\azurestackhci -run TestAccStackHCIDeploymentSetting_basic -timeout 24h
=== RUN   TestAccStackHCIDeploymentSetting_basic
=== PAUSE TestAccStackHCIDeploymentSetting_basic
=== CONT  TestAccStackHCIDeploymentSetting_basic
--- PASS: TestAccStackHCIDeploymentSetting_basic (11582.30s)
PASS
ok      github.com/hashicorp/terraform-provider-azurerm/internal/services/azurestackhci 18322.985s

Change Log

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

  • new resource azurerm_stack_hci_deployment_setting [GH-00000]

This is a (please select all that apply):

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

Related Issue(s)

Fixes #0000

[!NOTE] If this PR changes meaningfully during the course of review please update the title and description as required.

teowa avatar Apr 17 '24 05:04 teowa

local test result:

image

teowa avatar May 29 '24 07:05 teowa

image

teowa avatar Jun 19 '24 05:06 teowa

@ms-zhenhua is this pr ready for review or still being worked on and is a draft?

katbyte avatar Jun 21 '24 22:06 katbyte

@ms-zhenhua is this pr ready for review or still being worked on and is a draft?

Hi @katbyte, it's still in review. I will approve this PR when the review is complete.

ms-zhenhua avatar Jun 24 '24 00:06 ms-zhenhua

latest test results: image image

teowa avatar Aug 09 '24 05:08 teowa