Closed bastienfrancheteau closed 4 years ago
The resource already supports outputting the Primary Key/DSC Server Endpoint https://www.terraform.io/docs/providers/azurerm/r/automation_account.html
Is there a blocker for this? @tombuildsstuff
@bastienfrancheteau were you able to find another solution other than use powershell?
@tombuildsstuff does the GoSDK support this now, its been almost a year
It is available in powershell
PS C:\WINDOWS\system32> $data = Get-AzAutomationRegistrationInfo -ResourceGroupName resourcegroup -AutomationAccountName AutomationAccount
ResourceGroupName : resourcegroup
AutomationAccountName : AutomationAccount
PrimaryKey : PrimaryKey
SecondaryKey : SecondaryKey
Endpoint : https://cc-agentservice-prod-1.azure-automation.net/accounts/guid
It looks like this issue is resolved through the #4740 that @whytoe created. That should go out in 1.37.0 of the provider. Feel free to create a new issue if more work needs to be done here.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!
Community Note
When registering a VM as a DSC node, the Automation Account's key and DSC Registration URL values are required. These cannot be retrieved in Terraform. Creating an azurerm_automation_dsc_configuration_metadata module that returns these 2 values would enable us to dynamically register Azure VMs as DSC nodes.
Suggested name for new data source: azurerm_automation_dsc_configuration_metadata
Potential Terraform Configuration
References
0000