CustomHostnameBinding

class CustomHostnameBinding : KotlinCustomResource

Manages a Hostname Binding within an App Service (or Function App).

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.RandomId;
import com.pulumi.random.RandomIdArgs;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.appservice.Plan;
import com.pulumi.azure.appservice.PlanArgs;
import com.pulumi.azure.appservice.inputs.PlanSkuArgs;
import com.pulumi.azure.appservice.AppService;
import com.pulumi.azure.appservice.AppServiceArgs;
import com.pulumi.azure.appservice.CustomHostnameBinding;
import com.pulumi.azure.appservice.CustomHostnameBindingArgs;
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 server = new RandomId("server", RandomIdArgs.builder()
.keepers(Map.of("azi_id", 1))
.byteLength(8)
.build());
var exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var examplePlan = new Plan("examplePlan", PlanArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.sku(PlanSkuArgs.builder()
.tier("Standard")
.size("S1")
.build())
.build());
var exampleAppService = new AppService("exampleAppService", AppServiceArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.appServicePlanId(examplePlan.id())
.build());
var exampleCustomHostnameBinding = new CustomHostnameBinding("exampleCustomHostnameBinding", CustomHostnameBindingArgs.builder()
.hostname("www.mywebsite.com")
.appServiceName(exampleAppService.name())
.resourceGroupName(exampleResourceGroup.name())
.build());
}
}

Import

App Service Custom Hostname Bindings can be imported using the resource id, e.g.

$ pulumi import azure:appservice/customHostnameBinding:CustomHostnameBinding mywebsite /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Web/sites/instance1/hostNameBindings/mywebsite.com

Properties

Link copied to clipboard
val appServiceName: Output<String>

The name of the App Service in which to add the Custom Hostname Binding. Changing this forces a new resource to be created.

Link copied to clipboard
val hostname: Output<String>

Specifies the Custom Hostname to use for the App Service, example www.example.com. Changing this forces a new resource to be created.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The name of the resource group in which the App Service exists. Changing this forces a new resource to be created.

Link copied to clipboard
val sslState: Output<String>

The SSL type. Possible values are IpBasedEnabled and SniEnabled. Changing this forces a new resource to be created.

Link copied to clipboard
val thumbprint: Output<String>

The SSL certificate thumbprint. Changing this forces a new resource to be created.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val virtualIp: Output<String>

The virtual IP address assigned to the hostname if IP based SSL is enabled.