import * as pulumi from "@pulumi/pulumi"; /** * Manages an App Service Certificate Binding. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; * import * as std from "@pulumi/std"; * * const exampleResourceGroup = new azure.core.ResourceGroup("example", { * name: "webapp", * location: "West Europe", * }); * const examplePlan = new azure.appservice.Plan("example", { * name: "appserviceplan", * location: exampleResourceGroup.location, * resourceGroupName: exampleResourceGroup.name, * sku: { * tier: "Premium", * size: "P1", * }, * }); * const exampleAppService = new azure.appservice.AppService("example", { * name: "mywebapp", * location: exampleResourceGroup.location, * resourceGroupName: exampleResourceGroup.name, * appServicePlanId: examplePlan.id, * }); * const example = azure.dns.getZoneOutput({ * name: "example.com", * resourceGroupName: exampleResourceGroup.name, * }); * const exampleCNameRecord = new azure.dns.CNameRecord("example", { * name: "www", * zoneName: example.apply(example => example.name), * resourceGroupName: example.apply(example => example.resourceGroupName), * ttl: 300, * record: exampleAppService.defaultSiteHostname, * }); * const exampleTxtRecord = new azure.dns.TxtRecord("example", { * name: pulumi.interpolate`asuid.${exampleCNameRecord.name}`, * zoneName: example.apply(example => example.name), * resourceGroupName: example.apply(example => example.resourceGroupName), * ttl: 300, * records: [{ * value: exampleAppService.customDomainVerificationId, * }], * }); * const exampleCustomHostnameBinding = new azure.appservice.CustomHostnameBinding("example", { * hostname: std.trimOutput({ * input: exampleCNameRecord.fqdn, * cutset: ".", * }).apply(invoke => invoke.result), * appServiceName: exampleAppService.name, * resourceGroupName: exampleResourceGroup.name, * }, { * dependsOn: [exampleTxtRecord], * }); * const exampleManagedCertificate = new azure.appservice.ManagedCertificate("example", {customHostnameBindingId: exampleCustomHostnameBinding.id}); * const exampleCertificateBinding = new azure.appservice.CertificateBinding("example", { * hostnameBindingId: exampleCustomHostnameBinding.id, * certificateId: exampleManagedCertificate.id, * sslState: "SniEnabled", * }); * ``` * * ## Import * * App Service Certificate Bindings can be imported using the `hostnameBindingId` and the `appServiceCertificateId` , e.g. * * ```sh * $ pulumi import azure:appservice/certificateBinding:CertificateBinding example "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Web/sites/instance1/hostNameBindings/mywebsite.com|/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Web/certificates/mywebsite.com" * ``` */ export declare class CertificateBinding extends pulumi.CustomResource { /** * Get an existing CertificateBinding 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 Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: CertificateBindingState, opts?: pulumi.CustomResourceOptions): CertificateBinding; /** * Returns true if the given object is an instance of CertificateBinding. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is CertificateBinding; /** * The name of the App Service to which the certificate was bound. */ readonly appServiceName: pulumi.Output; /** * The ID of the certificate to bind to the custom domain. Changing this forces a new App Service Certificate Binding to be created. */ readonly certificateId: pulumi.Output; /** * The hostname of the bound certificate. */ readonly hostname: pulumi.Output; /** * The ID of the Custom Domain/Hostname Binding. Changing this forces a new App Service Certificate Binding to be created. */ readonly hostnameBindingId: pulumi.Output; /** * The type of certificate binding. Allowed values are `IpBasedEnabled` or `SniEnabled`. Changing this forces a new App Service Certificate Binding to be created. */ readonly sslState: pulumi.Output; /** * The certificate thumbprint. */ readonly thumbprint: pulumi.Output; /** * Create a CertificateBinding resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: CertificateBindingArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering CertificateBinding resources. */ export interface CertificateBindingState { /** * The name of the App Service to which the certificate was bound. */ appServiceName?: pulumi.Input; /** * The ID of the certificate to bind to the custom domain. Changing this forces a new App Service Certificate Binding to be created. */ certificateId?: pulumi.Input; /** * The hostname of the bound certificate. */ hostname?: pulumi.Input; /** * The ID of the Custom Domain/Hostname Binding. Changing this forces a new App Service Certificate Binding to be created. */ hostnameBindingId?: pulumi.Input; /** * The type of certificate binding. Allowed values are `IpBasedEnabled` or `SniEnabled`. Changing this forces a new App Service Certificate Binding to be created. */ sslState?: pulumi.Input; /** * The certificate thumbprint. */ thumbprint?: pulumi.Input; } /** * The set of arguments for constructing a CertificateBinding resource. */ export interface CertificateBindingArgs { /** * The ID of the certificate to bind to the custom domain. Changing this forces a new App Service Certificate Binding to be created. */ certificateId: pulumi.Input; /** * The ID of the Custom Domain/Hostname Binding. Changing this forces a new App Service Certificate Binding to be created. */ hostnameBindingId: pulumi.Input; /** * The type of certificate binding. Allowed values are `IpBasedEnabled` or `SniEnabled`. Changing this forces a new App Service Certificate Binding to be created. */ sslState: pulumi.Input; }