aztfexport icon indicating copy to clipboard operation
aztfexport copied to clipboard

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

Open msetogecko opened this issue 1 year ago • 2 comments

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

msetogecko avatar Feb 14 '24 16:02 msetogecko

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

stemaMSFT avatar Feb 16 '24 23:02 stemaMSFT

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.

stemaMSFT avatar Feb 16 '24 23:02 stemaMSFT

:wave:

Since we've not heard back here I'm going to close this issue for the moment. Feel free to reopen if still have questions.

magodo avatar Aug 09 '24 08:08 magodo