Vault Args
data class VaultArgs(val identity: Output<IdentityDataArgs>? = null, val location: Output<String>? = null, val properties: Output<VaultPropertiesArgs>? = null, val resourceGroupName: Output<String>? = null, val sku: Output<SkuArgs>? = null, val tags: Output<Map<String, String>>? = null, val vaultName: Output<String>? = null) : ConvertibleToJava<VaultArgs>
Resource information, as returned by the resource provider. API Version: 2021-01-01.
Example Usage
Create or Update Recovery Services vault
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var vault = new AzureNative.RecoveryServices.Vault("vault", new()
{
Identity = new AzureNative.RecoveryServices.Inputs.IdentityDataArgs
{
Type = "SystemAssigned",
},
Location = "West US",
Properties = null,
ResourceGroupName = "Default-RecoveryServices-ResourceGroup",
Sku = new AzureNative.RecoveryServices.Inputs.SkuArgs
{
Name = "Standard",
},
VaultName = "swaggerExample",
});
});
Content copied to clipboard
package main
import (
recoveryservices "github.com/pulumi/pulumi-azure-native-sdk/recoveryservices"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := recoveryservices.NewVault(ctx, "vault", &recoveryservices.VaultArgs{
Identity: &recoveryservices.IdentityDataArgs{
Type: pulumi.String("SystemAssigned"),
},
Location: pulumi.String("West US"),
Properties: nil,
ResourceGroupName: pulumi.String("Default-RecoveryServices-ResourceGroup"),
Sku: &recoveryservices.SkuArgs{
Name: pulumi.String("Standard"),
},
VaultName: pulumi.String("swaggerExample"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.recoveryservices.Vault;
import com.pulumi.azurenative.recoveryservices.VaultArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var vault = new Vault("vault", VaultArgs.builder()
.identity(Map.of("type", "SystemAssigned"))
.location("West US")
.properties()
.resourceGroupName("Default-RecoveryServices-ResourceGroup")
.sku(Map.of("name", "Standard"))
.vaultName("swaggerExample")
.build());
}
}
Content copied to clipboard
Create or Update Vault with CustomerManagedKeys
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var vault = new AzureNative.RecoveryServices.Vault("vault", new()
{
Identity = new AzureNative.RecoveryServices.Inputs.IdentityDataArgs
{
Type = "UserAssigned",
UserAssignedIdentities =
{
{ "/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi", null },
},
},
Location = "West US",
Properties = new AzureNative.RecoveryServices.Inputs.VaultPropertiesArgs
{
Encryption = new AzureNative.RecoveryServices.Inputs.VaultPropertiesEncryptionArgs
{
InfrastructureEncryption = "Enabled",
KekIdentity = new AzureNative.RecoveryServices.Inputs.CmkKekIdentityArgs
{
UserAssignedIdentity = "/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi",
},
KeyVaultProperties = new AzureNative.RecoveryServices.Inputs.CmkKeyVaultPropertiesArgs
{
KeyUri = "https://cmk2xkv.vault.azure.net/keys/Key1/0767b348bb1a4c07baa6c4ec0055d2b3",
},
},
},
ResourceGroupName = "Default-RecoveryServices-ResourceGroup",
Sku = new AzureNative.RecoveryServices.Inputs.SkuArgs
{
Name = "Standard",
},
VaultName = "swaggerExample",
});
});
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.recoveryservices.Vault;
import com.pulumi.azurenative.recoveryservices.VaultArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var vault = new Vault("vault", VaultArgs.builder()
.identity(Map.ofEntries(
Map.entry("type", "UserAssigned"),
Map.entry("userAssignedIdentities", Map.of("/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi", ))
))
.location("West US")
.properties(Map.of("encryption", Map.ofEntries(
Map.entry("infrastructureEncryption", "Enabled"),
Map.entry("kekIdentity", Map.of("userAssignedIdentity", "/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi")),
Map.entry("keyVaultProperties", Map.of("keyUri", "https://cmk2xkv.vault.azure.net/keys/Key1/0767b348bb1a4c07baa6c4ec0055d2b3"))
)))
.resourceGroupName("Default-RecoveryServices-ResourceGroup")
.sku(Map.of("name", "Standard"))
.vaultName("swaggerExample")
.build());
}
}
Content copied to clipboard
Create or Update Vault with User Assigned Identity
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var vault = new AzureNative.RecoveryServices.Vault("vault", new()
{
Identity = new AzureNative.RecoveryServices.Inputs.IdentityDataArgs
{
Type = "UserAssigned",
UserAssignedIdentities =
{
{ "/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi", null },
},
},
Location = "West US",
Properties = null,
ResourceGroupName = "Default-RecoveryServices-ResourceGroup",
Sku = new AzureNative.RecoveryServices.Inputs.SkuArgs
{
Name = "Standard",
},
VaultName = "swaggerExample",
});
});
Content copied to clipboard
package main
import (
recoveryservices "github.com/pulumi/pulumi-azure-native-sdk/recoveryservices"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := recoveryservices.NewVault(ctx, "vault", &recoveryservices.VaultArgs{
Identity: &recoveryservices.IdentityDataArgs{
Type: pulumi.String("UserAssigned"),
UserAssignedIdentities: pulumi.AnyMap{
"/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi": nil,
},
},
Location: pulumi.String("West US"),
Properties: nil,
ResourceGroupName: pulumi.String("Default-RecoveryServices-ResourceGroup"),
Sku: &recoveryservices.SkuArgs{
Name: pulumi.String("Standard"),
},
VaultName: pulumi.String("swaggerExample"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.recoveryservices.Vault;
import com.pulumi.azurenative.recoveryservices.VaultArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var vault = new Vault("vault", VaultArgs.builder()
.identity(Map.ofEntries(
Map.entry("type", "UserAssigned"),
Map.entry("userAssignedIdentities", Map.of("/subscriptions/85bf5e8c-3084-4f42-add2-746ebb7e97b2/resourcegroups/defaultrg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplemsi", ))
))
.location("West US")
.properties()
.resourceGroupName("Default-RecoveryServices-ResourceGroup")
.sku(Map.of("name", "Standard"))
.vaultName("swaggerExample")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:recoveryservices:Vault swaggerExample /subscriptions/77777777-b0c6-47a2-b37c-d8e65a629c18/resourceGroups/Default-RecoveryServices-ResourceGroup/providers/Microsoft.RecoveryServices/vaults/swaggerExample
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(identity: Output<IdentityDataArgs>? = null, location: Output<String>? = null, properties: Output<VaultPropertiesArgs>? = null, resourceGroupName: Output<String>? = null, sku: Output<SkuArgs>? = null, tags: Output<Map<String, String>>? = null, vaultName: Output<String>? = null)