com.pulumi.azure.containerapp.CustomDomain Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure Show documentation
Show all versions of azure Show documentation
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.
// *** 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.containerapp;
import com.pulumi.azure.Utilities;
import com.pulumi.azure.containerapp.CustomDomainArgs;
import com.pulumi.azure.containerapp.inputs.CustomDomainState;
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.String;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Manages a Container App Custom Domain.
*
* ## Example Usage
*
* <!--Start PulumiCodeChooser -->
* <!--End PulumiCodeChooser -->
*
* ### Managed Certificate
*
* <!--Start PulumiCodeChooser -->
*
* {@code
* package generated_program;
*
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.azure.containerapp.CustomDomain;
* import com.pulumi.azure.containerapp.CustomDomainArgs;
* 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 CustomDomain("example", CustomDomainArgs.builder()
* .name(StdFunctions.trimprefix(TrimprefixArgs.builder()
* .input(exampleAzurermDnsTxtRecord.fqdn())
* .prefix("asuid.")
* .build()).result())
* .containerAppId(exampleAzurermContainerApp.id())
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* A Container App Custom Domain can be imported using the `resource id`, e.g.
*
* ```sh
* $ pulumi import azure:containerapp/customDomain:CustomDomain example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.App/containerApps/myContainerApp/customDomainName/mycustomdomain.example.com"
* ```
*
*/
@ResourceType(type="azure:containerapp/customDomain:CustomDomain")
public class CustomDomain extends com.pulumi.resources.CustomResource {
/**
* The Binding type. Possible values include `Disabled` and `SniEnabled`.
*
*/
@Export(name="certificateBindingType", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> certificateBindingType;
/**
* @return The Binding type. Possible values include `Disabled` and `SniEnabled`.
*
*/
public Output> certificateBindingType() {
return Codegen.optional(this.certificateBindingType);
}
/**
* The ID of the Container App Environment Certificate to use. Changing this forces a new resource to be created.
*
* > **NOTE:** Omit this value if you wish to use an Azure Managed certificate. You must create the relevant DNS verification steps before this process will be successful.
*
*/
@Export(name="containerAppEnvironmentCertificateId", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> containerAppEnvironmentCertificateId;
/**
* @return The ID of the Container App Environment Certificate to use. Changing this forces a new resource to be created.
*
* > **NOTE:** Omit this value if you wish to use an Azure Managed certificate. You must create the relevant DNS verification steps before this process will be successful.
*
*/
public Output> containerAppEnvironmentCertificateId() {
return Codegen.optional(this.containerAppEnvironmentCertificateId);
}
/**
* The ID of the Container App Environment Managed Certificate to use.
*
*/
@Export(name="containerAppEnvironmentManagedCertificateId", refs={String.class}, tree="[0]")
private Output containerAppEnvironmentManagedCertificateId;
/**
* @return The ID of the Container App Environment Managed Certificate to use.
*
*/
public Output containerAppEnvironmentManagedCertificateId() {
return this.containerAppEnvironmentManagedCertificateId;
}
/**
* The ID of the Container App to which this Custom Domain should be bound. Changing this forces a new resource to be created.
*
*/
@Export(name="containerAppId", refs={String.class}, tree="[0]")
private Output containerAppId;
/**
* @return The ID of the Container App to which this Custom Domain should be bound. Changing this forces a new resource to be created.
*
*/
public Output containerAppId() {
return this.containerAppId;
}
/**
* The fully qualified name of the Custom Domain. Must be the CN or a named SAN in the certificate specified by the `container_app_environment_certificate_id`. Changing this forces a new resource to be created.
*
* > **Note:** The Custom Domain verification TXT record requires a prefix of `asuid.`, however, this must be trimmed from the `name` property here. See the [official docs](https://learn.microsoft.com/en-us/azure/container-apps/custom-domains-certificates) for more information.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The fully qualified name of the Custom Domain. Must be the CN or a named SAN in the certificate specified by the `container_app_environment_certificate_id`. Changing this forces a new resource to be created.
*
* > **Note:** The Custom Domain verification TXT record requires a prefix of `asuid.`, however, this must be trimmed from the `name` property here. See the [official docs](https://learn.microsoft.com/en-us/azure/container-apps/custom-domains-certificates) for more information.
*
*/
public Output name() {
return this.name;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public CustomDomain(java.lang.String name) {
this(name, CustomDomainArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public CustomDomain(java.lang.String name, CustomDomainArgs 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 CustomDomain(java.lang.String name, CustomDomainArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:containerapp/customDomain:CustomDomain", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private CustomDomain(java.lang.String name, Output id, @Nullable CustomDomainState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:containerapp/customDomain:CustomDomain", name, state, makeResourceOptions(options, id), false);
}
private static CustomDomainArgs makeArgs(CustomDomainArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? CustomDomainArgs.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 CustomDomain get(java.lang.String name, Output id, @Nullable CustomDomainState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new CustomDomain(name, id, state, options);
}
}