We recommend using Azure Native.
azure.webpubsub.CustomDomain
Explore with Pulumi AI
Manages an Azure Web PubSub Custom Domain.
Example Usage
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleService = new Service("exampleService", ServiceArgs.builder()
.location(azurerm_resource_group.test().location())
.resourceGroupName(azurerm_resource_group.test().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()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.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(azurerm_web_pubsub.test().identity()[0].principal_id())
.certificatePermissions(
"Create",
"Get",
"List")
.secretPermissions(
"Get",
"List")
.build())
.build());
var exampleCertificate = new Certificate("exampleCertificate", CertificateArgs.builder()
.keyVaultId(exampleKeyVault.id())
.certificate(CertificateCertificateArgs.builder()
.contents(Base64.getEncoder().encodeToString(Files.readAllBytes(Paths.get("certificate-to-import.pfx"))))
.password("")
.build())
.build());
var testCustomCertificate = new CustomCertificate("testCustomCertificate", CustomCertificateArgs.builder()
.webPubsubId(exampleService.id())
.customCertificateId(exampleCertificate.id())
.build(), CustomResourceOptions.builder()
.dependsOn(azurerm_key_vault_access_policy.example())
.build());
var testCustomDomain = new CustomDomain("testCustomDomain", CustomDomainArgs.builder()
.domainName("tftest.com")
.webPubsubId(azurerm_web_pubsub.test().id())
.webPubsubCustomCertificateId(testCustomCertificate.id())
.build());
}
}
Coming soon!
Coming soon!
Coming soon!
Create CustomDomain Resource
new CustomDomain(name: string, args: CustomDomainArgs, opts?: CustomResourceOptions);
@overload
def CustomDomain(resource_name: 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)
@overload
def CustomDomain(resource_name: str,
args: CustomDomainArgs,
opts: Optional[ResourceOptions] = 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.
- 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.
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:
- Domain
Name 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.
- Web
Pubsub stringCustom Certificate Id Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
- Web
Pubsub stringId 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 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.
- Web
Pubsub stringCustom Certificate Id Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
- Web
Pubsub stringId 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 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.
- web
Pubsub StringCustom Certificate Id Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
- web
Pubsub StringId 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 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.
- web
Pubsub stringCustom Certificate Id Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
- web
Pubsub stringId 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_ strcustom_ certificate_ id Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
- web_
pubsub_ strid 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.
- domain
Name 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.
- web
Pubsub StringCustom Certificate Id Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
- web
Pubsub StringId 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.
- Domain
Name 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.
- Web
Pubsub stringCustom Certificate Id Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
- Web
Pubsub stringId Specifies the Web PubSub ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
- Domain
Name 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.
- Web
Pubsub stringCustom Certificate Id Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
- Web
Pubsub stringId Specifies the Web PubSub ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
- domain
Name 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.
- web
Pubsub StringCustom Certificate Id Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
- web
Pubsub StringId Specifies the Web PubSub ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
- domain
Name 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.
- web
Pubsub stringCustom Certificate Id Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
- web
Pubsub stringId 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_ strcustom_ certificate_ id Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
- web_
pubsub_ strid Specifies the Web PubSub ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
- domain
Name 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.
- web
Pubsub StringCustom Certificate Id Specifies the Web PubSub Custom Certificate ID of the Web PubSub Custom Domain. Changing this forces a new resource to be created.
- web
Pubsub StringId 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
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.