EnvironmentArgs

data class EnvironmentArgs(val allowedUserIpCidrs: Output<List<String>>? = null, val clusterSettings: Output<List<EnvironmentClusterSettingArgs>>? = null, val frontEndScaleFactor: Output<Int>? = null, val internalLoadBalancingMode: Output<String>? = null, val name: Output<String>? = null, val pricingTier: Output<String>? = null, val resourceGroupName: Output<String>? = null, val subnetId: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<EnvironmentArgs>

Manages an App Service Environment.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "exampleRG1",
location: "West Europe",
});
const exampleVirtualNetwork = new azure.network.VirtualNetwork("example", {
name: "example-vnet1",
location: example.location,
resourceGroupName: example.name,
addressSpaces: ["10&#46;0&#46;0&#46;0/16"],
});
const ase = new azure.network.Subnet("ase", {
name: "asesubnet",
resourceGroupName: example.name,
virtualNetworkName: exampleVirtualNetwork.name,
addressPrefixes: ["10&#46;0&#46;1&#46;0/24"],
});
const gateway = new azure.network.Subnet("gateway", {
name: "gatewaysubnet",
resourceGroupName: example.name,
virtualNetworkName: exampleVirtualNetwork.name,
addressPrefixes: ["10&#46;0&#46;2&#46;0/24"],
});
const exampleEnvironment = new azure.appservice.Environment("example", {
name: "example-ase",
resourceGroupName: example.name,
subnetId: ase.id,
pricingTier: "I2",
frontEndScaleFactor: 10,
internalLoadBalancingMode: "Web, Publishing",
allowedUserIpCidrs: [
"11.22.33.44/32",
"55.66.77.0/24",
],
clusterSettings: [{
name: "DisableTls1.0",
value: "1",
}],
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="exampleRG1",
location="West Europe")
example_virtual_network = azure.network.VirtualNetwork("example",
name="example-vnet1",
location=example.location,
resource_group_name=example.name,
address_spaces=["10&#46;0&#46;0&#46;0/16"])
ase = azure.network.Subnet("ase",
name="asesubnet",
resource_group_name=example.name,
virtual_network_name=example_virtual_network.name,
address_prefixes=["10&#46;0&#46;1&#46;0/24"])
gateway = azure.network.Subnet("gateway",
name="gatewaysubnet",
resource_group_name=example.name,
virtual_network_name=example_virtual_network.name,
address_prefixes=["10&#46;0&#46;2&#46;0/24"])
example_environment = azure.appservice.Environment("example",
name="example-ase",
resource_group_name=example.name,
subnet_id=ase.id,
pricing_tier="I2",
front_end_scale_factor=10,
internal_load_balancing_mode="Web, Publishing",
allowed_user_ip_cidrs=[
"11.22.33.44/32",
"55.66.77.0/24",
],
cluster_settings=[{
"name": "DisableTls1.0",
"value": "1",
}])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "exampleRG1",
Location = "West Europe",
});
var exampleVirtualNetwork = new Azure.Network.VirtualNetwork("example", new()
{
Name = "example-vnet1",
Location = example.Location,
ResourceGroupName = example.Name,
AddressSpaces = new[]
{
"10.0.0.0/16",
},
});
var ase = new Azure.Network.Subnet("ase", new()
{
Name = "asesubnet",
ResourceGroupName = example.Name,
VirtualNetworkName = exampleVirtualNetwork.Name,
AddressPrefixes = new[]
{
"10.0.1.0/24",
},
});
var gateway = new Azure.Network.Subnet("gateway", new()
{
Name = "gatewaysubnet",
ResourceGroupName = example.Name,
VirtualNetworkName = exampleVirtualNetwork.Name,
AddressPrefixes = new[]
{
"10.0.2.0/24",
},
});
var exampleEnvironment = new Azure.AppService.Environment("example", new()
{
Name = "example-ase",
ResourceGroupName = example.Name,
SubnetId = ase.Id,
PricingTier = "I2",
FrontEndScaleFactor = 10,
InternalLoadBalancingMode = "Web, Publishing",
AllowedUserIpCidrs = new[]
{
"11.22.33.44/32",
"55.66.77.0/24",
},
ClusterSettings = new[]
{
new Azure.AppService.Inputs.EnvironmentClusterSettingArgs
{
Name = "DisableTls1.0",
Value = "1",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/appservice"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
"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("exampleRG1"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleVirtualNetwork, err := network.NewVirtualNetwork(ctx, "example", &network.VirtualNetworkArgs{
Name: pulumi.String("example-vnet1"),
Location: example.Location,
ResourceGroupName: example.Name,
AddressSpaces: pulumi.StringArray{
pulumi.String("10.0.0.0/16"),
},
})
if err != nil {
return err
}
ase, err := network.NewSubnet(ctx, "ase", &network.SubnetArgs{
Name: pulumi.String("asesubnet"),
ResourceGroupName: example.Name,
VirtualNetworkName: exampleVirtualNetwork.Name,
AddressPrefixes: pulumi.StringArray{
pulumi.String("10.0.1.0/24"),
},
})
if err != nil {
return err
}
_, err = network.NewSubnet(ctx, "gateway", &network.SubnetArgs{
Name: pulumi.String("gatewaysubnet"),
ResourceGroupName: example.Name,
VirtualNetworkName: exampleVirtualNetwork.Name,
AddressPrefixes: pulumi.StringArray{
pulumi.String("10.0.2.0/24"),
},
})
if err != nil {
return err
}
_, err = appservice.NewEnvironment(ctx, "example", &appservice.EnvironmentArgs{
Name: pulumi.String("example-ase"),
ResourceGroupName: example.Name,
SubnetId: ase.ID(),
PricingTier: pulumi.String("I2"),
FrontEndScaleFactor: pulumi.Int(10),
InternalLoadBalancingMode: pulumi.String("Web, Publishing"),
AllowedUserIpCidrs: pulumi.StringArray{
pulumi.String("11.22.33.44/32"),
pulumi.String("55.66.77.0/24"),
},
ClusterSettings: appservice.EnvironmentClusterSettingArray{
&appservice.EnvironmentClusterSettingArgs{
Name: pulumi.String("DisableTls1.0"),
Value: pulumi.String("1"),
},
},
})
if err != nil {
return err
}
return nil
})
}
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.network.VirtualNetwork;
import com.pulumi.azure.network.VirtualNetworkArgs;
import com.pulumi.azure.network.Subnet;
import com.pulumi.azure.network.SubnetArgs;
import com.pulumi.azure.appservice.Environment;
import com.pulumi.azure.appservice.EnvironmentArgs;
import com.pulumi.azure.appservice.inputs.EnvironmentClusterSettingArgs;
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("exampleRG1")
.location("West Europe")
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.name("example-vnet1")
.location(example.location())
.resourceGroupName(example.name())
.addressSpaces("10.0.0.0/16")
.build());
var ase = new Subnet("ase", SubnetArgs.builder()
.name("asesubnet")
.resourceGroupName(example.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.0.1.0/24")
.build());
var gateway = new Subnet("gateway", SubnetArgs.builder()
.name("gatewaysubnet")
.resourceGroupName(example.name())
.virtualNetworkName(exampleVirtualNetwork.name())
.addressPrefixes("10.0.2.0/24")
.build());
var exampleEnvironment = new Environment("exampleEnvironment", EnvironmentArgs.builder()
.name("example-ase")
.resourceGroupName(example.name())
.subnetId(ase.id())
.pricingTier("I2")
.frontEndScaleFactor(10)
.internalLoadBalancingMode("Web, Publishing")
.allowedUserIpCidrs(
"11.22.33.44/32",
"55.66.77.0/24")
.clusterSettings(EnvironmentClusterSettingArgs.builder()
.name("DisableTls1.0")
.value("1")
.build())
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: exampleRG1
location: West Europe
exampleVirtualNetwork:
type: azure:network:VirtualNetwork
name: example
properties:
name: example-vnet1
location: ${example.location}
resourceGroupName: ${example.name}
addressSpaces:
- 10.0.0.0/16
ase:
type: azure:network:Subnet
properties:
name: asesubnet
resourceGroupName: ${example.name}
virtualNetworkName: ${exampleVirtualNetwork.name}
addressPrefixes:
- 10.0.1.0/24
gateway:
type: azure:network:Subnet
properties:
name: gatewaysubnet
resourceGroupName: ${example.name}
virtualNetworkName: ${exampleVirtualNetwork.name}
addressPrefixes:
- 10.0.2.0/24
exampleEnvironment:
type: azure:appservice:Environment
name: example
properties:
name: example-ase
resourceGroupName: ${example.name}
subnetId: ${ase.id}
pricingTier: I2
frontEndScaleFactor: 10
internalLoadBalancingMode: Web, Publishing
allowedUserIpCidrs:
- 11.22.33.44/32
- 55.66.77.0/24
clusterSettings:
- name: DisableTls1.0
value: '1'

Import

The App Service Environment can be imported using the resource id, e.g.

$ pulumi import azure:appservice/environment:Environment myAppServiceEnv /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Web/hostingEnvironments/myAppServiceEnv

Constructors

Link copied to clipboard
constructor(allowedUserIpCidrs: Output<List<String>>? = null, clusterSettings: Output<List<EnvironmentClusterSettingArgs>>? = null, frontEndScaleFactor: Output<Int>? = null, internalLoadBalancingMode: Output<String>? = null, name: Output<String>? = null, pricingTier: Output<String>? = null, resourceGroupName: Output<String>? = null, subnetId: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val allowedUserIpCidrs: Output<List<String>>? = null

Allowed user added IP ranges on the ASE database. Use the addresses you want to set as the explicit egress address ranges.

Link copied to clipboard

Zero or more cluster_setting blocks as defined below.

Link copied to clipboard
val frontEndScaleFactor: Output<Int>? = null

Scale factor for front end instances. Possible values are between 5 and 15. Defaults to 15.

Link copied to clipboard
val internalLoadBalancingMode: Output<String>? = null

Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. Possible values are None, Web, Publishing and combined value "Web, Publishing". Defaults to None. Changing this forces a new resource to be created.

Link copied to clipboard
val name: Output<String>? = null

The name of the App Service Environment. Changing this forces a new resource to be created.

Link copied to clipboard
val pricingTier: Output<String>? = null

Pricing tier for the front end instances. Possible values are I1, I2 and I3. Defaults to I1.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the Resource Group where the App Service Environment exists. Defaults to the Resource Group of the Subnet (specified by subnet_id).

Link copied to clipboard
val subnetId: Output<String>? = null

The ID of the Subnet which the App Service Environment should be connected to. Changing this forces a new resource to be created.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A mapping of tags to assign to the resource. Changing this forces a new resource to be created.

Functions

Link copied to clipboard
open override fun toJava(): EnvironmentArgs