All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.appconfiguration.ConfigurationStore Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.

There is a newer version: 6.10.0-alpha.1731737215
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.appconfiguration;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.appconfiguration.ConfigurationStoreArgs;
import com.pulumi.azure.appconfiguration.inputs.ConfigurationStoreState;
import com.pulumi.azure.appconfiguration.outputs.ConfigurationStoreEncryption;
import com.pulumi.azure.appconfiguration.outputs.ConfigurationStoreIdentity;
import com.pulumi.azure.appconfiguration.outputs.ConfigurationStorePrimaryReadKey;
import com.pulumi.azure.appconfiguration.outputs.ConfigurationStorePrimaryWriteKey;
import com.pulumi.azure.appconfiguration.outputs.ConfigurationStoreReplica;
import com.pulumi.azure.appconfiguration.outputs.ConfigurationStoreSecondaryReadKey;
import com.pulumi.azure.appconfiguration.outputs.ConfigurationStoreSecondaryWriteKey;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.appconfiguration.ConfigurationStore;
 * import com.pulumi.azure.appconfiguration.ConfigurationStoreArgs;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 * 
 *         var appconf = new ConfigurationStore("appconf", ConfigurationStoreArgs.builder()
 *             .name("appConf1")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ### Encryption) * * <!--Start PulumiCodeChooser --> *
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.authorization.UserAssignedIdentity;
 * import com.pulumi.azure.authorization.UserAssignedIdentityArgs;
 * import com.pulumi.azure.core.CoreFunctions;
 * import com.pulumi.azure.keyvault.KeyVault;
 * import com.pulumi.azure.keyvault.KeyVaultArgs;
 * import com.pulumi.azure.keyvault.AccessPolicy;
 * import com.pulumi.azure.keyvault.AccessPolicyArgs;
 * import com.pulumi.azure.keyvault.Key;
 * import com.pulumi.azure.keyvault.KeyArgs;
 * import com.pulumi.azure.appconfiguration.ConfigurationStore;
 * import com.pulumi.azure.appconfiguration.ConfigurationStoreArgs;
 * import com.pulumi.azure.appconfiguration.inputs.ConfigurationStoreIdentityArgs;
 * import com.pulumi.azure.appconfiguration.inputs.ConfigurationStoreEncryptionArgs;
 * import com.pulumi.azure.appconfiguration.inputs.ConfigurationStoreReplicaArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 * 
 *         var exampleUserAssignedIdentity = new UserAssignedIdentity("exampleUserAssignedIdentity", UserAssignedIdentityArgs.builder()
 *             .name("example-identity")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .build());
 * 
 *         final var current = CoreFunctions.getClientConfig();
 * 
 *         var exampleKeyVault = new KeyVault("exampleKeyVault", KeyVaultArgs.builder()
 *             .name("exampleKVt123")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
 *             .skuName("standard")
 *             .softDeleteRetentionDays(7)
 *             .purgeProtectionEnabled(true)
 *             .build());
 * 
 *         var server = new AccessPolicy("server", AccessPolicyArgs.builder()
 *             .keyVaultId(exampleKeyVault.id())
 *             .tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
 *             .objectId(exampleUserAssignedIdentity.principalId())
 *             .keyPermissions(            
 *                 "Get",
 *                 "UnwrapKey",
 *                 "WrapKey")
 *             .secretPermissions("Get")
 *             .build());
 * 
 *         var client = new AccessPolicy("client", AccessPolicyArgs.builder()
 *             .keyVaultId(exampleKeyVault.id())
 *             .tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
 *             .objectId(current.applyValue(getClientConfigResult -> getClientConfigResult.objectId()))
 *             .keyPermissions(            
 *                 "Get",
 *                 "Create",
 *                 "Delete",
 *                 "List",
 *                 "Restore",
 *                 "Recover",
 *                 "UnwrapKey",
 *                 "WrapKey",
 *                 "Purge",
 *                 "Encrypt",
 *                 "Decrypt",
 *                 "Sign",
 *                 "Verify",
 *                 "GetRotationPolicy")
 *             .secretPermissions("Get")
 *             .build());
 * 
 *         var exampleKey = new Key("exampleKey", KeyArgs.builder()
 *             .name("exampleKVkey")
 *             .keyVaultId(exampleKeyVault.id())
 *             .keyType("RSA")
 *             .keySize(2048)
 *             .keyOpts(            
 *                 "decrypt",
 *                 "encrypt",
 *                 "sign",
 *                 "unwrapKey",
 *                 "verify",
 *                 "wrapKey")
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(                
 *                     client,
 *                     server)
 *                 .build());
 * 
 *         var exampleConfigurationStore = new ConfigurationStore("exampleConfigurationStore", ConfigurationStoreArgs.builder()
 *             .name("appConf2")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .sku("standard")
 *             .localAuthEnabled(true)
 *             .publicNetworkAccess("Enabled")
 *             .purgeProtectionEnabled(false)
 *             .softDeleteRetentionDays(1)
 *             .identity(ConfigurationStoreIdentityArgs.builder()
 *                 .type("UserAssigned")
 *                 .identityIds(exampleUserAssignedIdentity.id())
 *                 .build())
 *             .encryption(ConfigurationStoreEncryptionArgs.builder()
 *                 .keyVaultKeyIdentifier(exampleKey.id())
 *                 .identityClientId(exampleUserAssignedIdentity.clientId())
 *                 .build())
 *             .replicas(ConfigurationStoreReplicaArgs.builder()
 *                 .name("replica1")
 *                 .location("West US")
 *                 .build())
 *             .tags(Map.of("environment", "development"))
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(                
 *                     client,
 *                     server)
 *                 .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * App Configurations can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:appconfiguration/configurationStore:ConfigurationStore appconf /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.AppConfiguration/configurationStores/appConf1 * ``` * */ @ResourceType(type="azure:appconfiguration/configurationStore:ConfigurationStore") public class ConfigurationStore extends com.pulumi.resources.CustomResource { /** * An `encryption` block as defined below. * */ @Export(name="encryption", refs={ConfigurationStoreEncryption.class}, tree="[0]") private Output encryption; /** * @return An `encryption` block as defined below. * */ public Output> encryption() { return Codegen.optional(this.encryption); } /** * The URL of the App Configuration Replica. * */ @Export(name="endpoint", refs={String.class}, tree="[0]") private Output endpoint; /** * @return The URL of the App Configuration Replica. * */ public Output endpoint() { return this.endpoint; } /** * An `identity` block as defined below. * */ @Export(name="identity", refs={ConfigurationStoreIdentity.class}, tree="[0]") private Output identity; /** * @return An `identity` block as defined below. * */ public Output> identity() { return Codegen.optional(this.identity); } /** * Whether local authentication methods is enabled. Defaults to `true`. * */ @Export(name="localAuthEnabled", refs={Boolean.class}, tree="[0]") private Output localAuthEnabled; /** * @return Whether local authentication methods is enabled. Defaults to `true`. * */ public Output> localAuthEnabled() { return Codegen.optional(this.localAuthEnabled); } /** * Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. * */ public Output location() { return this.location; } /** * Specifies the name of the App Configuration. Changing this forces a new resource to be created. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Specifies the name of the App Configuration. Changing this forces a new resource to be created. * */ public Output name() { return this.name; } /** * A `primary_read_key` block as defined below containing the primary read access key. * */ @Export(name="primaryReadKeys", refs={List.class,ConfigurationStorePrimaryReadKey.class}, tree="[0,1]") private Output> primaryReadKeys; /** * @return A `primary_read_key` block as defined below containing the primary read access key. * */ public Output> primaryReadKeys() { return this.primaryReadKeys; } /** * A `primary_write_key` block as defined below containing the primary write access key. * */ @Export(name="primaryWriteKeys", refs={List.class,ConfigurationStorePrimaryWriteKey.class}, tree="[0,1]") private Output> primaryWriteKeys; /** * @return A `primary_write_key` block as defined below containing the primary write access key. * */ public Output> primaryWriteKeys() { return this.primaryWriteKeys; } /** * The Public Network Access setting of the App Configuration. Possible values are `Enabled` and `Disabled`. * * > **Note:** If `public_network_access` is not specified, the App Configuration will be created as `Automatic`. However, once a different value is defined, can not be set again as automatic. * */ @Export(name="publicNetworkAccess", refs={String.class}, tree="[0]") private Output publicNetworkAccess; /** * @return The Public Network Access setting of the App Configuration. Possible values are `Enabled` and `Disabled`. * * > **Note:** If `public_network_access` is not specified, the App Configuration will be created as `Automatic`. However, once a different value is defined, can not be set again as automatic. * */ public Output> publicNetworkAccess() { return Codegen.optional(this.publicNetworkAccess); } /** * Whether Purge Protection is enabled. This field only works for `standard` sku. Defaults to `false`. * * !> **Note:** Once Purge Protection has been enabled it's not possible to disable it. Deleting the App Configuration with Purge Protection enabled will schedule the App Configuration to be deleted (which will happen by Azure in the configured number of days). * */ @Export(name="purgeProtectionEnabled", refs={Boolean.class}, tree="[0]") private Output purgeProtectionEnabled; /** * @return Whether Purge Protection is enabled. This field only works for `standard` sku. Defaults to `false`. * * !> **Note:** Once Purge Protection has been enabled it's not possible to disable it. Deleting the App Configuration with Purge Protection enabled will schedule the App Configuration to be deleted (which will happen by Azure in the configured number of days). * */ public Output> purgeProtectionEnabled() { return Codegen.optional(this.purgeProtectionEnabled); } /** * One or more `replica` blocks as defined below. * */ @Export(name="replicas", refs={List.class,ConfigurationStoreReplica.class}, tree="[0,1]") private Output> replicas; /** * @return One or more `replica` blocks as defined below. * */ public Output>> replicas() { return Codegen.optional(this.replicas); } /** * The name of the resource group in which to create the App Configuration. Changing this forces a new resource to be created. * */ @Export(name="resourceGroupName", refs={String.class}, tree="[0]") private Output resourceGroupName; /** * @return The name of the resource group in which to create the App Configuration. Changing this forces a new resource to be created. * */ public Output resourceGroupName() { return this.resourceGroupName; } /** * A `secondary_read_key` block as defined below containing the secondary read access key. * */ @Export(name="secondaryReadKeys", refs={List.class,ConfigurationStoreSecondaryReadKey.class}, tree="[0,1]") private Output> secondaryReadKeys; /** * @return A `secondary_read_key` block as defined below containing the secondary read access key. * */ public Output> secondaryReadKeys() { return this.secondaryReadKeys; } /** * A `secondary_write_key` block as defined below containing the secondary write access key. * */ @Export(name="secondaryWriteKeys", refs={List.class,ConfigurationStoreSecondaryWriteKey.class}, tree="[0,1]") private Output> secondaryWriteKeys; /** * @return A `secondary_write_key` block as defined below containing the secondary write access key. * */ public Output> secondaryWriteKeys() { return this.secondaryWriteKeys; } /** * The SKU name of the App Configuration. Possible values are `free` and `standard`. Defaults to `free`. * * > **Note:** Azure does not allow a downgrade from `standard` to `free`. * */ @Export(name="sku", refs={String.class}, tree="[0]") private Output sku; /** * @return The SKU name of the App Configuration. Possible values are `free` and `standard`. Defaults to `free`. * * > **Note:** Azure does not allow a downgrade from `standard` to `free`. * */ public Output> sku() { return Codegen.optional(this.sku); } /** * The number of days that items should be retained for once soft-deleted. This field only works for `standard` sku. This value can be between `1` and `7` days. Defaults to `7`. Changing this forces a new resource to be created. * * > **Note:** If Purge Protection is enabled, this field can only be configured one time and cannot be updated. * */ @Export(name="softDeleteRetentionDays", refs={Integer.class}, tree="[0]") private Output softDeleteRetentionDays; /** * @return The number of days that items should be retained for once soft-deleted. This field only works for `standard` sku. This value can be between `1` and `7` days. Defaults to `7`. Changing this forces a new resource to be created. * * > **Note:** If Purge Protection is enabled, this field can only be configured one time and cannot be updated. * */ public Output> softDeleteRetentionDays() { return Codegen.optional(this.softDeleteRetentionDays); } /** * A mapping of tags to assign to the resource. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return A mapping of tags to assign to the resource. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * * @param name The _unique_ name of the resulting resource. */ public ConfigurationStore(java.lang.String name) { this(name, ConfigurationStoreArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ConfigurationStore(java.lang.String name, ConfigurationStoreArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public ConfigurationStore(java.lang.String name, ConfigurationStoreArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:appconfiguration/configurationStore:ConfigurationStore", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ConfigurationStore(java.lang.String name, Output id, @Nullable ConfigurationStoreState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:appconfiguration/configurationStore:ConfigurationStore", name, state, makeResourceOptions(options, id), false); } private static ConfigurationStoreArgs makeArgs(ConfigurationStoreArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ConfigurationStoreArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static ConfigurationStore get(java.lang.String name, Output id, @Nullable ConfigurationStoreState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ConfigurationStore(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy