1. Packages
  2. Azure Classic
  3. API Docs
  4. containerapp
  5. EnvironmentCustomDomain

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

azure.containerapp.EnvironmentCustomDomain

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi

    Manages a Container App Environment Custom Domain Suffix.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    import * as std from "@pulumi/std";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const exampleAnalyticsWorkspace = new azure.operationalinsights.AnalyticsWorkspace("example", {
        name: "acctest-01",
        location: example.location,
        resourceGroupName: example.name,
        sku: "PerGB2018",
        retentionInDays: 30,
    });
    const exampleEnvironment = new azure.containerapp.Environment("example", {
        name: "my-environment",
        location: example.location,
        resourceGroupName: example.name,
        logAnalyticsWorkspaceId: exampleAnalyticsWorkspace.id,
    });
    const exampleEnvironmentCustomDomain = new azure.containerapp.EnvironmentCustomDomain("example", {
        containerAppEnvironmentId: exampleEnvironment.id,
        certificateBlobBase64: std.filebase64({
            input: "testacc.pfx",
        }).then(invoke => invoke.result),
        certificatePassword: "TestAcc",
        dnsSuffix: "acceptancetest.contoso.com",
    });
    
    import pulumi
    import pulumi_azure as azure
    import pulumi_std as std
    
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    example_analytics_workspace = azure.operationalinsights.AnalyticsWorkspace("example",
        name="acctest-01",
        location=example.location,
        resource_group_name=example.name,
        sku="PerGB2018",
        retention_in_days=30)
    example_environment = azure.containerapp.Environment("example",
        name="my-environment",
        location=example.location,
        resource_group_name=example.name,
        log_analytics_workspace_id=example_analytics_workspace.id)
    example_environment_custom_domain = azure.containerapp.EnvironmentCustomDomain("example",
        container_app_environment_id=example_environment.id,
        certificate_blob_base64=std.filebase64(input="testacc.pfx").result,
        certificate_password="TestAcc",
        dns_suffix="acceptancetest.contoso.com")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/containerapp"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/operationalinsights"
    	"github.com/pulumi/pulumi-std/sdk/go/std"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-resources"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleAnalyticsWorkspace, err := operationalinsights.NewAnalyticsWorkspace(ctx, "example", &operationalinsights.AnalyticsWorkspaceArgs{
    			Name:              pulumi.String("acctest-01"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			Sku:               pulumi.String("PerGB2018"),
    			RetentionInDays:   pulumi.Int(30),
    		})
    		if err != nil {
    			return err
    		}
    		exampleEnvironment, err := containerapp.NewEnvironment(ctx, "example", &containerapp.EnvironmentArgs{
    			Name:                    pulumi.String("my-environment"),
    			Location:                example.Location,
    			ResourceGroupName:       example.Name,
    			LogAnalyticsWorkspaceId: exampleAnalyticsWorkspace.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{
    			Input: "testacc.pfx",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = containerapp.NewEnvironmentCustomDomain(ctx, "example", &containerapp.EnvironmentCustomDomainArgs{
    			ContainerAppEnvironmentId: exampleEnvironment.ID(),
    			CertificateBlobBase64:     invokeFilebase64.Result,
    			CertificatePassword:       pulumi.String("TestAcc"),
    			DnsSuffix:                 pulumi.String("acceptancetest.contoso.com"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    using Std = Pulumi.Std;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-resources",
            Location = "West Europe",
        });
    
        var exampleAnalyticsWorkspace = new Azure.OperationalInsights.AnalyticsWorkspace("example", new()
        {
            Name = "acctest-01",
            Location = example.Location,
            ResourceGroupName = example.Name,
            Sku = "PerGB2018",
            RetentionInDays = 30,
        });
    
        var exampleEnvironment = new Azure.ContainerApp.Environment("example", new()
        {
            Name = "my-environment",
            Location = example.Location,
            ResourceGroupName = example.Name,
            LogAnalyticsWorkspaceId = exampleAnalyticsWorkspace.Id,
        });
    
        var exampleEnvironmentCustomDomain = new Azure.ContainerApp.EnvironmentCustomDomain("example", new()
        {
            ContainerAppEnvironmentId = exampleEnvironment.Id,
            CertificateBlobBase64 = Std.Filebase64.Invoke(new()
            {
                Input = "testacc.pfx",
            }).Apply(invoke => invoke.Result),
            CertificatePassword = "TestAcc",
            DnsSuffix = "acceptancetest.contoso.com",
        });
    
    });
    
    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.operationalinsights.AnalyticsWorkspace;
    import com.pulumi.azure.operationalinsights.AnalyticsWorkspaceArgs;
    import com.pulumi.azure.containerapp.Environment;
    import com.pulumi.azure.containerapp.EnvironmentArgs;
    import com.pulumi.azure.containerapp.EnvironmentCustomDomain;
    import com.pulumi.azure.containerapp.EnvironmentCustomDomainArgs;
    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 exampleAnalyticsWorkspace = new AnalyticsWorkspace("exampleAnalyticsWorkspace", AnalyticsWorkspaceArgs.builder()
                .name("acctest-01")
                .location(example.location())
                .resourceGroupName(example.name())
                .sku("PerGB2018")
                .retentionInDays(30)
                .build());
    
            var exampleEnvironment = new Environment("exampleEnvironment", EnvironmentArgs.builder()
                .name("my-environment")
                .location(example.location())
                .resourceGroupName(example.name())
                .logAnalyticsWorkspaceId(exampleAnalyticsWorkspace.id())
                .build());
    
            var exampleEnvironmentCustomDomain = new EnvironmentCustomDomain("exampleEnvironmentCustomDomain", EnvironmentCustomDomainArgs.builder()
                .containerAppEnvironmentId(exampleEnvironment.id())
                .certificateBlobBase64(StdFunctions.filebase64(Filebase64Args.builder()
                    .input("testacc.pfx")
                    .build()).result())
                .certificatePassword("TestAcc")
                .dnsSuffix("acceptancetest.contoso.com")
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleAnalyticsWorkspace:
        type: azure:operationalinsights:AnalyticsWorkspace
        name: example
        properties:
          name: acctest-01
          location: ${example.location}
          resourceGroupName: ${example.name}
          sku: PerGB2018
          retentionInDays: 30
      exampleEnvironment:
        type: azure:containerapp:Environment
        name: example
        properties:
          name: my-environment
          location: ${example.location}
          resourceGroupName: ${example.name}
          logAnalyticsWorkspaceId: ${exampleAnalyticsWorkspace.id}
      exampleEnvironmentCustomDomain:
        type: azure:containerapp:EnvironmentCustomDomain
        name: example
        properties:
          containerAppEnvironmentId: ${exampleEnvironment.id}
          certificateBlobBase64:
            fn::invoke:
              Function: std:filebase64
              Arguments:
                input: testacc.pfx
              Return: result
          certificatePassword: TestAcc
          dnsSuffix: acceptancetest.contoso.com
    

    Create EnvironmentCustomDomain Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new EnvironmentCustomDomain(name: string, args: EnvironmentCustomDomainArgs, opts?: CustomResourceOptions);
    @overload
    def EnvironmentCustomDomain(resource_name: str,
                                args: EnvironmentCustomDomainArgs,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def EnvironmentCustomDomain(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                certificate_blob_base64: Optional[str] = None,
                                certificate_password: Optional[str] = None,
                                container_app_environment_id: Optional[str] = None,
                                dns_suffix: Optional[str] = None)
    func NewEnvironmentCustomDomain(ctx *Context, name string, args EnvironmentCustomDomainArgs, opts ...ResourceOption) (*EnvironmentCustomDomain, error)
    public EnvironmentCustomDomain(string name, EnvironmentCustomDomainArgs args, CustomResourceOptions? opts = null)
    public EnvironmentCustomDomain(String name, EnvironmentCustomDomainArgs args)
    public EnvironmentCustomDomain(String name, EnvironmentCustomDomainArgs args, CustomResourceOptions options)
    
    type: azure:containerapp:EnvironmentCustomDomain
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args EnvironmentCustomDomainArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args EnvironmentCustomDomainArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args EnvironmentCustomDomainArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EnvironmentCustomDomainArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EnvironmentCustomDomainArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var environmentCustomDomainResource = new Azure.ContainerApp.EnvironmentCustomDomain("environmentCustomDomainResource", new()
    {
        CertificateBlobBase64 = "string",
        CertificatePassword = "string",
        ContainerAppEnvironmentId = "string",
        DnsSuffix = "string",
    });
    
    example, err := containerapp.NewEnvironmentCustomDomain(ctx, "environmentCustomDomainResource", &containerapp.EnvironmentCustomDomainArgs{
    	CertificateBlobBase64:     pulumi.String("string"),
    	CertificatePassword:       pulumi.String("string"),
    	ContainerAppEnvironmentId: pulumi.String("string"),
    	DnsSuffix:                 pulumi.String("string"),
    })
    
    var environmentCustomDomainResource = new EnvironmentCustomDomain("environmentCustomDomainResource", EnvironmentCustomDomainArgs.builder()
        .certificateBlobBase64("string")
        .certificatePassword("string")
        .containerAppEnvironmentId("string")
        .dnsSuffix("string")
        .build());
    
    environment_custom_domain_resource = azure.containerapp.EnvironmentCustomDomain("environmentCustomDomainResource",
        certificate_blob_base64="string",
        certificate_password="string",
        container_app_environment_id="string",
        dns_suffix="string")
    
    const environmentCustomDomainResource = new azure.containerapp.EnvironmentCustomDomain("environmentCustomDomainResource", {
        certificateBlobBase64: "string",
        certificatePassword: "string",
        containerAppEnvironmentId: "string",
        dnsSuffix: "string",
    });
    
    type: azure:containerapp:EnvironmentCustomDomain
    properties:
        certificateBlobBase64: string
        certificatePassword: string
        containerAppEnvironmentId: string
        dnsSuffix: string
    

    EnvironmentCustomDomain Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The EnvironmentCustomDomain resource accepts the following input properties:

    CertificateBlobBase64 string
    The bundle of Private Key and Certificate for the Custom DNS Suffix as a base64 encoded PFX or PEM.
    CertificatePassword string
    The password for the Certificate bundle.
    ContainerAppEnvironmentId string
    The ID of the Container Apps Managed Environment. Changing this forces a new resource to be created.
    DnsSuffix string
    Custom DNS Suffix for the Container App Environment.
    CertificateBlobBase64 string
    The bundle of Private Key and Certificate for the Custom DNS Suffix as a base64 encoded PFX or PEM.
    CertificatePassword string
    The password for the Certificate bundle.
    ContainerAppEnvironmentId string
    The ID of the Container Apps Managed Environment. Changing this forces a new resource to be created.
    DnsSuffix string
    Custom DNS Suffix for the Container App Environment.
    certificateBlobBase64 String
    The bundle of Private Key and Certificate for the Custom DNS Suffix as a base64 encoded PFX or PEM.
    certificatePassword String
    The password for the Certificate bundle.
    containerAppEnvironmentId String
    The ID of the Container Apps Managed Environment. Changing this forces a new resource to be created.
    dnsSuffix String
    Custom DNS Suffix for the Container App Environment.
    certificateBlobBase64 string
    The bundle of Private Key and Certificate for the Custom DNS Suffix as a base64 encoded PFX or PEM.
    certificatePassword string
    The password for the Certificate bundle.
    containerAppEnvironmentId string
    The ID of the Container Apps Managed Environment. Changing this forces a new resource to be created.
    dnsSuffix string
    Custom DNS Suffix for the Container App Environment.
    certificate_blob_base64 str
    The bundle of Private Key and Certificate for the Custom DNS Suffix as a base64 encoded PFX or PEM.
    certificate_password str
    The password for the Certificate bundle.
    container_app_environment_id str
    The ID of the Container Apps Managed Environment. Changing this forces a new resource to be created.
    dns_suffix str
    Custom DNS Suffix for the Container App Environment.
    certificateBlobBase64 String
    The bundle of Private Key and Certificate for the Custom DNS Suffix as a base64 encoded PFX or PEM.
    certificatePassword String
    The password for the Certificate bundle.
    containerAppEnvironmentId String
    The ID of the Container Apps Managed Environment. Changing this forces a new resource to be created.
    dnsSuffix String
    Custom DNS Suffix for the Container App Environment.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the EnvironmentCustomDomain resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing EnvironmentCustomDomain Resource

    Get an existing EnvironmentCustomDomain resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: EnvironmentCustomDomainState, opts?: CustomResourceOptions): EnvironmentCustomDomain
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            certificate_blob_base64: Optional[str] = None,
            certificate_password: Optional[str] = None,
            container_app_environment_id: Optional[str] = None,
            dns_suffix: Optional[str] = None) -> EnvironmentCustomDomain
    func GetEnvironmentCustomDomain(ctx *Context, name string, id IDInput, state *EnvironmentCustomDomainState, opts ...ResourceOption) (*EnvironmentCustomDomain, error)
    public static EnvironmentCustomDomain Get(string name, Input<string> id, EnvironmentCustomDomainState? state, CustomResourceOptions? opts = null)
    public static EnvironmentCustomDomain get(String name, Output<String> id, EnvironmentCustomDomainState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CertificateBlobBase64 string
    The bundle of Private Key and Certificate for the Custom DNS Suffix as a base64 encoded PFX or PEM.
    CertificatePassword string
    The password for the Certificate bundle.
    ContainerAppEnvironmentId string
    The ID of the Container Apps Managed Environment. Changing this forces a new resource to be created.
    DnsSuffix string
    Custom DNS Suffix for the Container App Environment.
    CertificateBlobBase64 string
    The bundle of Private Key and Certificate for the Custom DNS Suffix as a base64 encoded PFX or PEM.
    CertificatePassword string
    The password for the Certificate bundle.
    ContainerAppEnvironmentId string
    The ID of the Container Apps Managed Environment. Changing this forces a new resource to be created.
    DnsSuffix string
    Custom DNS Suffix for the Container App Environment.
    certificateBlobBase64 String
    The bundle of Private Key and Certificate for the Custom DNS Suffix as a base64 encoded PFX or PEM.
    certificatePassword String
    The password for the Certificate bundle.
    containerAppEnvironmentId String
    The ID of the Container Apps Managed Environment. Changing this forces a new resource to be created.
    dnsSuffix String
    Custom DNS Suffix for the Container App Environment.
    certificateBlobBase64 string
    The bundle of Private Key and Certificate for the Custom DNS Suffix as a base64 encoded PFX or PEM.
    certificatePassword string
    The password for the Certificate bundle.
    containerAppEnvironmentId string
    The ID of the Container Apps Managed Environment. Changing this forces a new resource to be created.
    dnsSuffix string
    Custom DNS Suffix for the Container App Environment.
    certificate_blob_base64 str
    The bundle of Private Key and Certificate for the Custom DNS Suffix as a base64 encoded PFX or PEM.
    certificate_password str
    The password for the Certificate bundle.
    container_app_environment_id str
    The ID of the Container Apps Managed Environment. Changing this forces a new resource to be created.
    dns_suffix str
    Custom DNS Suffix for the Container App Environment.
    certificateBlobBase64 String
    The bundle of Private Key and Certificate for the Custom DNS Suffix as a base64 encoded PFX or PEM.
    certificatePassword String
    The password for the Certificate bundle.
    containerAppEnvironmentId String
    The ID of the Container Apps Managed Environment. Changing this forces a new resource to be created.
    dnsSuffix String
    Custom DNS Suffix for the Container App Environment.

    Import

    A Container App Environment Custom Domain Suffix can be imported using the resource id of its parent container ontainer App Environment , e.g.

    $ pulumi import azure:containerapp/environmentCustomDomain:EnvironmentCustomDomain example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.App/managedEnvironments/myEnvironment"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.81.0 published on Monday, Jun 24, 2024 by Pulumi