hashicorp / pandora

A suite of single-purpose tools enabling automation for Terraform/Azure
Mozilla Public License 2.0
69 stars 50 forks source link

for azurerm_load_test identity - update documentation - input a block not a string & extend to allow UserAssigned #2270

Closed sharccc closed 1 year ago

sharccc commented 1 year ago

documentation is currently missing some readability details - input for identity should be a block containing type.

https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/load_test

currently:

should be:

* `identity` - (Optional) An `identity` block as defined below.
---
An `identity` block supports the following:
* `type` - (Required) The type of Managed Identity used for this Load Test. Possible values are `SystemAssigned`.

also requesting the identity aligns with AzureRM template and accepts both types of Managed Identities

type | Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). identity_ids | The set of user assigned identities associated with the resource. etc https://learn.microsoft.com/en-us/azure/templates/microsoft.loadtestservice/loadtests?pivots=deployment-language-terraform

(as an example) There is a similar identity block available for AzureRM Automation Account - allowing 3 options:

An identity block supports the following: type - (Required) The type of identity used for this Automation Account. Possible values are SystemAssigned, UserAssigned and SystemAssigned, UserAssigned. identity_ids- (Optional) The ID of the User Assigned Identity which should be assigned to this Automation Account. Note: identity_ids is required when type is set to UserAssigned or SystemAssigned, UserAssigned. https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/automation_account

support case 104926 also feature request 1204255964099438

thanks - Sharon (HashiCorp Terraform Support)

tombuildsstuff commented 1 year ago

Digging into this one, this appears to be a larger issue in that we're not outputting the documentation for nested blocks, in addition to misidentifying identity as a field rather than a block - will open a PR to fix both, which'll fix this issue.

tombuildsstuff commented 1 year ago

FWIW support for User Assigned Identities is available in the next API Version, which there's a few remaining items to unblock, I'm going to re-focus this issue on the docs side and I've split out a separate issue for updating the API Version here (for which there's a few blockers): https://github.com/hashicorp/pandora/issues/2549