diff --git a/internal/services/automation/automation_account_resource.go b/internal/services/automation/automation_account_resource.go index 8449ea619f2e..85ca31d8a467 100644 --- a/internal/services/automation/automation_account_resource.go +++ b/internal/services/automation/automation_account_resource.go @@ -86,7 +86,7 @@ func resourceAutomationAccount() *pluginsdk.Resource { "key_vault_key_id": { Type: pluginsdk.TypeString, - Required: true, + Optional: true, ValidateFunc: keyVaultValidate.NestedItemIdWithOptionalVersion, }, }, diff --git a/website/docs/r/automation_account.html.markdown b/website/docs/r/automation_account.html.markdown index a4baf617ae5d..9cd1ae69aa6e 100644 --- a/website/docs/r/automation_account.html.markdown +++ b/website/docs/r/automation_account.html.markdown @@ -72,7 +72,7 @@ An `encryption` block supports the following: * `key_source` - (Optional) The source of the encryption key. Possible values are `Microsoft.Automation` and `Microsoft.Keyvault`. -* `key_vault_key_id` - (Required) The ID of the Key Vault Key which should be used to Encrypt the data in this Automation Account. +* `key_vault_key_id` - (Optional) The ID of the Key Vault Key which should be used to Encrypt the data in this Automation Account. Required when `key_source` is set to `Microsoft.Keyvault`. ---