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

New Resource: azurerm_arc_machine_automanage_configuration_assignment #26657

Merged
merged 16 commits into from
Sep 13, 2024

Conversation

liuwuliuyun
Copy link
Contributor

@liuwuliuyun liuwuliuyun commented Jul 17, 2024

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

Swagger Link: https://github.com/Azure/azure-rest-api-specs/blob/34cb052b55b126a7447df9bc2d32e4185529400c/specification/automanage/resource-manager/Microsoft.Automanage/stable/2022-05-04/automanage.json#L1358-L1535

Docs: https://learn.microsoft.com/en-us/azure/automanage/automanage-arc

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)

Testing evidence:

Note

For a successful test of this resource, locate "Automanage API Access" (appId: d828acde-4b48-47f5-a6e8-52460104a052) within your Entra ID tenant. Make sure it's granted access to the scope that includes the arc server.

=== RUN   TestAccArcMachineConfigurationAssignment_basic
=== PAUSE TestAccArcMachineConfigurationAssignment_basic
=== CONT  TestAccArcMachineConfigurationAssignment_basic
--- PASS: TestAccArcMachineConfigurationAssignment_basic (475.28s)
PASS


Process finished with the exit code 0

=== RUN   TestAccArcMachineConfigurationAssignment_requireImport
=== PAUSE TestAccArcMachineConfigurationAssignment_requireImport
=== CONT  TestAccArcMachineConfigurationAssignment_requireImport
--- PASS: TestAccArcMachineConfigurationAssignment_requireImport (488.56s)
PASS


Process finished with the exit code 0

Change Log

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

This is a (please select all that apply):

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

@liuwuliuyun
Copy link
Contributor Author

The deprecation warning for os.Getenv arises because we're simulating an Azure Linux VM as an Azure Hybrid Compute Machine. For the connection via Terraform, a service principal is essential; otherwise, an interactive login is needed, which would halt the testing process.

@liuwuliuyun
Copy link
Contributor Author

Based on my findings, the method that employs a service principal (which includes a client_secret) lacks a corresponding technique when using managed identity. Therefore, it's necessary to use os.Getenv to make test running.

@liuwuliuyun liuwuliuyun marked this pull request as ready for review July 18, 2024 02:39
@liuwuliuyun
Copy link
Contributor Author

liuwuliuyun commented Jul 19, 2024

In order to pass the PR checks, I manually removed test cases and mark test as skip. I will use the compiled version of AzureRM provider of this branch to test and show the test results.

Testing Script

Testing Logs in CMD

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 63f1f5d into hashicorp:main Sep 13, 2024
70 checks passed
katbyte added a commit that referenced this pull request Sep 13, 2024
@liuwuliuyun liuwuliuyun deleted the automanage_arc_machine_assignment branch September 19, 2024 06:52
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 20, 2024
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.

4 participants