Use the zia_sub_cloud resource to update the subcloud and excluded data centers based on the specified ID.
NOTE: This an Early Access feature.
Example Usage
data "zia_sub_cloud" "lookup" {
name = "BIZDevZSThree01"
}
data "zia_datacenters" "this" {
name = "YVR1"
}
data "zia_datacenters" "this1" {
name = "SEA1"
}
resource "zia_sub_cloud" "this" {
cloud_id = data.zia_sub_cloud.lookup.id
name = "BIZDevZSThree01"
# Using Unix timestamps
exclusions {
datacenter {
id = data.zia_datacenters.this.datacenters[0].id
name = data.zia_datacenters.this.datacenters[0].name
}
country = "CANADA"
end_time = 1770422399
}
# Using human-readable UTC date/time (same as UI "Data Center Disabled Until")
exclusions {
datacenter {
id = data.zia_datacenters.this1.datacenters[0].id
name = data.zia_datacenters.this1.datacenters[0].name
}
country = "UNITED_STATES"
end_time_utc = "02/19/2026 11:59:00 pm"
}
}
Create SubCloud Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SubCloud(name: string, args: SubCloudArgs, opts?: CustomResourceOptions);@overload
def SubCloud(resource_name: str,
args: SubCloudArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SubCloud(resource_name: str,
opts: Optional[ResourceOptions] = None,
cloud_id: Optional[int] = None,
exclusions: Optional[Sequence[SubCloudExclusionArgs]] = None,
name: Optional[str] = None)func NewSubCloud(ctx *Context, name string, args SubCloudArgs, opts ...ResourceOption) (*SubCloud, error)public SubCloud(string name, SubCloudArgs args, CustomResourceOptions? opts = null)
public SubCloud(String name, SubCloudArgs args)
public SubCloud(String name, SubCloudArgs args, CustomResourceOptions options)
type: zia:SubCloud
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 SubCloudArgs
- 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 SubCloudArgs
- 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 SubCloudArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SubCloudArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SubCloudArgs
- 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 subCloudResource = new Zia.SubCloud("subCloudResource", new()
{
CloudId = 0,
Exclusions = new[]
{
new Zia.Inputs.SubCloudExclusionArgs
{
Country = "string",
Datacenter = new Zia.Inputs.SubCloudExclusionDatacenterArgs
{
Id = 0,
Country = "string",
Name = "string",
},
EndTime = 0,
EndTimeUtc = "string",
},
},
Name = "string",
});
example, err := zia.NewSubCloud(ctx, "subCloudResource", &zia.SubCloudArgs{
CloudId: pulumi.Int(0),
Exclusions: zia.SubCloudExclusionArray{
&zia.SubCloudExclusionArgs{
Country: pulumi.String("string"),
Datacenter: &zia.SubCloudExclusionDatacenterArgs{
Id: pulumi.Int(0),
Country: pulumi.String("string"),
Name: pulumi.String("string"),
},
EndTime: pulumi.Int(0),
EndTimeUtc: pulumi.String("string"),
},
},
Name: pulumi.String("string"),
})
var subCloudResource = new SubCloud("subCloudResource", SubCloudArgs.builder()
.cloudId(0)
.exclusions(SubCloudExclusionArgs.builder()
.country("string")
.datacenter(SubCloudExclusionDatacenterArgs.builder()
.id(0)
.country("string")
.name("string")
.build())
.endTime(0)
.endTimeUtc("string")
.build())
.name("string")
.build());
sub_cloud_resource = zia.SubCloud("subCloudResource",
cloud_id=0,
exclusions=[{
"country": "string",
"datacenter": {
"id": 0,
"country": "string",
"name": "string",
},
"end_time": 0,
"end_time_utc": "string",
}],
name="string")
const subCloudResource = new zia.SubCloud("subCloudResource", {
cloudId: 0,
exclusions: [{
country: "string",
datacenter: {
id: 0,
country: "string",
name: "string",
},
endTime: 0,
endTimeUtc: "string",
}],
name: "string",
});
type: zia:SubCloud
properties:
cloudId: 0
exclusions:
- country: string
datacenter:
country: string
id: 0
name: string
endTime: 0
endTimeUtc: string
name: string
SubCloud 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 SubCloud resource accepts the following input properties:
- Cloud
Id int - (Integer) Unique identifier for the subcloud as an integer.
- Exclusions
List<zscaler.
Pulumi Package. Zia. Inputs. Sub Cloud Exclusion> - (List) List of data centers excluded from the subcloud.
- Name string
- (String) Datacenter name.
- Cloud
Id int - (Integer) Unique identifier for the subcloud as an integer.
- Exclusions
[]Sub
Cloud Exclusion Args - (List) List of data centers excluded from the subcloud.
- Name string
- (String) Datacenter name.
- cloud
Id Integer - (Integer) Unique identifier for the subcloud as an integer.
- exclusions
List<Sub
Cloud Exclusion> - (List) List of data centers excluded from the subcloud.
- name String
- (String) Datacenter name.
- cloud
Id number - (Integer) Unique identifier for the subcloud as an integer.
- exclusions
Sub
Cloud Exclusion[] - (List) List of data centers excluded from the subcloud.
- name string
- (String) Datacenter name.
- cloud_
id int - (Integer) Unique identifier for the subcloud as an integer.
- exclusions
Sequence[Sub
Cloud Exclusion Args] - (List) List of data centers excluded from the subcloud.
- name str
- (String) Datacenter name.
- cloud
Id Number - (Integer) Unique identifier for the subcloud as an integer.
- exclusions List<Property Map>
- (List) List of data centers excluded from the subcloud.
- name String
- (String) Datacenter name.
Outputs
All input properties are implicitly available as output properties. Additionally, the SubCloud resource produces the following output properties:
- Dcs
List<zscaler.
Pulumi Package. Zia. Outputs. Sub Cloud Dc> - Set of data centers associated with the subcloud (read-only).
- Id string
- The provider-assigned unique ID for this managed resource.
- Dcs
[]Sub
Cloud Dc - Set of data centers associated with the subcloud (read-only).
- Id string
- The provider-assigned unique ID for this managed resource.
- dcs
List<Sub
Cloud Dc> - Set of data centers associated with the subcloud (read-only).
- id String
- The provider-assigned unique ID for this managed resource.
- dcs
Sub
Cloud Dc[] - Set of data centers associated with the subcloud (read-only).
- id string
- The provider-assigned unique ID for this managed resource.
- dcs
Sequence[Sub
Cloud Dc] - Set of data centers associated with the subcloud (read-only).
- id str
- The provider-assigned unique ID for this managed resource.
- dcs List<Property Map>
- Set of data centers associated with the subcloud (read-only).
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing SubCloud Resource
Get an existing SubCloud 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?: SubCloudState, opts?: CustomResourceOptions): SubCloud@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cloud_id: Optional[int] = None,
dcs: Optional[Sequence[SubCloudDcArgs]] = None,
exclusions: Optional[Sequence[SubCloudExclusionArgs]] = None,
name: Optional[str] = None) -> SubCloudfunc GetSubCloud(ctx *Context, name string, id IDInput, state *SubCloudState, opts ...ResourceOption) (*SubCloud, error)public static SubCloud Get(string name, Input<string> id, SubCloudState? state, CustomResourceOptions? opts = null)public static SubCloud get(String name, Output<String> id, SubCloudState state, CustomResourceOptions options)resources: _: type: zia:SubCloud 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.
- Cloud
Id int - (Integer) Unique identifier for the subcloud as an integer.
- Dcs
List<zscaler.
Pulumi Package. Zia. Inputs. Sub Cloud Dc> - Set of data centers associated with the subcloud (read-only).
- Exclusions
List<zscaler.
Pulumi Package. Zia. Inputs. Sub Cloud Exclusion> - (List) List of data centers excluded from the subcloud.
- Name string
- (String) Datacenter name.
- Cloud
Id int - (Integer) Unique identifier for the subcloud as an integer.
- Dcs
[]Sub
Cloud Dc Args - Set of data centers associated with the subcloud (read-only).
- Exclusions
[]Sub
Cloud Exclusion Args - (List) List of data centers excluded from the subcloud.
- Name string
- (String) Datacenter name.
- cloud
Id Integer - (Integer) Unique identifier for the subcloud as an integer.
- dcs
List<Sub
Cloud Dc> - Set of data centers associated with the subcloud (read-only).
- exclusions
List<Sub
Cloud Exclusion> - (List) List of data centers excluded from the subcloud.
- name String
- (String) Datacenter name.
- cloud
Id number - (Integer) Unique identifier for the subcloud as an integer.
- dcs
Sub
Cloud Dc[] - Set of data centers associated with the subcloud (read-only).
- exclusions
Sub
Cloud Exclusion[] - (List) List of data centers excluded from the subcloud.
- name string
- (String) Datacenter name.
- cloud_
id int - (Integer) Unique identifier for the subcloud as an integer.
- dcs
Sequence[Sub
Cloud Dc Args] - Set of data centers associated with the subcloud (read-only).
- exclusions
Sequence[Sub
Cloud Exclusion Args] - (List) List of data centers excluded from the subcloud.
- name str
- (String) Datacenter name.
- cloud
Id Number - (Integer) Unique identifier for the subcloud as an integer.
- dcs List<Property Map>
- Set of data centers associated with the subcloud (read-only).
- exclusions List<Property Map>
- (List) List of data centers excluded from the subcloud.
- name String
- (String) Datacenter name.
Supporting Types
SubCloudDc, SubCloudDcArgs
SubCloudExclusion, SubCloudExclusionArgs
- Country string
- (String) Country where the excluded data center is located.
- Datacenter
zscaler.
Pulumi Package. Zia. Inputs. Sub Cloud Exclusion Datacenter - (List) The excluded datacenter reference.
- End
Time int - (Integer, Optional) Exclusion end time (Unix timestamp). Either
end_timeorend_time_utcmust be set. - End
Time stringUtc - (String, Optional) Data center disabled until (UTC). Format:
MM/DD/YYYY HH:MM:SS am/pm. If set, overridesend_time.
- Country string
- (String) Country where the excluded data center is located.
- Datacenter
Sub
Cloud Exclusion Datacenter - (List) The excluded datacenter reference.
- End
Time int - (Integer, Optional) Exclusion end time (Unix timestamp). Either
end_timeorend_time_utcmust be set. - End
Time stringUtc - (String, Optional) Data center disabled until (UTC). Format:
MM/DD/YYYY HH:MM:SS am/pm. If set, overridesend_time.
- country String
- (String) Country where the excluded data center is located.
- datacenter
Sub
Cloud Exclusion Datacenter - (List) The excluded datacenter reference.
- end
Time Integer - (Integer, Optional) Exclusion end time (Unix timestamp). Either
end_timeorend_time_utcmust be set. - end
Time StringUtc - (String, Optional) Data center disabled until (UTC). Format:
MM/DD/YYYY HH:MM:SS am/pm. If set, overridesend_time.
- country string
- (String) Country where the excluded data center is located.
- datacenter
Sub
Cloud Exclusion Datacenter - (List) The excluded datacenter reference.
- end
Time number - (Integer, Optional) Exclusion end time (Unix timestamp). Either
end_timeorend_time_utcmust be set. - end
Time stringUtc - (String, Optional) Data center disabled until (UTC). Format:
MM/DD/YYYY HH:MM:SS am/pm. If set, overridesend_time.
- country str
- (String) Country where the excluded data center is located.
- datacenter
Sub
Cloud Exclusion Datacenter - (List) The excluded datacenter reference.
- end_
time int - (Integer, Optional) Exclusion end time (Unix timestamp). Either
end_timeorend_time_utcmust be set. - end_
time_ strutc - (String, Optional) Data center disabled until (UTC). Format:
MM/DD/YYYY HH:MM:SS am/pm. If set, overridesend_time.
- country String
- (String) Country where the excluded data center is located.
- datacenter Property Map
- (List) The excluded datacenter reference.
- end
Time Number - (Integer, Optional) Exclusion end time (Unix timestamp). Either
end_timeorend_time_utcmust be set. - end
Time StringUtc - (String, Optional) Data center disabled until (UTC). Format:
MM/DD/YYYY HH:MM:SS am/pm. If set, overridesend_time.
SubCloudExclusionDatacenter, SubCloudExclusionDatacenterArgs
Import
Zscaler offers a dedicated tool called Zscaler-Terraformer to allow the automated import of ZIA configurations into Terraform-compliant HashiCorp Configuration Language. Visit
zia_sub_cloud can be imported by using <SUB_CLOUD ID> or <SUB_CLOUD NAME> as the import ID.
For example:
$ pulumi import zia:index/subCloud:SubCloud example <sub_cloud_id>
or
$ pulumi import zia:index/subCloud:SubCloud example <sub_cloud_name>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- zia zscaler/pulumi-zia
- License
- MIT
- Notes
- This Pulumi package is based on the
ziaTerraform Provider.
