https://pulumi.com logo
#azure
Title
# azure
g

gray-baker-98982

03/03/2023, 10:44 AM
Is there a way to add a new version to a Secret in KeyVault? If I use azure-native.keyvault.Secret it throughs an error saying "cannot create already existing resource". Can't see anything that allows me to just add a new version
Copy code
var secret = new Secret($"keyname", new SecretArgs
        {
            Properties = new SecretPropertiesArgs
            {
                Attributes = new SecretAttributesArgs
                {
                    Enabled = true,
                },
                Value = "SecretValue",
            },
            SecretName = "keyname",
            ResourceGroupName = configResourceGroup.Name,
            VaultName = vault.Name,
        });
m

melodic-tomato-39005

03/03/2023, 5:03 PM
We don’t have that capability since Pulumi is mostly a control plane tool (managing Key Vaults) whereas as secrets inside a Key Vault are considered data plane. We provide the methods to create new secrets to make common scenarios easier. For further interaction with secrets you would use Azure’s client libraries.
g

gray-baker-98982

03/06/2023, 9:04 AM
OK thanks for that, will take that approach
6 Views