Skip to content

Azure Key Vault policy requirements #245

@pejuborg

Description

@pejuborg

Question about Azure Key Vault secrets

When I try to create a new secret in an Azure Key Vault using Set-Secret I don't know how to provide information about values that are enforced by Azure Policy.

When using the Set-AzKeyVaultSecret cmdlet from Az.KeyVault all works fine.

I have to run it like this
Set-AzKeyVaultSecret -VaultName vault -Name "test" -Expires ((get-date).AddDays(88)) -SecretValue (ConvertTo-SecureString "xxx" -AsPlainText -Force) -ContentType 'txt'

Is it possible to do this with Set-Secret or should Set-AzKeyVaultSecret be used?

Proposed technical implementation details (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions