Example Usage
Dynamic Discovery Enabled
import * as pulumi from "@pulumi/pulumi";
import * as zpa from "@bdzscaler/pulumi-zpa";
// Create a App Connector Group
const exampleConnectorGroup = new zpa.ConnectorGroup("example", {
name: "Example",
description: "Example",
enabled: true,
cityCountry: "San Jose, CA",
countryCode: "US",
latitude: "37.338",
longitude: "-121.8863",
location: "San Jose, CA, US",
upgradeDay: "SUNDAY",
upgradeTimeInSecs: "66600",
overrideVersionProfile: true,
versionProfileId: "0",
dnsQueryType: "IPV4",
});
const example = new zpa.ServerGroup("example", {
name: "Example",
description: "Example",
enabled: true,
dynamicDiscovery: true,
appConnectorGroups: [{
ids: [exampleConnectorGroup.id],
}],
}, {
dependsOn: [exampleConnectorGroup],
});
import pulumi
import zscaler_pulumi_zpa as zpa
# Create a App Connector Group
example_connector_group = zpa.ConnectorGroup("example",
name="Example",
description="Example",
enabled=True,
city_country="San Jose, CA",
country_code="US",
latitude="37.338",
longitude="-121.8863",
location="San Jose, CA, US",
upgrade_day="SUNDAY",
upgrade_time_in_secs="66600",
override_version_profile=True,
version_profile_id="0",
dns_query_type="IPV4")
example = zpa.ServerGroup("example",
name="Example",
description="Example",
enabled=True,
dynamic_discovery=True,
app_connector_groups=[{
"ids": [example_connector_group.id],
}],
opts = pulumi.ResourceOptions(depends_on=[example_connector_group]))
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/zscaler/pulumi-zpa/sdk/go/zpa"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a App Connector Group
exampleConnectorGroup, err := zpa.NewConnectorGroup(ctx, "example", &zpa.ConnectorGroupArgs{
Name: pulumi.String("Example"),
Description: pulumi.String("Example"),
Enabled: pulumi.Bool(true),
CityCountry: pulumi.String("San Jose, CA"),
CountryCode: pulumi.String("US"),
Latitude: pulumi.String("37.338"),
Longitude: pulumi.String("-121.8863"),
Location: pulumi.String("San Jose, CA, US"),
UpgradeDay: pulumi.String("SUNDAY"),
UpgradeTimeInSecs: pulumi.String("66600"),
OverrideVersionProfile: pulumi.Bool(true),
VersionProfileId: pulumi.String("0"),
DnsQueryType: pulumi.String("IPV4"),
})
if err != nil {
return err
}
_, err = zpa.NewServerGroup(ctx, "example", &zpa.ServerGroupArgs{
Name: pulumi.String("Example"),
Description: pulumi.String("Example"),
Enabled: pulumi.Bool(true),
DynamicDiscovery: pulumi.Bool(true),
AppConnectorGroups: zpa.ServerGroupAppConnectorGroupArray{
&zpa.ServerGroupAppConnectorGroupArgs{
Ids: pulumi.StringArray{
exampleConnectorGroup.ID(),
},
},
},
}, pulumi.DependsOn([]pulumi.Resource{
exampleConnectorGroup,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Zpa = zscaler.PulumiPackage.Zpa;
return await Deployment.RunAsync(() =>
{
// Create a App Connector Group
var exampleConnectorGroup = new Zpa.ConnectorGroup("example", new()
{
Name = "Example",
Description = "Example",
Enabled = true,
CityCountry = "San Jose, CA",
CountryCode = "US",
Latitude = "37.338",
Longitude = "-121.8863",
Location = "San Jose, CA, US",
UpgradeDay = "SUNDAY",
UpgradeTimeInSecs = "66600",
OverrideVersionProfile = true,
VersionProfileId = "0",
DnsQueryType = "IPV4",
});
var example = new Zpa.ServerGroup("example", new()
{
Name = "Example",
Description = "Example",
Enabled = true,
DynamicDiscovery = true,
AppConnectorGroups = new[]
{
new Zpa.Inputs.ServerGroupAppConnectorGroupArgs
{
Ids = new[]
{
exampleConnectorGroup.Id,
},
},
},
}, new CustomResourceOptions
{
DependsOn =
{
exampleConnectorGroup,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.zpa.ConnectorGroup;
import com.pulumi.zpa.ConnectorGroupArgs;
import com.pulumi.zpa.ServerGroup;
import com.pulumi.zpa.ServerGroupArgs;
import com.pulumi.zpa.inputs.ServerGroupAppConnectorGroupArgs;
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) {
// Create a App Connector Group
var exampleConnectorGroup = new ConnectorGroup("exampleConnectorGroup", ConnectorGroupArgs.builder()
.name("Example")
.description("Example")
.enabled(true)
.cityCountry("San Jose, CA")
.countryCode("US")
.latitude("37.338")
.longitude("-121.8863")
.location("San Jose, CA, US")
.upgradeDay("SUNDAY")
.upgradeTimeInSecs("66600")
.overrideVersionProfile(true)
.versionProfileId("0")
.dnsQueryType("IPV4")
.build());
var example = new ServerGroup("example", ServerGroupArgs.builder()
.name("Example")
.description("Example")
.enabled(true)
.dynamicDiscovery(true)
.appConnectorGroups(ServerGroupAppConnectorGroupArgs.builder()
.ids(exampleConnectorGroup.id())
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(exampleConnectorGroup)
.build());
}
}
resources:
example:
type: zpa:ServerGroup
properties:
name: Example
description: Example
enabled: true
dynamicDiscovery: true
appConnectorGroups:
- ids:
- ${exampleConnectorGroup.id}
options:
dependsOn:
- ${exampleConnectorGroup}
# Create a App Connector Group
exampleConnectorGroup:
type: zpa:ConnectorGroup
name: example
properties:
name: Example
description: Example
enabled: true
cityCountry: San Jose, CA
countryCode: US
latitude: '37.338'
longitude: '-121.8863'
location: San Jose, CA, US
upgradeDay: SUNDAY
upgradeTimeInSecs: '66600'
overrideVersionProfile: true
versionProfileId: 0
dnsQueryType: IPV4
Dynamic Discovery Disabled
import * as pulumi from "@pulumi/pulumi";
import * as zpa from "@bdzscaler/pulumi-zpa";
// Create an application server
const exampleApplicationServer = new zpa.ApplicationServer("example", {
name: "Example",
description: "Example",
address: "server.example.com",
enabled: true,
});
// Create a App Connector Group
const exampleConnectorGroup = new zpa.ConnectorGroup("example", {
name: "Example",
description: "Example",
enabled: true,
cityCountry: "San Jose, CA",
countryCode: "US",
latitude: "37.338",
longitude: "-121.8863",
location: "San Jose, CA, US",
upgradeDay: "SUNDAY",
upgradeTimeInSecs: "66600",
overrideVersionProfile: true,
versionProfileId: "0",
dnsQueryType: "IPV4",
});
const example = new zpa.ServerGroup("example", {
name: "Example",
description: "Example",
enabled: true,
dynamicDiscovery: false,
servers: [{
ids: [exampleApplicationServer.id],
}],
appConnectorGroups: [{
ids: [exampleConnectorGroup.id],
}],
}, {
dependsOn: [
exampleConnectorGroup,
server,
],
});
import pulumi
import zscaler_pulumi_zpa as zpa
# Create an application server
example_application_server = zpa.ApplicationServer("example",
name="Example",
description="Example",
address="server.example.com",
enabled=True)
# Create a App Connector Group
example_connector_group = zpa.ConnectorGroup("example",
name="Example",
description="Example",
enabled=True,
city_country="San Jose, CA",
country_code="US",
latitude="37.338",
longitude="-121.8863",
location="San Jose, CA, US",
upgrade_day="SUNDAY",
upgrade_time_in_secs="66600",
override_version_profile=True,
version_profile_id="0",
dns_query_type="IPV4")
example = zpa.ServerGroup("example",
name="Example",
description="Example",
enabled=True,
dynamic_discovery=False,
servers=[{
"ids": [example_application_server.id],
}],
app_connector_groups=[{
"ids": [example_connector_group.id],
}],
opts = pulumi.ResourceOptions(depends_on=[
example_connector_group,
server,
]))
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/zscaler/pulumi-zpa/sdk/go/zpa"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create an application server
exampleApplicationServer, err := zpa.NewApplicationServer(ctx, "example", &zpa.ApplicationServerArgs{
Name: pulumi.String("Example"),
Description: pulumi.String("Example"),
Address: pulumi.String("server.example.com"),
Enabled: pulumi.Bool(true),
})
if err != nil {
return err
}
// Create a App Connector Group
exampleConnectorGroup, err := zpa.NewConnectorGroup(ctx, "example", &zpa.ConnectorGroupArgs{
Name: pulumi.String("Example"),
Description: pulumi.String("Example"),
Enabled: pulumi.Bool(true),
CityCountry: pulumi.String("San Jose, CA"),
CountryCode: pulumi.String("US"),
Latitude: pulumi.String("37.338"),
Longitude: pulumi.String("-121.8863"),
Location: pulumi.String("San Jose, CA, US"),
UpgradeDay: pulumi.String("SUNDAY"),
UpgradeTimeInSecs: pulumi.String("66600"),
OverrideVersionProfile: pulumi.Bool(true),
VersionProfileId: pulumi.String("0"),
DnsQueryType: pulumi.String("IPV4"),
})
if err != nil {
return err
}
_, err = zpa.NewServerGroup(ctx, "example", &zpa.ServerGroupArgs{
Name: pulumi.String("Example"),
Description: pulumi.String("Example"),
Enabled: pulumi.Bool(true),
DynamicDiscovery: pulumi.Bool(false),
Servers: zpa.ServerGroupServerArray{
&zpa.ServerGroupServerArgs{
Ids: pulumi.StringArray{
exampleApplicationServer.ID(),
},
},
},
AppConnectorGroups: zpa.ServerGroupAppConnectorGroupArray{
&zpa.ServerGroupAppConnectorGroupArgs{
Ids: pulumi.StringArray{
exampleConnectorGroup.ID(),
},
},
},
}, pulumi.DependsOn([]pulumi.Resource{
exampleConnectorGroup,
server,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Zpa = zscaler.PulumiPackage.Zpa;
return await Deployment.RunAsync(() =>
{
// Create an application server
var exampleApplicationServer = new Zpa.ApplicationServer("example", new()
{
Name = "Example",
Description = "Example",
Address = "server.example.com",
Enabled = true,
});
// Create a App Connector Group
var exampleConnectorGroup = new Zpa.ConnectorGroup("example", new()
{
Name = "Example",
Description = "Example",
Enabled = true,
CityCountry = "San Jose, CA",
CountryCode = "US",
Latitude = "37.338",
Longitude = "-121.8863",
Location = "San Jose, CA, US",
UpgradeDay = "SUNDAY",
UpgradeTimeInSecs = "66600",
OverrideVersionProfile = true,
VersionProfileId = "0",
DnsQueryType = "IPV4",
});
var example = new Zpa.ServerGroup("example", new()
{
Name = "Example",
Description = "Example",
Enabled = true,
DynamicDiscovery = false,
Servers = new[]
{
new Zpa.Inputs.ServerGroupServerArgs
{
Ids = new[]
{
exampleApplicationServer.Id,
},
},
},
AppConnectorGroups = new[]
{
new Zpa.Inputs.ServerGroupAppConnectorGroupArgs
{
Ids = new[]
{
exampleConnectorGroup.Id,
},
},
},
}, new CustomResourceOptions
{
DependsOn =
{
exampleConnectorGroup,
server,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.zpa.ApplicationServer;
import com.pulumi.zpa.ApplicationServerArgs;
import com.pulumi.zpa.ConnectorGroup;
import com.pulumi.zpa.ConnectorGroupArgs;
import com.pulumi.zpa.ServerGroup;
import com.pulumi.zpa.ServerGroupArgs;
import com.pulumi.zpa.inputs.ServerGroupServerArgs;
import com.pulumi.zpa.inputs.ServerGroupAppConnectorGroupArgs;
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) {
// Create an application server
var exampleApplicationServer = new ApplicationServer("exampleApplicationServer", ApplicationServerArgs.builder()
.name("Example")
.description("Example")
.address("server.example.com")
.enabled(true)
.build());
// Create a App Connector Group
var exampleConnectorGroup = new ConnectorGroup("exampleConnectorGroup", ConnectorGroupArgs.builder()
.name("Example")
.description("Example")
.enabled(true)
.cityCountry("San Jose, CA")
.countryCode("US")
.latitude("37.338")
.longitude("-121.8863")
.location("San Jose, CA, US")
.upgradeDay("SUNDAY")
.upgradeTimeInSecs("66600")
.overrideVersionProfile(true)
.versionProfileId("0")
.dnsQueryType("IPV4")
.build());
var example = new ServerGroup("example", ServerGroupArgs.builder()
.name("Example")
.description("Example")
.enabled(true)
.dynamicDiscovery(false)
.servers(ServerGroupServerArgs.builder()
.ids(exampleApplicationServer.id())
.build())
.appConnectorGroups(ServerGroupAppConnectorGroupArgs.builder()
.ids(exampleConnectorGroup.id())
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(
exampleConnectorGroup,
server)
.build());
}
}
resources:
example:
type: zpa:ServerGroup
properties:
name: Example
description: Example
enabled: true
dynamicDiscovery: false
servers:
- ids:
- ${exampleApplicationServer.id}
appConnectorGroups:
- ids:
- ${exampleConnectorGroup.id}
options:
dependsOn:
- ${exampleConnectorGroup}
- ${server}
# Create an application server
exampleApplicationServer:
type: zpa:ApplicationServer
name: example
properties:
name: Example
description: Example
address: server.example.com
enabled: true
# Create a App Connector Group
exampleConnectorGroup:
type: zpa:ConnectorGroup
name: example
properties:
name: Example
description: Example
enabled: true
cityCountry: San Jose, CA
countryCode: US
latitude: '37.338'
longitude: '-121.8863'
location: San Jose, CA, US
upgradeDay: SUNDAY
upgradeTimeInSecs: '66600'
overrideVersionProfile: true
versionProfileId: 0
dnsQueryType: IPV4
Extranet Configuration
import * as pulumi from "@pulumi/pulumi";
import * as zpa from "@bdzscaler/pulumi-zpa";
const _this = zpa.getLocationController({
name: "ExtranetLocation01 | zscalerbeta.net",
ziaErName: "NewExtranet 8432",
});
const thisGetLocationGroupController = zpa.getLocationGroupController({
locationName: "ExtranetLocation01",
ziaErName: "NewExtranet 8432",
});
const thisGetExtranetResourcePartner = zpa.getExtranetResourcePartner({
name: "NewExtranet 8432",
});
const example = new zpa.ServerGroup("example", {
name: "Example",
description: "Example",
enabled: true,
dynamicDiscovery: true,
extranetEnabled: true,
extranetDtos: [{
zpnErId: thisGetExtranetResourcePartner.then(thisGetExtranetResourcePartner => thisGetExtranetResourcePartner.id),
locationDtos: [{
id: _this.then(_this => _this.id),
}],
locationGroupDtos: [{
id: thisGetLocationGroupController.then(thisGetLocationGroupController => thisGetLocationGroupController.id),
}],
}],
});
import pulumi
import pulumi_zpa as zpa
import zscaler_pulumi_zpa as zpa
this = zpa.get_location_controller(name="ExtranetLocation01 | zscalerbeta.net",
zia_er_name="NewExtranet 8432")
this_get_location_group_controller = zpa.get_location_group_controller(location_name="ExtranetLocation01",
zia_er_name="NewExtranet 8432")
this_get_extranet_resource_partner = zpa.get_extranet_resource_partner(name="NewExtranet 8432")
example = zpa.ServerGroup("example",
name="Example",
description="Example",
enabled=True,
dynamic_discovery=True,
extranet_enabled=True,
extranet_dtos=[{
"zpn_er_id": this_get_extranet_resource_partner.id,
"location_dtos": [{
"id": this.id,
}],
"location_group_dtos": [{
"id": this_get_location_group_controller.id,
}],
}])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/zscaler/pulumi-zpa/sdk/go/zpa"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
this, err := zpa.GetLocationController(ctx, &zpa.GetLocationControllerArgs{
Name: "ExtranetLocation01 | zscalerbeta.net",
ZiaErName: "NewExtranet 8432",
}, nil)
if err != nil {
return err
}
thisGetLocationGroupController, err := zpa.GetLocationGroupController(ctx, &zpa.GetLocationGroupControllerArgs{
LocationName: "ExtranetLocation01",
ZiaErName: "NewExtranet 8432",
}, nil)
if err != nil {
return err
}
thisGetExtranetResourcePartner, err := zpa.GetExtranetResourcePartner(ctx, &zpa.GetExtranetResourcePartnerArgs{
Name: pulumi.StringRef("NewExtranet 8432"),
}, nil)
if err != nil {
return err
}
_, err = zpa.NewServerGroup(ctx, "example", &zpa.ServerGroupArgs{
Name: pulumi.String("Example"),
Description: pulumi.String("Example"),
Enabled: pulumi.Bool(true),
DynamicDiscovery: pulumi.Bool(true),
ExtranetEnabled: pulumi.Bool(true),
ExtranetDtos: zpa.ServerGroupExtranetDtoArray{
&zpa.ServerGroupExtranetDtoArgs{
ZpnErId: pulumi.String(thisGetExtranetResourcePartner.Id),
LocationDtos: zpa.ServerGroupExtranetDtoLocationDtoArray{
&zpa.ServerGroupExtranetDtoLocationDtoArgs{
Id: pulumi.String(this.Id),
},
},
LocationGroupDtos: zpa.ServerGroupExtranetDtoLocationGroupDtoArray{
&zpa.ServerGroupExtranetDtoLocationGroupDtoArgs{
Id: pulumi.String(thisGetLocationGroupController.Id),
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Zpa = Pulumi.Zpa;
using Zpa = zscaler.PulumiPackage.Zpa;
return await Deployment.RunAsync(() =>
{
var @this = Zpa.GetLocationController.Invoke(new()
{
Name = "ExtranetLocation01 | zscalerbeta.net",
ZiaErName = "NewExtranet 8432",
});
var thisGetLocationGroupController = Zpa.GetLocationGroupController.Invoke(new()
{
LocationName = "ExtranetLocation01",
ZiaErName = "NewExtranet 8432",
});
var thisGetExtranetResourcePartner = Zpa.GetExtranetResourcePartner.Invoke(new()
{
Name = "NewExtranet 8432",
});
var example = new Zpa.ServerGroup("example", new()
{
Name = "Example",
Description = "Example",
Enabled = true,
DynamicDiscovery = true,
ExtranetEnabled = true,
ExtranetDtos = new[]
{
new Zpa.Inputs.ServerGroupExtranetDtoArgs
{
ZpnErId = thisGetExtranetResourcePartner.Apply(getExtranetResourcePartnerResult => getExtranetResourcePartnerResult.Id),
LocationDtos = new[]
{
new Zpa.Inputs.ServerGroupExtranetDtoLocationDtoArgs
{
Id = @this.Apply(@this => @this.Apply(getLocationControllerResult => getLocationControllerResult.Id)),
},
},
LocationGroupDtos = new[]
{
new Zpa.Inputs.ServerGroupExtranetDtoLocationGroupDtoArgs
{
Id = thisGetLocationGroupController.Apply(getLocationGroupControllerResult => getLocationGroupControllerResult.Id),
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.zpa.ZpaFunctions;
import com.pulumi.zpa.inputs.GetLocationControllerArgs;
import com.pulumi.zpa.inputs.GetLocationGroupControllerArgs;
import com.pulumi.zpa.inputs.GetExtranetResourcePartnerArgs;
import com.pulumi.zpa.ServerGroup;
import com.pulumi.zpa.ServerGroupArgs;
import com.pulumi.zpa.inputs.ServerGroupExtranetDtoArgs;
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 this = ZpaFunctions.getLocationController(GetLocationControllerArgs.builder()
.name("ExtranetLocation01 | zscalerbeta.net")
.ziaErName("NewExtranet 8432")
.build());
final var thisGetLocationGroupController = ZpaFunctions.getLocationGroupController(GetLocationGroupControllerArgs.builder()
.locationName("ExtranetLocation01")
.ziaErName("NewExtranet 8432")
.build());
final var thisGetExtranetResourcePartner = ZpaFunctions.getExtranetResourcePartner(GetExtranetResourcePartnerArgs.builder()
.name("NewExtranet 8432")
.build());
var example = new ServerGroup("example", ServerGroupArgs.builder()
.name("Example")
.description("Example")
.enabled(true)
.dynamicDiscovery(true)
.extranetEnabled(true)
.extranetDtos(ServerGroupExtranetDtoArgs.builder()
.zpnErId(thisGetExtranetResourcePartner.id())
.locationDtos(ServerGroupExtranetDtoLocationDtoArgs.builder()
.id(this_.id())
.build())
.locationGroupDtos(ServerGroupExtranetDtoLocationGroupDtoArgs.builder()
.id(thisGetLocationGroupController.id())
.build())
.build())
.build());
}
}
resources:
example:
type: zpa:ServerGroup
properties:
name: Example
description: Example
enabled: true
dynamicDiscovery: true
extranetEnabled: true
extranetDtos:
- zpnErId: ${thisGetExtranetResourcePartner.id}
locationDtos:
- id: ${this.id}
locationGroupDtos:
- id: ${thisGetLocationGroupController.id}
variables:
this:
fn::invoke:
function: zpa:getLocationController
arguments:
name: ExtranetLocation01 | zscalerbeta.net
ziaErName: NewExtranet 8432
thisGetLocationGroupController:
fn::invoke:
function: zpa:getLocationGroupController
arguments:
locationName: ExtranetLocation01
ziaErName: NewExtranet 8432
thisGetExtranetResourcePartner:
fn::invoke:
function: zpa:getExtranetResourcePartner
arguments:
name: NewExtranet 8432
Create ServerGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServerGroup(name: string, args?: ServerGroupArgs, opts?: CustomResourceOptions);@overload
def ServerGroup(resource_name: str,
args: Optional[ServerGroupArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def ServerGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
app_connector_groups: Optional[Sequence[ServerGroupAppConnectorGroupArgs]] = None,
applications: Optional[Sequence[ServerGroupApplicationArgs]] = None,
config_space: Optional[str] = None,
description: Optional[str] = None,
dynamic_discovery: Optional[bool] = None,
enabled: Optional[bool] = None,
extranet_dtos: Optional[Sequence[ServerGroupExtranetDtoArgs]] = None,
extranet_enabled: Optional[bool] = None,
ip_anchored: Optional[bool] = None,
microtenant_id: Optional[str] = None,
name: Optional[str] = None,
servers: Optional[Sequence[ServerGroupServerArgs]] = None)func NewServerGroup(ctx *Context, name string, args *ServerGroupArgs, opts ...ResourceOption) (*ServerGroup, error)public ServerGroup(string name, ServerGroupArgs? args = null, CustomResourceOptions? opts = null)
public ServerGroup(String name, ServerGroupArgs args)
public ServerGroup(String name, ServerGroupArgs args, CustomResourceOptions options)
type: zpa:ServerGroup
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 ServerGroupArgs
- 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 ServerGroupArgs
- 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 ServerGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServerGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServerGroupArgs
- 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 serverGroupResource = new Zpa.ServerGroup("serverGroupResource", new()
{
AppConnectorGroups = new[]
{
new Zpa.Inputs.ServerGroupAppConnectorGroupArgs
{
Ids = new[]
{
"string",
},
},
},
Applications = new[]
{
new Zpa.Inputs.ServerGroupApplicationArgs
{
Ids = new[]
{
"string",
},
},
},
ConfigSpace = "string",
Description = "string",
DynamicDiscovery = false,
Enabled = false,
ExtranetDtos = new[]
{
new Zpa.Inputs.ServerGroupExtranetDtoArgs
{
LocationDtos = new[]
{
new Zpa.Inputs.ServerGroupExtranetDtoLocationDtoArgs
{
Id = "string",
},
},
LocationGroupDtos = new[]
{
new Zpa.Inputs.ServerGroupExtranetDtoLocationGroupDtoArgs
{
Id = "string",
},
},
ZpnErId = "string",
},
},
ExtranetEnabled = false,
IpAnchored = false,
MicrotenantId = "string",
Name = "string",
Servers = new[]
{
new Zpa.Inputs.ServerGroupServerArgs
{
Ids = new[]
{
"string",
},
},
},
});
example, err := zpa.NewServerGroup(ctx, "serverGroupResource", &zpa.ServerGroupArgs{
AppConnectorGroups: zpa.ServerGroupAppConnectorGroupArray{
&zpa.ServerGroupAppConnectorGroupArgs{
Ids: pulumi.StringArray{
pulumi.String("string"),
},
},
},
Applications: zpa.ServerGroupApplicationArray{
&zpa.ServerGroupApplicationArgs{
Ids: pulumi.StringArray{
pulumi.String("string"),
},
},
},
ConfigSpace: pulumi.String("string"),
Description: pulumi.String("string"),
DynamicDiscovery: pulumi.Bool(false),
Enabled: pulumi.Bool(false),
ExtranetDtos: zpa.ServerGroupExtranetDtoArray{
&zpa.ServerGroupExtranetDtoArgs{
LocationDtos: zpa.ServerGroupExtranetDtoLocationDtoArray{
&zpa.ServerGroupExtranetDtoLocationDtoArgs{
Id: pulumi.String("string"),
},
},
LocationGroupDtos: zpa.ServerGroupExtranetDtoLocationGroupDtoArray{
&zpa.ServerGroupExtranetDtoLocationGroupDtoArgs{
Id: pulumi.String("string"),
},
},
ZpnErId: pulumi.String("string"),
},
},
ExtranetEnabled: pulumi.Bool(false),
IpAnchored: pulumi.Bool(false),
MicrotenantId: pulumi.String("string"),
Name: pulumi.String("string"),
Servers: zpa.ServerGroupServerArray{
&zpa.ServerGroupServerArgs{
Ids: pulumi.StringArray{
pulumi.String("string"),
},
},
},
})
var serverGroupResource = new ServerGroup("serverGroupResource", ServerGroupArgs.builder()
.appConnectorGroups(ServerGroupAppConnectorGroupArgs.builder()
.ids("string")
.build())
.applications(ServerGroupApplicationArgs.builder()
.ids("string")
.build())
.configSpace("string")
.description("string")
.dynamicDiscovery(false)
.enabled(false)
.extranetDtos(ServerGroupExtranetDtoArgs.builder()
.locationDtos(ServerGroupExtranetDtoLocationDtoArgs.builder()
.id("string")
.build())
.locationGroupDtos(ServerGroupExtranetDtoLocationGroupDtoArgs.builder()
.id("string")
.build())
.zpnErId("string")
.build())
.extranetEnabled(false)
.ipAnchored(false)
.microtenantId("string")
.name("string")
.servers(ServerGroupServerArgs.builder()
.ids("string")
.build())
.build());
server_group_resource = zpa.ServerGroup("serverGroupResource",
app_connector_groups=[{
"ids": ["string"],
}],
applications=[{
"ids": ["string"],
}],
config_space="string",
description="string",
dynamic_discovery=False,
enabled=False,
extranet_dtos=[{
"location_dtos": [{
"id": "string",
}],
"location_group_dtos": [{
"id": "string",
}],
"zpn_er_id": "string",
}],
extranet_enabled=False,
ip_anchored=False,
microtenant_id="string",
name="string",
servers=[{
"ids": ["string"],
}])
const serverGroupResource = new zpa.ServerGroup("serverGroupResource", {
appConnectorGroups: [{
ids: ["string"],
}],
applications: [{
ids: ["string"],
}],
configSpace: "string",
description: "string",
dynamicDiscovery: false,
enabled: false,
extranetDtos: [{
locationDtos: [{
id: "string",
}],
locationGroupDtos: [{
id: "string",
}],
zpnErId: "string",
}],
extranetEnabled: false,
ipAnchored: false,
microtenantId: "string",
name: "string",
servers: [{
ids: ["string"],
}],
});
type: zpa:ServerGroup
properties:
appConnectorGroups:
- ids:
- string
applications:
- ids:
- string
configSpace: string
description: string
dynamicDiscovery: false
enabled: false
extranetDtos:
- locationDtos:
- id: string
locationGroupDtos:
- id: string
zpnErId: string
extranetEnabled: false
ipAnchored: false
microtenantId: string
name: string
servers:
- ids:
- string
ServerGroup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ServerGroup resource accepts the following input properties:
- App
Connector List<zscaler.Groups Pulumi Package. Zpa. Inputs. Server Group App Connector Group> - Applications
List<zscaler.
Pulumi Package. Zpa. Inputs. Server Group Application> - This field is a json array of app-connector-id only.
- Config
Space string - Description string
- This field is the description of the server group.
- Dynamic
Discovery bool - This field controls dynamic discovery of the servers.
- Enabled bool
- This field defines if the server group is enabled or disabled.
- Extranet
Dtos List<zscaler.Pulumi Package. Zpa. Inputs. Server Group Extranet Dto> - Extranet configuration for the policy rule.
- Extranet
Enabled bool - Enable extranet for this policy rule.
- Ip
Anchored bool - Microtenant
Id string - Name string
- This field defines the name of the server group.
- Servers
List<zscaler.
Pulumi Package. Zpa. Inputs. Server Group Server> - This field is a list of servers that are applicable only when dynamic discovery is disabled. Server name is required only in cases where the new servers need to be created in this API. For existing servers, pass only the serverId.
- App
Connector []ServerGroups Group App Connector Group Args - Applications
[]Server
Group Application Args - This field is a json array of app-connector-id only.
- Config
Space string - Description string
- This field is the description of the server group.
- Dynamic
Discovery bool - This field controls dynamic discovery of the servers.
- Enabled bool
- This field defines if the server group is enabled or disabled.
- Extranet
Dtos []ServerGroup Extranet Dto Args - Extranet configuration for the policy rule.
- Extranet
Enabled bool - Enable extranet for this policy rule.
- Ip
Anchored bool - Microtenant
Id string - Name string
- This field defines the name of the server group.
- Servers
[]Server
Group Server Args - This field is a list of servers that are applicable only when dynamic discovery is disabled. Server name is required only in cases where the new servers need to be created in this API. For existing servers, pass only the serverId.
- app
Connector List<ServerGroups Group App Connector Group> - applications
List<Server
Group Application> - This field is a json array of app-connector-id only.
- config
Space String - description String
- This field is the description of the server group.
- dynamic
Discovery Boolean - This field controls dynamic discovery of the servers.
- enabled Boolean
- This field defines if the server group is enabled or disabled.
- extranet
Dtos List<ServerGroup Extranet Dto> - Extranet configuration for the policy rule.
- extranet
Enabled Boolean - Enable extranet for this policy rule.
- ip
Anchored Boolean - microtenant
Id String - name String
- This field defines the name of the server group.
- servers
List<Server
Group Server> - This field is a list of servers that are applicable only when dynamic discovery is disabled. Server name is required only in cases where the new servers need to be created in this API. For existing servers, pass only the serverId.
- app
Connector ServerGroups Group App Connector Group[] - applications
Server
Group Application[] - This field is a json array of app-connector-id only.
- config
Space string - description string
- This field is the description of the server group.
- dynamic
Discovery boolean - This field controls dynamic discovery of the servers.
- enabled boolean
- This field defines if the server group is enabled or disabled.
- extranet
Dtos ServerGroup Extranet Dto[] - Extranet configuration for the policy rule.
- extranet
Enabled boolean - Enable extranet for this policy rule.
- ip
Anchored boolean - microtenant
Id string - name string
- This field defines the name of the server group.
- servers
Server
Group Server[] - This field is a list of servers that are applicable only when dynamic discovery is disabled. Server name is required only in cases where the new servers need to be created in this API. For existing servers, pass only the serverId.
- app_
connector_ Sequence[Servergroups Group App Connector Group Args] - applications
Sequence[Server
Group Application Args] - This field is a json array of app-connector-id only.
- config_
space str - description str
- This field is the description of the server group.
- dynamic_
discovery bool - This field controls dynamic discovery of the servers.
- enabled bool
- This field defines if the server group is enabled or disabled.
- extranet_
dtos Sequence[ServerGroup Extranet Dto Args] - Extranet configuration for the policy rule.
- extranet_
enabled bool - Enable extranet for this policy rule.
- ip_
anchored bool - microtenant_
id str - name str
- This field defines the name of the server group.
- servers
Sequence[Server
Group Server Args] - This field is a list of servers that are applicable only when dynamic discovery is disabled. Server name is required only in cases where the new servers need to be created in this API. For existing servers, pass only the serverId.
- app
Connector List<Property Map>Groups - applications List<Property Map>
- This field is a json array of app-connector-id only.
- config
Space String - description String
- This field is the description of the server group.
- dynamic
Discovery Boolean - This field controls dynamic discovery of the servers.
- enabled Boolean
- This field defines if the server group is enabled or disabled.
- extranet
Dtos List<Property Map> - Extranet configuration for the policy rule.
- extranet
Enabled Boolean - Enable extranet for this policy rule.
- ip
Anchored Boolean - microtenant
Id String - name String
- This field defines the name of the server group.
- servers List<Property Map>
- This field is a list of servers that are applicable only when dynamic discovery is disabled. Server name is required only in cases where the new servers need to be created in this API. For existing servers, pass only the serverId.
Outputs
All input properties are implicitly available as output properties. Additionally, the ServerGroup 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 ServerGroup Resource
Get an existing ServerGroup 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?: ServerGroupState, opts?: CustomResourceOptions): ServerGroup@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
app_connector_groups: Optional[Sequence[ServerGroupAppConnectorGroupArgs]] = None,
applications: Optional[Sequence[ServerGroupApplicationArgs]] = None,
config_space: Optional[str] = None,
description: Optional[str] = None,
dynamic_discovery: Optional[bool] = None,
enabled: Optional[bool] = None,
extranet_dtos: Optional[Sequence[ServerGroupExtranetDtoArgs]] = None,
extranet_enabled: Optional[bool] = None,
ip_anchored: Optional[bool] = None,
microtenant_id: Optional[str] = None,
name: Optional[str] = None,
servers: Optional[Sequence[ServerGroupServerArgs]] = None) -> ServerGroupfunc GetServerGroup(ctx *Context, name string, id IDInput, state *ServerGroupState, opts ...ResourceOption) (*ServerGroup, error)public static ServerGroup Get(string name, Input<string> id, ServerGroupState? state, CustomResourceOptions? opts = null)public static ServerGroup get(String name, Output<String> id, ServerGroupState state, CustomResourceOptions options)resources: _: type: zpa:ServerGroup get: id: ${id}- 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.
- App
Connector List<zscaler.Groups Pulumi Package. Zpa. Inputs. Server Group App Connector Group> - Applications
List<zscaler.
Pulumi Package. Zpa. Inputs. Server Group Application> - This field is a json array of app-connector-id only.
- Config
Space string - Description string
- This field is the description of the server group.
- Dynamic
Discovery bool - This field controls dynamic discovery of the servers.
- Enabled bool
- This field defines if the server group is enabled or disabled.
- Extranet
Dtos List<zscaler.Pulumi Package. Zpa. Inputs. Server Group Extranet Dto> - Extranet configuration for the policy rule.
- Extranet
Enabled bool - Enable extranet for this policy rule.
- Ip
Anchored bool - Microtenant
Id string - Name string
- This field defines the name of the server group.
- Servers
List<zscaler.
Pulumi Package. Zpa. Inputs. Server Group Server> - This field is a list of servers that are applicable only when dynamic discovery is disabled. Server name is required only in cases where the new servers need to be created in this API. For existing servers, pass only the serverId.
- App
Connector []ServerGroups Group App Connector Group Args - Applications
[]Server
Group Application Args - This field is a json array of app-connector-id only.
- Config
Space string - Description string
- This field is the description of the server group.
- Dynamic
Discovery bool - This field controls dynamic discovery of the servers.
- Enabled bool
- This field defines if the server group is enabled or disabled.
- Extranet
Dtos []ServerGroup Extranet Dto Args - Extranet configuration for the policy rule.
- Extranet
Enabled bool - Enable extranet for this policy rule.
- Ip
Anchored bool - Microtenant
Id string - Name string
- This field defines the name of the server group.
- Servers
[]Server
Group Server Args - This field is a list of servers that are applicable only when dynamic discovery is disabled. Server name is required only in cases where the new servers need to be created in this API. For existing servers, pass only the serverId.
- app
Connector List<ServerGroups Group App Connector Group> - applications
List<Server
Group Application> - This field is a json array of app-connector-id only.
- config
Space String - description String
- This field is the description of the server group.
- dynamic
Discovery Boolean - This field controls dynamic discovery of the servers.
- enabled Boolean
- This field defines if the server group is enabled or disabled.
- extranet
Dtos List<ServerGroup Extranet Dto> - Extranet configuration for the policy rule.
- extranet
Enabled Boolean - Enable extranet for this policy rule.
- ip
Anchored Boolean - microtenant
Id String - name String
- This field defines the name of the server group.
- servers
List<Server
Group Server> - This field is a list of servers that are applicable only when dynamic discovery is disabled. Server name is required only in cases where the new servers need to be created in this API. For existing servers, pass only the serverId.
- app
Connector ServerGroups Group App Connector Group[] - applications
Server
Group Application[] - This field is a json array of app-connector-id only.
- config
Space string - description string
- This field is the description of the server group.
- dynamic
Discovery boolean - This field controls dynamic discovery of the servers.
- enabled boolean
- This field defines if the server group is enabled or disabled.
- extranet
Dtos ServerGroup Extranet Dto[] - Extranet configuration for the policy rule.
- extranet
Enabled boolean - Enable extranet for this policy rule.
- ip
Anchored boolean - microtenant
Id string - name string
- This field defines the name of the server group.
- servers
Server
Group Server[] - This field is a list of servers that are applicable only when dynamic discovery is disabled. Server name is required only in cases where the new servers need to be created in this API. For existing servers, pass only the serverId.
- app_
connector_ Sequence[Servergroups Group App Connector Group Args] - applications
Sequence[Server
Group Application Args] - This field is a json array of app-connector-id only.
- config_
space str - description str
- This field is the description of the server group.
- dynamic_
discovery bool - This field controls dynamic discovery of the servers.
- enabled bool
- This field defines if the server group is enabled or disabled.
- extranet_
dtos Sequence[ServerGroup Extranet Dto Args] - Extranet configuration for the policy rule.
- extranet_
enabled bool - Enable extranet for this policy rule.
- ip_
anchored bool - microtenant_
id str - name str
- This field defines the name of the server group.
- servers
Sequence[Server
Group Server Args] - This field is a list of servers that are applicable only when dynamic discovery is disabled. Server name is required only in cases where the new servers need to be created in this API. For existing servers, pass only the serverId.
- app
Connector List<Property Map>Groups - applications List<Property Map>
- This field is a json array of app-connector-id only.
- config
Space String - description String
- This field is the description of the server group.
- dynamic
Discovery Boolean - This field controls dynamic discovery of the servers.
- enabled Boolean
- This field defines if the server group is enabled or disabled.
- extranet
Dtos List<Property Map> - Extranet configuration for the policy rule.
- extranet
Enabled Boolean - Enable extranet for this policy rule.
- ip
Anchored Boolean - microtenant
Id String - name String
- This field defines the name of the server group.
- servers List<Property Map>
- This field is a list of servers that are applicable only when dynamic discovery is disabled. Server name is required only in cases where the new servers need to be created in this API. For existing servers, pass only the serverId.
Supporting Types
ServerGroupAppConnectorGroup, ServerGroupAppConnectorGroupArgs
- Ids List<string>
- Ids []string
- ids List<String>
- ids string[]
- ids Sequence[str]
- ids List<String>
ServerGroupApplication, ServerGroupApplicationArgs
- Ids List<string>
- Ids []string
- ids List<String>
- ids string[]
- ids Sequence[str]
- ids List<String>
ServerGroupExtranetDto, ServerGroupExtranetDtoArgs
- Location
Dtos List<zscaler.Pulumi Package. Zpa. Inputs. Server Group Extranet Dto Location Dto> - List of location DTOs.
- Location
Group List<zscaler.Dtos Pulumi Package. Zpa. Inputs. Server Group Extranet Dto Location Group Dto> - List of location group DTOs.
- Zpn
Er stringId - ZPN Extranet Resource ID.
- Location
Dtos []ServerGroup Extranet Dto Location Dto - List of location DTOs.
- Location
Group []ServerDtos Group Extranet Dto Location Group Dto - List of location group DTOs.
- Zpn
Er stringId - ZPN Extranet Resource ID.
- location
Dtos List<ServerGroup Extranet Dto Location Dto> - List of location DTOs.
- location
Group List<ServerDtos Group Extranet Dto Location Group Dto> - List of location group DTOs.
- zpn
Er StringId - ZPN Extranet Resource ID.
- location
Dtos ServerGroup Extranet Dto Location Dto[] - List of location DTOs.
- location
Group ServerDtos Group Extranet Dto Location Group Dto[] - List of location group DTOs.
- zpn
Er stringId - ZPN Extranet Resource ID.
- location_
dtos Sequence[ServerGroup Extranet Dto Location Dto] - List of location DTOs.
- location_
group_ Sequence[Serverdtos Group Extranet Dto Location Group Dto] - List of location group DTOs.
- zpn_
er_ strid - ZPN Extranet Resource ID.
- location
Dtos List<Property Map> - List of location DTOs.
- location
Group List<Property Map>Dtos - List of location group DTOs.
- zpn
Er StringId - ZPN Extranet Resource ID.
ServerGroupExtranetDtoLocationDto, ServerGroupExtranetDtoLocationDtoArgs
- Id string
- Location ID.
- Id string
- Location ID.
- id String
- Location ID.
- id string
- Location ID.
- id str
- Location ID.
- id String
- Location ID.
ServerGroupExtranetDtoLocationGroupDto, ServerGroupExtranetDtoLocationGroupDtoArgs
- Id string
- Location Group ID.
- Id string
- Location Group ID.
- id String
- Location Group ID.
- id string
- Location Group ID.
- id str
- Location Group ID.
- id String
- Location Group ID.
ServerGroupServer, ServerGroupServerArgs
- Ids List<string>
- Ids []string
- ids List<String>
- ids string[]
- ids Sequence[str]
- ids List<String>
Import
Zscaler offers a dedicated tool called Zscaler-Terraformer to allow the automated import of ZPA configurations into Terraform-compliant HashiCorp Configuration Language.
Visit
Server Groups can be imported; use <SERVER GROUP ID> or <SERVER GROUP NAME> as the import ID.
For example:
$ pulumi import zpa:index/serverGroup:ServerGroup example <server_group_id>
or
$ pulumi import zpa:index/serverGroup:ServerGroup example <server_group_name>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- zpa zscaler/pulumi-zpa
- License
- MIT
- Notes
- This Pulumi package is based on the
zpaTerraform Provider.
