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

Support for managed identity in azurerm_automation_account resource #15072

Merged
merged 6 commits into from
Feb 4, 2022
Merged

Support for managed identity in azurerm_automation_account resource #15072

merged 6 commits into from
Feb 4, 2022

Conversation

damienpontifex
Copy link
Contributor

  • Adopt 2020-01-13-preview API version of automation that has identity
    within it
  • Update enum names that were changed with the API version update
  • Follow identity block pattern from other resources within this repo
  • Update documentation to include identity block capability

Relates to #11503

@damienpontifex damienpontifex changed the title Support for managed identity in azurerm_automation_account resource Support for managed identity in azurerm_automation_account resource Jan 22, 2022
@tombuildsstuff tombuildsstuff self-assigned this Feb 2, 2022
katbyte
katbyte previously requested changes Feb 4, 2022
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.

Hi @damienpontifex - thanks for the PR. Running the tests for this and it appears we have a number of test failures:

------- Stdout: -------
=== RUN   TestAccAutomationAccount_complete
=== PAUSE TestAccAutomationAccount_complete
=== CONT  TestAccAutomationAccount_complete
    testcase.go:110: Step 1/2 error: Error running pre-apply refresh: exit status 1
        
        Error: Insufficient identity blocks
        
          on terraform_plugin_test.tf line 11, in resource "azurerm_automation_account" "test":
          11: resource "azurerm_automation_account" "test" {
        
        At least 1 "identity" blocks are required.
--- FAIL: TestAccAutomationAccount_complete (18.42s)
FAIL

- Adopt 2020-01-13-preview API version of automation that has identity
  within it
- Update enum names that were changed with the API version update
- Follow identity block pattern from other resources within this repo
- Update documentation to include identity block capability
@@ -71,10 +73,104 @@ func resourceAutomationAccount() *pluginsdk.Resource {
Type: pluginsdk.TypeString,
Computed: true,
},

"identity": {
Copy link
Contributor

Choose a reason for hiding this comment

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

hey @damienpontifex

Thanks for this PR - apologies for the delayed review on this one - I'm currently working through the provider to make the identity blocks consistent as a part of #15187, as such I hope you don't mind but I'm going to push a couple of commits to update this to use the Common Schema for Identity so that this is consistent with that.

Thanks!

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 would never mind @tombuildsstuff :) In this together to make things awesome, so I appreciate your input to make this consistent and shippable.
Thanks for the commits and ongoing work here 👏🏻

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 @damienpontifex

Thanks again for this PR - apologies for the delayed review.

As mentioned earlier we're currently working through usages of the identity block to make these behaviourally consistent for 3.0 which is being tracked in #15187.

I've taken a look through and left one minor comment in addition to the identity changes, as such I hope you don't mind but I'm going to push a commit to fix that so that we can get this merged 👍

Thanks!

website/docs/r/automation_account.html.markdown Outdated Show resolved Hide resolved
@tombuildsstuff tombuildsstuff dismissed katbyte’s stale review February 4, 2022 16:10

dismissing since changes have been pushed

@tombuildsstuff tombuildsstuff added this to the v2.96.0 milestone Feb 4, 2022
…identity

Turns out you can't create an Identity with Type: None but you can update it that way
Copy link
Member

@mbfrahry mbfrahry left a comment

Choose a reason for hiding this comment

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

LGTM!

@mbfrahry mbfrahry merged commit 391be5b into hashicorp:main Feb 4, 2022
mbfrahry added a commit that referenced this pull request Feb 4, 2022
@damienpontifex damienpontifex deleted the automation-account-identity branch February 5, 2022 00:42
@github-actions
Copy link

This functionality has been released in v2.96.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 Mar 14, 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.

5 participants