1. Packages
  2. Azure Classic
  3. API Docs
  4. webpubsub
  5. CustomDomain

We recommend using Azure Native.

Azure Classic v6.4.0 published on Tuesday, Oct 8, 2024 by Pulumi

azure.webpubsub.CustomDomain

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v6.4.0 published on Tuesday, Oct 8, 2024 by Pulumi

    Manages an Azure Web PubSub Custom Domain.

    Example Usage

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.CoreFunctions;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.webpubsub.Service;
    import com.pulumi.azure.webpubsub.ServiceArgs;
    import com.pulumi.azure.webpubsub.inputs.ServiceIdentityArgs;
    import com.pulumi.azure.keyvault.KeyVault;
    import com.pulumi.azure.keyvault.KeyVaultArgs;
    import com.pulumi.azure.keyvault.inputs.KeyVaultAccessPolicyArgs;
    import com.pulumi.azure.keyvault.Certificate;
    import com.pulumi.azure.keyvault.CertificateArgs;
    import com.pulumi.azure.keyvault.inputs.CertificateCertificateArgs;
    import com.pulumi.azure.webpubsub.CustomCertificate;
    import com.pulumi.azure.webpubsub.CustomCertificateArgs;
    import com.pulumi.azure.webpubsub.CustomDomain;
    import com.pulumi.azure.webpubsub.CustomDomainArgs;
    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) {
            final var current = CoreFunctions.getClientConfig();
    
            var example = new ResourceGroup("example", ResourceGroupArgs.builder()
                .name("example-resources")
                .location("West Europe")
                .build());
    
            var exampleService = new Service("exampleService", ServiceArgs.builder()
                .name("example-webpubsub")
                .location(testAzurermResourceGroup.location())
                .resourceGroupName(testAzurermResourceGroup.name())
                .sku(Map.ofEntries(
                    Map.entry("name", "Premium_P1"),
                    Map.entry("capacity", 1)
                ))
                .identity(ServiceIdentityArgs.builder()
                    .type("SystemAssigned")
                    .build())
                .build());
    
            var exampleKeyVault = new KeyVault("exampleKeyVault", KeyVaultArgs.builder()
                .name("examplekeyvault")
                .location(example.location())
                .resourceGroupName(example.name())
                .tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
                .skuName("premium")
                .accessPolicies(            
                    KeyVaultAccessPolicyArgs.builder()
                        .tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
                        .objectId(current.applyValue(getClientConfigResult -> getClientConfigResult.objectId()))
                        .certificatePermissions(                    
                            "Create",
                            "Get",
                            "List")
                        .secretPermissions(                    
                            "Get",
                            "List")
                        .build(),
                    KeyVaultAccessPolicyArgs.builder()
                        .tenantId(current.applyValue(getClientConfigResult -> getClientConfigResult.tenantId()))
                        .objectId(testAzurermWebPubsub.identity()[0].principalId())
                        .certificatePermissions(                    
                            "Create",
                            "Get",
                            "List")
                        .secretPermissions(                    
                            "Get",
                            "List")
                        .build())
                .build());
    
            var exampleCertificate = new Certificate("exampleCertificate", CertificateArgs.builder()
                .name("imported-cert")
                .keyVaultId(exampleKeyVault.id())
                .certificate(CertificateCertificateArgs.builder()
                    .contents(StdFunctions.filebase64(Filebase64Args.builder()
                        .input("certificate-to-import.pfx")
                        .build()).result())
                    .password("")
                    .build())
                .build());
    
            var test = new CustomCertificate("test", CustomCertificateArgs.builder()
                .name("example-cert")
                .webPubsubId(exampleService.id())
                .customCertificateId(exampleCertificate.id())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(exampleAzurermKeyVaultAccessPolicy)
                    .build());
    
            var testCustomDomain = new CustomDomain("testCustomDomain", CustomDomainArgs.builder()
                .name("example-domain")
                .domainName("tftest.com")
                .webPubsubId(testAzurermWebPubsub.id())
                .webPubsubCustomCertificateId(test.id())
                .build());
    
        }
    }
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleService:
        type: azure:webpubsub:Service
        name: example
        properties:
          name: example-webpubsub
          location: ${testAzurermResourceGroup.location}
          resourceGroupName: ${testAzurermResourceGroup.name}
          sku:
            - name: Premium_P1
              capacity: 1
          identity:
            type: SystemAssigned
      exampleKeyVault:
        type: azure:keyvault:KeyVault
        name: example
        properties:
          name: examplekeyvault
          location: ${example.location}
          resourceGroupName: ${example.name}
          tenantId: ${current.tenantId}
          skuName: premium
          accessPolicies:
            - tenantId: ${current.tenantId}
              objectId: ${current.objectId}
              certificatePermissions:
                - Create
                - Get
                - List
              secretPermissions:
                - Get
                - List
            - tenantId: ${current.tenantId}
              objectId: ${testAzurermWebPubsub.identity[0].principalId}
              certificatePermissions:
                - Create
                - Get
                - List
              secretPermissions:
                - Get
                - List
      exampleCertificate:
        type: azure:keyvault:Certificate
        name: example
        properties:
          name: imported-cert
          keyVaultId: ${exampleKeyVault.id}
          certificate:
            contents:
              fn::invoke:
                Function: std:filebase64
                Arguments:
                  input: certificate-to-import.pfx
                Return: result
            password:
      test:
        type: azure:webpubsub:CustomCertificate
        properties:
          name: example-cert
          webPubsubId: ${exampleService.id}
          customCertificateId: ${exampleCertificate.id}
        options:
          dependson:
            - ${exampleAzurermKeyVaultAccessPolicy}
      testCustomDomain:
        type: azure:webpubsub:CustomDomain
        name: test
        properties:
          name: example-domain
          domainName: tftest.com
          webPubsubId: ${testAzurermWebPubsub.id}
          webPubsubCustomCertificateId: ${test.id}
    variables:
      current:
        fn::invoke:
          Function: azure:core:getClientConfig
          Arguments: {}
    

    Create CustomDomain Resource

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

    Constructor syntax

    new CustomDomain(name: string, args: CustomDomainArgs, opts?: CustomResourceOptions);
    @overload
    def CustomDomain(resource_name: str,
                     args: CustomDomainArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def CustomDomain(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     domain_name: Optional[str] = None,
                     web_pubsub_custom_certificate_id: Optional[str] = None,
                     web_pubsub_id: Optional[str] = None,
                     name: Optional[str] = None)
    func NewCustomDomain(ctx *Context, name string, args CustomDomainArgs, opts ...ResourceOption) (*CustomDomain, error)
    public CustomDomain(string name, CustomDomainArgs args, CustomResourceOptions? opts = null)
    public CustomDomain(String name, CustomDomainArgs args)
    public CustomDomain(String name, CustomDomainArgs args, CustomResourceOptions options)
    
    type: azure:webpubsub:CustomDomain
    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 CustomDomainArgs
    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 CustomDomainArgs
    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 CustomDomainArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CustomDomainArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CustomDomainArgs
    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 examplecustomDomainResourceResourceFromWebpubsubcustomDomain = new Azure.WebPubSub.CustomDomain("examplecustomDomainResourceResourceFromWebpubsubcustomDomain", new()
    {
        DomainName = "string",
        WebPubsubCustomCertificateId = "string",
        WebPubsubId = "string",
        Name = "string",
    });
    
    example, err := webpubsub.NewCustomDomain(ctx, "examplecustomDomainResourceResourceFromWebpubsubcustomDomain", &webpubsub.CustomDomainArgs{
    	DomainName:                   pulumi.String("string"),
    	WebPubsubCustomCertificateId: pulumi.String("string"),
    	WebPubsubId:                  pulumi.String("string"),
    	Name:                         pulumi.String("string"),
    })
    
    var examplecustomDomainResourceResourceFromWebpubsubcustomDomain = new CustomDomain("examplecustomDomainResourceResourceFromWebpubsubcustomDomain", CustomDomainArgs.builder()
        .domainName("string")
        .webPubsubCustomCertificateId("string")
        .webPubsubId("string")
        .name("string")
        .build());
    
    examplecustom_domain_resource_resource_from_webpubsubcustom_domain = azure.webpubsub.CustomDomain("examplecustomDomainResourceResourceFromWebpubsubcustomDomain",
        domain_name="string",
        web_pubsub_custom_certificate_id="string",
        web_pubsub_id="string",
        name="string")
    
    const examplecustomDomainResourceResourceFromWebpubsubcustomDomain = new azure.webpubsub.CustomDomain("examplecustomDomainResourceResourceFromWebpubsubcustomDomain", {
        domainName: "string",
        webPubsubCustomCertificateId: "string",
        webPubsubId: "string",
        name: "string",
    });
    
    type: azure:webpubsub:CustomDomain
    properties:
        domainName: string
        name: string
        webPubsubCustomCertificateId: string
        webPubsubId: string
    

    CustomDomain 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 CustomDomain resource accepts the following input properties:

    DomainName string

    Specifies the custom domain name of the Web PubSub Custom Domain. Changing this forces a new resource to be created.

    NOTE: Please ensure the custom domain name is included in the Subject Alternative Names of the selected Web PubSub Custom Certificate.

    WebPubsubCustomCertificateId string
    Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    WebPubsubId string
    Specifies the Web PubSub ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    DomainName string

    Specifies the custom domain name of the Web PubSub Custom Domain. Changing this forces a new resource to be created.

    NOTE: Please ensure the custom domain name is included in the Subject Alternative Names of the selected Web PubSub Custom Certificate.

    WebPubsubCustomCertificateId string
    Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    WebPubsubId string
    Specifies the Web PubSub ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    domainName String

    Specifies the custom domain name of the Web PubSub Custom Domain. Changing this forces a new resource to be created.

    NOTE: Please ensure the custom domain name is included in the Subject Alternative Names of the selected Web PubSub Custom Certificate.

    webPubsubCustomCertificateId String
    Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    webPubsubId String
    Specifies the Web PubSub ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    name String
    Specifies the name of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    domainName string

    Specifies the custom domain name of the Web PubSub Custom Domain. Changing this forces a new resource to be created.

    NOTE: Please ensure the custom domain name is included in the Subject Alternative Names of the selected Web PubSub Custom Certificate.

    webPubsubCustomCertificateId string
    Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    webPubsubId string
    Specifies the Web PubSub ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    name string
    Specifies the name of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    domain_name str

    Specifies the custom domain name of the Web PubSub Custom Domain. Changing this forces a new resource to be created.

    NOTE: Please ensure the custom domain name is included in the Subject Alternative Names of the selected Web PubSub Custom Certificate.

    web_pubsub_custom_certificate_id str
    Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    web_pubsub_id str
    Specifies the Web PubSub ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    name str
    Specifies the name of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    domainName String

    Specifies the custom domain name of the Web PubSub Custom Domain. Changing this forces a new resource to be created.

    NOTE: Please ensure the custom domain name is included in the Subject Alternative Names of the selected Web PubSub Custom Certificate.

    webPubsubCustomCertificateId String
    Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    webPubsubId String
    Specifies the Web PubSub ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    name String
    Specifies the name of the Web PubSub Custom Domain. Changing this forces a new resource to be created.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CustomDomain 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 CustomDomain Resource

    Get an existing CustomDomain 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?: CustomDomainState, opts?: CustomResourceOptions): CustomDomain
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            domain_name: Optional[str] = None,
            name: Optional[str] = None,
            web_pubsub_custom_certificate_id: Optional[str] = None,
            web_pubsub_id: Optional[str] = None) -> CustomDomain
    func GetCustomDomain(ctx *Context, name string, id IDInput, state *CustomDomainState, opts ...ResourceOption) (*CustomDomain, error)
    public static CustomDomain Get(string name, Input<string> id, CustomDomainState? state, CustomResourceOptions? opts = null)
    public static CustomDomain get(String name, Output<String> id, CustomDomainState 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:
    DomainName string

    Specifies the custom domain name of the Web PubSub Custom Domain. Changing this forces a new resource to be created.

    NOTE: Please ensure the custom domain name is included in the Subject Alternative Names of the selected Web PubSub Custom Certificate.

    Name string
    Specifies the name of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    WebPubsubCustomCertificateId string
    Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    WebPubsubId string
    Specifies the Web PubSub ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    DomainName string

    Specifies the custom domain name of the Web PubSub Custom Domain. Changing this forces a new resource to be created.

    NOTE: Please ensure the custom domain name is included in the Subject Alternative Names of the selected Web PubSub Custom Certificate.

    Name string
    Specifies the name of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    WebPubsubCustomCertificateId string
    Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    WebPubsubId string
    Specifies the Web PubSub ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    domainName String

    Specifies the custom domain name of the Web PubSub Custom Domain. Changing this forces a new resource to be created.

    NOTE: Please ensure the custom domain name is included in the Subject Alternative Names of the selected Web PubSub Custom Certificate.

    name String
    Specifies the name of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    webPubsubCustomCertificateId String
    Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    webPubsubId String
    Specifies the Web PubSub ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    domainName string

    Specifies the custom domain name of the Web PubSub Custom Domain. Changing this forces a new resource to be created.

    NOTE: Please ensure the custom domain name is included in the Subject Alternative Names of the selected Web PubSub Custom Certificate.

    name string
    Specifies the name of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    webPubsubCustomCertificateId string
    Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    webPubsubId string
    Specifies the Web PubSub ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    domain_name str

    Specifies the custom domain name of the Web PubSub Custom Domain. Changing this forces a new resource to be created.

    NOTE: Please ensure the custom domain name is included in the Subject Alternative Names of the selected Web PubSub Custom Certificate.

    name str
    Specifies the name of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    web_pubsub_custom_certificate_id str
    Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    web_pubsub_id str
    Specifies the Web PubSub ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    domainName String

    Specifies the custom domain name of the Web PubSub Custom Domain. Changing this forces a new resource to be created.

    NOTE: Please ensure the custom domain name is included in the Subject Alternative Names of the selected Web PubSub Custom Certificate.

    name String
    Specifies the name of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    webPubsubCustomCertificateId String
    Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
    webPubsubId String
    Specifies the Web PubSub ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.

    Import

    Custom Domain for a Web PubSub service can be imported using the resource id, e.g.

    $ pulumi import azure:webpubsub/customDomain:CustomDomain example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.SignalRService/webPubSub/webpubsub1/customDomains/customDomain1
    

    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 v6.4.0 published on Tuesday, Oct 8, 2024 by Pulumi