Azure / aztfexport

A tool to bring existing Azure resources under Terraform's management
https://azure.github.io/aztfexport/
Mozilla Public License 2.0
1.53k stars 174 forks source link

The argument "password" is required, but no definition was found #502

Open msetogecko opened 4 months ago

msetogecko commented 4 months ago

On this part of main.tf ::

resource "azurerm_automation_credential" "res-18" { automation_account_name = "my_aa_account_name" name = "LogAnalyticsWorkspace-Key" resource_group_name = "my_aa_rg_name" username = "LogAnalyticsWorkspace-Key" depends_on = [ azurerm_automation_account.res-13, ] }

Getting this error during terraform plan

stemaMSFT commented 4 months ago

Hey @msetogecko did you post the error? Not seeing an error message or sccreenshot.

stemaMSFT commented 4 months ago

Without looking at the error, my guess is that you will need to set/define the password definition yourself. As the documentation states here: https://learn.microsoft.com/en-us/azure/developer/terraform/azure-export-for-terraform/export-terraform-concepts#write-only-properties

Certain properties within AzureRM are write-only and aren't included in the generated code that Azure Export for Terraform creates. The issue is addressed by defining the property after exporting to HCL code.

This is likely the error you're facing with the password property.