Documentation
¶
Overview ¶
Use this data source to query the public IPv6 attached to a single vNIC.
Example Usage ¶
```hcl
data "zenlayercloud_zec_vnic_public_ipv6" "demo" {
nic_id = "1680855999352675875"
}
output "ipv6_rate_limit_mode" {
value = data.zenlayercloud_zec_vnic_public_ipv6.demo.rate_limit_mode
}
```
Use this data source to get all vm available zones.
Example Usage ¶
```hcl data "zenlayercloud_zec_zones" "all" { }
data "zenlayercloud_zec_zones" "hongkong" {
name_regex = "SEL*"
}
```
Provides a resource to create a ZEC high-availability virtual IP (HaVip).
~> NOTE: Make sure the target subnet has available private IP addresses. If `ip_address` is omitted, the system will allocate one automatically from the subnet; if specified, it must be an available IP within the subnet's CIDR block.
Example Usage ¶
```hcl
resource "zenlayercloud_zec_havip" "example" {
subnet_id = "subnet-xxxxxxxx"
name = "example-havip"
}
```
Import ¶
HaVip can be imported using the id, e.g.
``` terraform import zenlayercloud_zec_havip.example havip-xxxxxxxx ```
Provides a resource to bind a ZEC instance to a high-availability virtual IP (HaVip).
Example Usage ¶
```hcl
resource "zenlayercloud_zec_havip_association" "example" {
ha_vip_id = "havip-xxxxxxxx"
instance_id = "vm-xxxxxxxx"
}
```
Import ¶
HaVip association can be imported using the id (ha_vip_id:instance_id), e.g.
``` terraform import zenlayercloud_zec_havip_association.example havip-xxxxxxxx:vm-xxxxxxxx ```
Use this resource to create a custom image from a ZEC instance, or import an existing custom image to manage its name / tags via Terraform.
Example Usage ¶
```hcl
resource "zenlayercloud_zec_image" "foo" {
instance_id = "1660545330971680835"
image_name = "my-custom-image"
tags = {
env = "test"
}
}
```
Import ¶
A custom image can be imported using its id, e.g.
``` $ terraform import zenlayercloud_zec_image.foo <imageId> ```
Use this resource to manage the cross-region distribution of a custom ZEC image. Declare the full set of regions (including the source region) where the image should exist; Terraform will call CopyImage for additions and DeleteImageCopy for removals.
Example Usage ¶
```hcl
resource "zenlayercloud_zec_image_copy" "example" {
image_id = zenlayercloud_zec_image.img.id
region_id_list = ["na-west-1", "asia-southeast-1"]
}
```
Import ¶
An image-copy resource can be imported using the image id, e.g.
``` $ terraform import zenlayercloud_zec_image_copy.example <imageId> ```
Provides a resource to manage the rate limit mode of an existing unmanaged egress IP.
This resource does NOT create or delete the unmanaged egress IP itself; it only adopts an existing unmanaged egress IP into Terraform state and allows updates to its `rate_limit_mode`. Destroying this resource only removes it from state.
Example Usage ¶
```hcl
resource "zenlayercloud_zec_unmanaged_egress_ip" "demo" {
unmanaged_egress_ip_id = "xxxxxxxxxxxxxxxxx"
rate_limit_mode = "LOOSE"
}
```
Import ¶
Unmanaged egress IP rate limit mode can be imported, e.g.
``` $ terraform import zenlayercloud_zec_unmanaged_egress_ip.demo unmanaged-egress-ip-id ```
Index ¶
- Constants
- Variables
- func BuildDiskState(zecService *ZecService, diskId string, ctx context.Context, ...) *resource.StateChangeConf
- func BuildNatGatewayState(zecService ZecService, natGatewayId string, ctx context.Context, ...) *resource.StateChangeConf
- func BuildSnapshotState(zecService *ZecService, diskId string, ctx context.Context, ...) *resource.StateChangeConf
- func DataSourceZenlayerCloudBorderGateways() *schema.Resource
- func DataSourceZenlayerCloudCidrs() *schema.Resource
- func DataSourceZenlayerCloudEips() *schema.Resource
- func DataSourceZenlayerCloudIpv6Cidrs() *schema.Resource
- func DataSourceZenlayerCloudZecAutoSnapshotPolicies() *schema.Resource
- func DataSourceZenlayerCloudZecDDoSPolicies() *schema.Resource
- func DataSourceZenlayerCloudZecDhcpOptionsSets() *schema.Resource
- func DataSourceZenlayerCloudZecDisks() *schema.Resource
- func DataSourceZenlayerCloudZecGpuInstanceConfigs() *schema.Resource
- func DataSourceZenlayerCloudZecHaVips() *schema.Resource
- func DataSourceZenlayerCloudZecImages() *schema.Resource
- func DataSourceZenlayerCloudZecInstances() *schema.Resource
- func DataSourceZenlayerCloudZecNatGateway() *schema.Resource
- func DataSourceZenlayerCloudZecNatGatewayDnats() *schema.Resource
- func DataSourceZenlayerCloudZecNatGatewaySnats() *schema.Resource
- func DataSourceZenlayerCloudZecPlacementGroups() *schema.Resource
- func DataSourceZenlayerCloudZecQosPolicyGroups() *schema.Resource
- func DataSourceZenlayerCloudZecSnapshots() *schema.Resource
- func DataSourceZenlayerCloudZecSubnets() *schema.Resource
- func DataSourceZenlayerCloudZecVNicPublicIPv6() *schema.Resource
- func DataSourceZenlayerCloudZecVmInventoryCapacities() *schema.Resource
- func DataSourceZenlayerCloudZecVnics() *schema.Resource
- func DataSourceZenlayerCloudZecVpcRoutes() *schema.Resource
- func DataSourceZenlayerCloudZecVpcs() *schema.Resource
- func ResourceZenlayerCloudBorderGateway() *schema.Resource
- func ResourceZenlayerCloudBorderGatewayAssociation() *schema.Resource
- func ResourceZenlayerCloudEipAssociation() *schema.Resource
- func ResourceZenlayerCloudGlobalVpc() *schema.Resource
- func ResourceZenlayerCloudGlobalVpcRoute() *schema.Resource
- func ResourceZenlayerCloudZecCidr() *schema.Resource
- func ResourceZenlayerCloudZecDDoSPolicy() *schema.Resource
- func ResourceZenlayerCloudZecDhcpOptionsSet() *schema.Resource
- func ResourceZenlayerCloudZecDhcpOptionsSetAttachment() *schema.Resource
- func ResourceZenlayerCloudZecDisk() *schema.Resource
- func ResourceZenlayerCloudZecDiskAttachment() *schema.Resource
- func ResourceZenlayerCloudZecElasticIP() *schema.Resource
- func ResourceZenlayerCloudZecHaVip() *schema.Resource
- func ResourceZenlayerCloudZecHaVipAssociation() *schema.Resource
- func ResourceZenlayerCloudZecImage() *schema.Resource
- func ResourceZenlayerCloudZecImageCopy() *schema.Resource
- func ResourceZenlayerCloudZecInstance() *schema.Resource
- func ResourceZenlayerCloudZecPlacementGroup() *schema.Resource
- func ResourceZenlayerCloudZecPlacementGroupAssignment() *schema.Resource
- func ResourceZenlayerCloudZecQosPolicyGroup() *schema.Resource
- func ResourceZenlayerCloudZecQosPolicyGroupMember() *schema.Resource
- func ResourceZenlayerCloudZecSecurityGroup() *schema.Resource
- func ResourceZenlayerCloudZecSecurityGroupRuleSet() *schema.Resource
- func ResourceZenlayerCloudZecSnapshot() *schema.Resource
- func ResourceZenlayerCloudZecSnapshotCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
- func ResourceZenlayerCloudZecSnapshotDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
- func ResourceZenlayerCloudZecSnapshotPolicy() *schema.Resource
- func ResourceZenlayerCloudZecSnapshotPolicyAttachment() *schema.Resource
- func ResourceZenlayerCloudZecSnapshotRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
- func ResourceZenlayerCloudZecSnapshotUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
- func ResourceZenlayerCloudZecSubnet() *schema.Resource
- func ResourceZenlayerCloudZecUnmanagedEgressIp() *schema.Resource
- func ResourceZenlayerCloudZecVNic() *schema.Resource
- func ResourceZenlayerCloudZecVNicAttachment() *schema.Resource
- func ResourceZenlayerCloudZecVNicIPv4() *schema.Resource
- func ResourceZenlayerCloudZecVNicPublicIPv6() *schema.Resource
- func ResourceZenlayerCloudZecVpcNatGateway() *schema.Resource
- func ResourceZenlayerCloudZecVpcNatGatewayDnat() *schema.Resource
- func ResourceZenlayerCloudZecVpcNatGatewaySnat() *schema.Resource
- func ResourceZenlayerCloudZecVpcSecurityGroupAttachment() *schema.Resource
- type BoarderGatewayFilter
- type CidrFilter
- type DDoSPolicyFilter
- type DhcpOptionsSetFilter
- type EipFilter
- type HaVipFilter
- type ImageFilter
- type Ipv6CidrFilter
- type PlacementGroupFilter
- type QosPolicyGroupFilter
- type SubnetFilter
- type VpcRouteFilter
- type ZecAutoSnapshotPolicyFilter
- type ZecDiskFilter
- type ZecInstancesFilter
- type ZecNatGatewayFilter
- type ZecNicFilter
- type ZecService
- func (s *ZecService) AddSubnetIpv6(ctx context.Context, subnetId string, ipv6Type string) error
- func (s *ZecService) AssignNetworkInterfaceIpv6(ctx context.Context, nicId string, internetChargeType *string, bandwidth *int, ...) error
- func (s *ZecService) AttachDDoSPolicy(ctx context.Context, policyId string, ipv4Ids []string) error
- func (s *ZecService) CopyImage(ctx context.Context, imageId string, regionIds []string) error
- func (s *ZecService) DeleteBorderGateway(ctx context.Context, zbgId string) error
- func (s *ZecService) DeleteDiskById(ctx context.Context, diskId string) error
- func (s *ZecService) DeleteDnatEntry(ctx context.Context, dnatId string) error
- func (s *ZecService) DeleteImage(ctx context.Context, imageId string) error
- func (s *ZecService) DeleteImageCopy(ctx context.Context, imageId string, regionIds []string) error
- func (s *ZecService) DeleteInstance(ctx context.Context, instanceId string) error
- func (s *ZecService) DeleteNatGateway(ctx context.Context, natGatewayId string) error
- func (s *ZecService) DeleteSecurityGroupById(ctx context.Context, id string) error
- func (s *ZecService) DeleteSnapshot(ctx context.Context, snapshotId string) error
- func (s *ZecService) DeleteSnapshotPolicy(ctx context.Context, autoSnapshotPolicyId string) error
- func (s *ZecService) DeleteSnatEntry(ctx context.Context, snatId string) error
- func (s *ZecService) DeleteSubnet(ctx context.Context, subnetId string) error
- func (s *ZecService) DeleteVnicById(ctx context.Context, nicId string) error
- func (s *ZecService) DeleteVpc(ctx context.Context, vpcId string) error
- func (s *ZecService) DeleteVpcRoute(ctx context.Context, routeId string) error
- func (s *ZecService) DescribeAutoSnapshotPolicies(ctx context.Context, filter *ZecAutoSnapshotPolicyFilter) (policies []*zec2.AutoSnapshotPolicy, err error)
- func (s *ZecService) DescribeBoardGateways(filter *BoarderGatewayFilter) (zbgs []*zec2.ZbgInfo, err error)
- func (s *ZecService) DescribeBorderGatewayById(ctx context.Context, zbgId string) (*zec.ZbgInfo, error)
- func (s *ZecService) DescribeCidrById(ctx context.Context, cidrId string) (*zec2.CidrInfo, error)
- func (s *ZecService) DescribeCidrsByFilter(ctx context.Context, filter *CidrFilter) (cidrs []*zec2.CidrInfo, err error)
- func (s *ZecService) DescribeCustomImageById(ctx context.Context, imageId string) (*zec2.CustomImage, error)
- func (s *ZecService) DescribeDDoSPoliciesByFilter(ctx context.Context, filter *DDoSPolicyFilter) (policies []*zec2.PolicyInfo, err error)
- func (s *ZecService) DescribeDDoSPolicyById(ctx context.Context, policyId string) (*zec2.DescribePolicyDetailResponseParams, error)
- func (s *ZecService) DescribeDhcpOptionsSetById(ctx context.Context, dhcpOptionsSetId string) (*zec2.DhcpOptionsSet, error)
- func (s *ZecService) DescribeDhcpOptionsSetsByFilter(ctx context.Context, filter *DhcpOptionsSetFilter) (dhcpOptionsSets []*zec2.DhcpOptionsSet, err error)
- func (s *ZecService) DescribeDiskById(ctx context.Context, diskId string) (*zec2.DiskInfo, error)
- func (s *ZecService) DescribeDisks(ctx context.Context, filter *ZecDiskFilter) (disks []*zec2.DiskInfo, err error)
- func (s *ZecService) DescribeEipById(ctx context.Context, eipId string) (*zec2.EipInfo, error)
- func (s *ZecService) DescribeEipsByFilter(ctx context.Context, filter *EipFilter) (eips []*zec2.EipInfo, err error)
- func (s *ZecService) DescribeGpuInstanceConfigInfos(ctx context.Context, zoneId, instanceType string) ([]*zec2.GpuInstanceTypeQuotaItem, error)
- func (s *ZecService) DescribeHaVipById(ctx context.Context, haVipId string) (*zec2.HaVipInfo, error)
- func (s *ZecService) DescribeHaVipsByFilter(ctx context.Context, filter *HaVipFilter) ([]*zec2.HaVipInfo, error)
- func (s *ZecService) DescribeImageById(ctx context.Context, imageId string) (*zec2.CustomImage, error)
- func (s *ZecService) DescribeImagesByFilter(filter *ImageFilter) (images []*zec2.Image, err error)
- func (s *ZecService) DescribeInstanceById(ctx context.Context, instanceId string) (instance *zec2.InstanceInfo, err error)
- func (s *ZecService) DescribeInstancesByFilter(filter *ZecInstancesFilter) (instances []*zec2.InstanceInfo, err error)
- func (s *ZecService) DescribeIpv6CidrById(ctx context.Context, cidrId string) (*zec2.Ipv6CidrInfo, error)
- func (s *ZecService) DescribeIpv6CidrsByFilter(ctx context.Context, filter *Ipv6CidrFilter) (cidrs []*zec2.Ipv6CidrInfo, err error)
- func (s *ZecService) DescribeNatGatewayById(ctx context.Context, natGatewayId string) (*zec2.NatGateway, error)
- func (s *ZecService) DescribeNatGatewayDetailById(ctx context.Context, natGatewayId string) (*zec2.DescribeNatGatewayDetailResponseParams, error)
- func (s *ZecService) DescribeNatGateways(ctx context.Context, filter *ZecNatGatewayFilter) (nats []*zec2.NatGateway, err error)
- func (s *ZecService) DescribeNetworkInterfacePublicIPv6ByNicId(ctx context.Context, nicId string) (*zec2.PublicIpv6CidrAddress, error)
- func (s *ZecService) DescribeNicById(ctx context.Context, nicId string) (*zec2.NicInfo, error)
- func (s *ZecService) DescribeNics(ctx context.Context, filter *ZecNicFilter) (vnics []*zec2.NicInfo, err error)
- func (s *ZecService) DescribePlacementGroupById(ctx context.Context, placementGroupId string) (*zec2.PlacementGroupInfo, error)
- func (s *ZecService) DescribePlacementGroupsByFilter(ctx context.Context, filter *PlacementGroupFilter) (placementGroups []*zec2.PlacementGroupInfo, err error)
- func (s *ZecService) DescribeQosPolicyGroupById(ctx context.Context, groupId string) (*zec2.QosPolicyGroup, error)
- func (s *ZecService) DescribeQosPolicyGroupsByFilter(ctx context.Context, filter *QosPolicyGroupFilter) (groups []*zec2.QosPolicyGroup, err error)
- func (s *ZecService) DescribeSecurityGroupById(ctx context.Context, securityGroupId string) (securityGroup *zec2.SecurityGroupInfo, err error)
- func (s *ZecService) DescribeSecurityGroupRules(ctx context.Context, securityGroupId string) ([]*zec2.SecurityGroupRuleInfo, []*zec2.SecurityGroupRuleInfo, error)
- func (s *ZecService) DescribeSnapshotById(ctx context.Context, id string) (*zec.SnapshotInfo, error)
- func (s *ZecService) DescribeSnapshotPolicyById(ctx context.Context, autoSnapshotPolicyId string) (*zec2.AutoSnapshotPolicy, error)
- func (s *ZecService) DescribeSnapshots(ctx context.Context, filter *ZecSnapshotFilter) (snapshots []*zec.SnapshotInfo, err error)
- func (s *ZecService) DescribeSubnetById(ctx context.Context, subnetId string) (*zec2.SubnetInfo, error)
- func (s *ZecService) DescribeSubnetsByFilter(ctx context.Context, filter *SubnetFilter) (subnets []*zec2.SubnetInfo, err error)
- func (s *ZecService) DescribeUnmanagedEgressIpById(ctx context.Context, unmanagedEgressIpId string) (*zec2.UnmanagedEgressIpInfo, error)
- func (s *ZecService) DescribeVmInventoryCapacity(ctx context.Context, regionIds []string) ([]*zec2.VmRegionCapacityItem, error)
- func (s *ZecService) DescribeVpcById(ctx context.Context, vpcId string) (*zec2.VpcInfo, error)
- func (s *ZecService) DescribeVpcRouteById(ctx context.Context, routeId string) (*zec2.RouteInfo, error)
- func (s *ZecService) DescribeVpcRoutes(ctx context.Context, filter *VpcRouteFilter) (routes []*zec2.RouteInfo, err error)
- func (s *ZecService) DescribeVpcsByFilter(ctx context.Context, filter *ZecVpcFilter) (vpcs []*zec2.VpcInfo, err error)
- func (s *ZecService) DetachDDoSPolicy(ctx context.Context, policyId string, ipv4Ids []string) error
- func (s *ZecService) DiskStateRefreshFunc(ctx context.Context, diskId string, failStates []string) resource.StateRefreshFunc
- func (s *ZecService) ImageAvailableForCopyRefreshFunc(ctx context.Context, imageId string) resource.StateRefreshFunc
- func (s *ZecService) ImageCopyStateRefreshFunc(ctx context.Context, imageId string, wantPresent []string, wantAbsent []string) resource.StateRefreshFunc
- func (s *ZecService) ImageStateRefreshFunc(ctx context.Context, imageId string, failStates []string) resource.StateRefreshFunc
- func (s *ZecService) InstanceStateRefreshFunc(ctx context.Context, instanceId string, failStates []string) resource.StateRefreshFunc
- func (s *ZecService) ModifyBorderGateway(ctx context.Context, request *zec.ModifyBorderGatewaysAttributeRequest) error
- func (s *ZecService) ModifyNetworkInterfaceIpv6Bandwidth(ctx context.Context, ipv6CidrId string, bandwidth int) error
- func (s *ZecService) ModifyNetworkInterfaceIpv6TrafficPackage(ctx context.Context, ipv6CidrId string, trafficPackageSize float64) error
- func (s *ZecService) ModifyNetworkInterfacePublicIPv6BandwidthLimitMode(ctx context.Context, ipv6CidrId string, rateLimitMode string) error
- func (s *ZecService) ModifyRouteAttribute(ctx context.Context, routeId string, name string) error
- func (s *ZecService) ModifySecurityGroupName(ctx context.Context, securityGroupId string, name string) error
- func (s *ZecService) ModifySubnet(ctx context.Context, subnetId string, name string, cidr string) error
- func (s *ZecService) ModifyUnmanagedEgressIpBandwidthLimitMode(ctx context.Context, unmanagedEgressIpId string, rateLimitMode string) error
- func (s *ZecService) ModifyVNicAttribute(ctx context.Context, vnicId string, name string, securityGroupId string) error
- func (s *ZecService) ModifyVpcAttribute(ctx context.Context, request *zec2.ModifyVpcAttributeRequest) error
- func (s *ZecService) NatStateRefreshFunc(ctx context.Context, natGatewayId string, failStates []string) resource.StateRefreshFunc
- func (s *ZecService) ResizeDisk(ctx context.Context, diskId string, diskSize int) error
- func (s *ZecService) ResolveIpv4IdsFromAttachmentIps(ctx context.Context, attachments []string) ([]string, error)
- func (s *ZecService) SnapshotStateRefreshFunc(ctx context.Context, snapshotId string, failStates []string) resource.StateRefreshFunc
- func (s *ZecService) StartInstance(ctx context.Context, instanceId string) error
- func (s *ZecService) UnassignNetworkInterfaceIpv6(ctx context.Context, nicId string) error
- type ZecSnapshotFilter
- type ZecVpcFilter
Constants ¶
const ( INVALID_VPC_NOT_FOUND = "INVALID_VPC_NOT_FOUND" INVALID_DISK_NOT_FOUND = "INVALID_DISK_NOT_FOUND" INVALID_NIC_NOT_FOUND = "INVALID_NIC_NOT_FOUND" INVALID_VPC_ROUTE_NOT_FOUND = "INVALID_VPC_ROUTE_NOT_FOUND" INVALID_NAT_NOT_FOUND = "INVALID_NAT_NOT_FOUND" INVALID_PLACEMENT_GROUP_NOT_FOUND = "INVALID_PLACEMENT_GROUP_NOT_FOUND" INVALID_HAVIP_NOT_FOUND = "INVALID_HAVIP_NOT_FOUND" // ZecDiskStatusRecycle Disk Status ZecDiskStatusRecycle = "RECYCLED" ZecDiskStatusRecycling = "RECYCLING" ZecDiskStatusAttaching = "ATTACHING" ZecDiskStatusDetaching = "DETACHING" ZecDiskStatusCreating = "CREATING" ZecDiskStatusDeleting = "DELETING" ZecDiskStatusResizing = "CHANGING" ZecDiskStatusInUse = "IN_USE" ZecDiskStatusAvailable = "AVAILABLE" ZecDiskStatusFaileld = "FAILED" ZecEipStatusCreating = "CREATING" ZecEipStatusCreateFailed = "CREATE_FAILED" ZecEipStatusBINDED = "BINDED" ZecEipStatusAvailable = "UNBIND" ZecEipStatusDeleting = "DELETING" ZecEipStatusRecycle = "RECYCLED" ZecEipStatusRecycling = "RECYCLING" ZecEipRateLimitModeLoose = "LOOSE" ZecEipRateLimitModeStrict = "STRICT" ZecEipOperationStatusOperating = "OPERATING" ZecEipOperationStatusFailed = "FAILED" ZecEipOperationModifyFlowPackage = "ModifyFlowPackage" ZecInstanceStatusPending = "PENDING" ZecInstanceStatusDeloying = "DEPLOYING" ZecInstanceStatusCreateFailed = "CREATE_FAILED" ZecInstanceStatusReseting = "REBUILDING" ZecInstanceStatusResetFailed = "REINSTALL_FAILED" ZecInstanceStatusStopped = "STOPPED" ZecInstanceStatusRunning = "RUNNING" ZecInstanceStatusBooting = "BOOTING" ZecInstanceStatusStopping = "STOPPING" ZecInstanceStatusReleasing = "RELEASING" ZecInstanceStatusRecycle = "RECYCLE" ZecInstanceStatusRecycling = "RECYCLING" ZecInstanceStatusResizing = "RESIZING" ZecVnicStatusCreating = "PENDING" ZecVnicStatusAvailable = "AVAILABLE" ZecVnicStatusAttaching = "ATTACHING" ZecVnicStatusDetaching = "DETACHING" ZecVnicStatusDeleting = "DELETING" ZecVnicStatusCreateFailed = "CREATE_FAILED" ZecVnicStatusUsed = "USED" SnapshotFailed = "FAILED" SnapshotCreating = "CREATING" SnapshotAvailable = "AVAILABLE" SnapshotDeleting = "DELETING" CidrStatusCreating = "CREATING" CidrStatusAvailable = "AVAILABLE" CidrStatusRecycling = "RECYCLING" CidrStatusRecycled = "RECYCLED" CidrStatusDeleting = "DELETING" CidrStatusFailed = "FAILED" NatStatusCreating = "CREATING" NatStatusRunning = "RUNNING" NatStatusRecycled = "RECYCLED" NatStatusCreateFailed = "CREATE_FAILED" NatStatusReleasing = "RELEASING" ZecImageStatusCreating = "CREATING" ZecImageStatusAvailable = "AVAILABLE" ZecImageStatusSyncing = "SYNCING" ZecImageStatusFailed = "FAILED" ZecImageStatusDeleting = "DELETING" ZecImageStatusProcessing = "PROCESSING" ZecImageSourceOfficial = "OFFICIAL" ZecImageSourceMarketing = "MARKETING" ZecImageSourceCustom = "CUSTOM" )
Variables ¶
var ( InstanceOperatingStatus = []string{ ZecInstanceStatusPending, ZecInstanceStatusDeloying, ZecInstanceStatusReseting, ZecInstanceStatusBooting, ZecInstanceStatusStopping, ZecInstanceStatusReleasing, ZecInstanceStatusRecycling, ZecInstanceStatusResizing, } ImageTypes = []string{ "PUBLIC_IMAGE", "CUSTOM_IMAGE", } SecurityGroupRuleDirection = []string{ "ingress", "egress", } SecurityGroupRulePolicy = []string{ "accept", "drop", } )
Functions ¶
func BuildDiskState ¶
func BuildDiskState(zecService *ZecService, diskId string, ctx context.Context, d *schema.ResourceData) *resource.StateChangeConf
func BuildNatGatewayState ¶ added in v0.2.6
func BuildNatGatewayState(zecService ZecService, natGatewayId string, ctx context.Context, d *schema.ResourceData) *resource.StateChangeConf
func BuildSnapshotState ¶
func BuildSnapshotState(zecService *ZecService, diskId string, ctx context.Context, d *schema.ResourceData) *resource.StateChangeConf
func DataSourceZenlayerCloudCidrs ¶ added in v0.2.4
func DataSourceZenlayerCloudIpv6Cidrs ¶ added in v0.2.26
func DataSourceZenlayerCloudZecDDoSPolicies ¶ added in v0.2.31
func DataSourceZenlayerCloudZecDhcpOptionsSets ¶ added in v0.2.18
func DataSourceZenlayerCloudZecGpuInstanceConfigs ¶ added in v0.2.31
func DataSourceZenlayerCloudZecHaVips ¶ added in v0.2.31
func DataSourceZenlayerCloudZecNatGatewayDnats ¶ added in v0.2.6
func DataSourceZenlayerCloudZecNatGatewaySnats ¶ added in v0.2.6
func DataSourceZenlayerCloudZecPlacementGroups ¶ added in v0.2.23
func DataSourceZenlayerCloudZecQosPolicyGroups ¶ added in v0.2.26
func DataSourceZenlayerCloudZecVNicPublicIPv6 ¶ added in v0.2.26
func DataSourceZenlayerCloudZecVmInventoryCapacities ¶ added in v0.2.26
func DataSourceZenlayerCloudZecVpcRoutes ¶ added in v0.2.6
func ResourceZenlayerCloudZecCidr ¶ added in v0.2.4
func ResourceZenlayerCloudZecDDoSPolicy ¶ added in v0.2.31
func ResourceZenlayerCloudZecDhcpOptionsSet ¶ added in v0.2.18
func ResourceZenlayerCloudZecDhcpOptionsSetAttachment ¶ added in v0.2.18
func ResourceZenlayerCloudZecHaVip ¶ added in v0.2.31
func ResourceZenlayerCloudZecHaVipAssociation ¶ added in v0.2.31
func ResourceZenlayerCloudZecImage ¶ added in v0.2.26
func ResourceZenlayerCloudZecImageCopy ¶ added in v0.2.26
func ResourceZenlayerCloudZecPlacementGroup ¶ added in v0.2.23
func ResourceZenlayerCloudZecPlacementGroupAssignment ¶ added in v0.2.23
func ResourceZenlayerCloudZecQosPolicyGroup ¶ added in v0.2.26
func ResourceZenlayerCloudZecQosPolicyGroupMember ¶ added in v0.2.26
func ResourceZenlayerCloudZecSecurityGroupRuleSet ¶ added in v0.2.4
func ResourceZenlayerCloudZecSnapshotCreate ¶
func ResourceZenlayerCloudZecSnapshotCreate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
func ResourceZenlayerCloudZecSnapshotDelete ¶
func ResourceZenlayerCloudZecSnapshotDelete(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
func ResourceZenlayerCloudZecSnapshotRead ¶
func ResourceZenlayerCloudZecSnapshotRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
func ResourceZenlayerCloudZecSnapshotUpdate ¶
func ResourceZenlayerCloudZecSnapshotUpdate(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics
func ResourceZenlayerCloudZecUnmanagedEgressIp ¶ added in v0.2.26
func ResourceZenlayerCloudZecVNicPublicIPv6 ¶ added in v0.2.26
func ResourceZenlayerCloudZecVpcNatGatewayDnat ¶ added in v0.2.6
func ResourceZenlayerCloudZecVpcNatGatewaySnat ¶ added in v0.2.6
Types ¶
type BoarderGatewayFilter ¶
type CidrFilter ¶ added in v0.2.4
type DDoSPolicyFilter ¶ added in v0.2.31
DDoSPolicyFilter 查询DDoS防护策略的过滤条件
type DhcpOptionsSetFilter ¶ added in v0.2.18
type DhcpOptionsSetFilter struct {
// contains filtered or unexported fields
}
type HaVipFilter ¶ added in v0.2.31
type ImageFilter ¶
type ImageFilter struct {
// contains filtered or unexported fields
}
type Ipv6CidrFilter ¶ added in v0.2.26
type PlacementGroupFilter ¶ added in v0.2.23
type QosPolicyGroupFilter ¶ added in v0.2.26
type SubnetFilter ¶
type SubnetFilter struct {
RegionId string
// contains filtered or unexported fields
}
type VpcRouteFilter ¶ added in v0.2.6
type VpcRouteFilter struct {
// contains filtered or unexported fields
}
type ZecDiskFilter ¶
type ZecInstancesFilter ¶
type ZecNatGatewayFilter ¶
type ZecNicFilter ¶
type ZecService ¶
type ZecService struct {
// contains filtered or unexported fields
}
func (*ZecService) AddSubnetIpv6 ¶
func (*ZecService) AssignNetworkInterfaceIpv6 ¶ added in v0.2.31
func (*ZecService) AttachDDoSPolicy ¶ added in v0.2.31
func (*ZecService) DeleteBorderGateway ¶
func (s *ZecService) DeleteBorderGateway(ctx context.Context, zbgId string) error
func (*ZecService) DeleteDiskById ¶
func (s *ZecService) DeleteDiskById(ctx context.Context, diskId string) error
func (*ZecService) DeleteDnatEntry ¶ added in v0.2.6
func (s *ZecService) DeleteDnatEntry(ctx context.Context, dnatId string) error
func (*ZecService) DeleteImage ¶ added in v0.2.26
func (s *ZecService) DeleteImage(ctx context.Context, imageId string) error
func (*ZecService) DeleteImageCopy ¶ added in v0.2.26
func (*ZecService) DeleteInstance ¶
func (s *ZecService) DeleteInstance(ctx context.Context, instanceId string) error
func (*ZecService) DeleteNatGateway ¶ added in v0.2.6
func (s *ZecService) DeleteNatGateway(ctx context.Context, natGatewayId string) error
func (*ZecService) DeleteSecurityGroupById ¶
func (s *ZecService) DeleteSecurityGroupById(ctx context.Context, id string) error
func (*ZecService) DeleteSnapshot ¶
func (s *ZecService) DeleteSnapshot(ctx context.Context, snapshotId string) error
func (*ZecService) DeleteSnapshotPolicy ¶
func (s *ZecService) DeleteSnapshotPolicy(ctx context.Context, autoSnapshotPolicyId string) error
func (*ZecService) DeleteSnatEntry ¶ added in v0.2.6
func (s *ZecService) DeleteSnatEntry(ctx context.Context, snatId string) error
func (*ZecService) DeleteSubnet ¶
func (s *ZecService) DeleteSubnet(ctx context.Context, subnetId string) error
func (*ZecService) DeleteVnicById ¶
func (s *ZecService) DeleteVnicById(ctx context.Context, nicId string) error
func (*ZecService) DeleteVpc ¶
func (s *ZecService) DeleteVpc(ctx context.Context, vpcId string) error
func (*ZecService) DeleteVpcRoute ¶
func (s *ZecService) DeleteVpcRoute(ctx context.Context, routeId string) error
func (*ZecService) DescribeAutoSnapshotPolicies ¶
func (s *ZecService) DescribeAutoSnapshotPolicies(ctx context.Context, filter *ZecAutoSnapshotPolicyFilter) (policies []*zec2.AutoSnapshotPolicy, err error)
func (*ZecService) DescribeBoardGateways ¶
func (s *ZecService) DescribeBoardGateways(filter *BoarderGatewayFilter) (zbgs []*zec2.ZbgInfo, err error)
func (*ZecService) DescribeBorderGatewayById ¶
func (*ZecService) DescribeCidrById ¶ added in v0.2.4
func (*ZecService) DescribeCidrsByFilter ¶ added in v0.2.4
func (s *ZecService) DescribeCidrsByFilter(ctx context.Context, filter *CidrFilter) (cidrs []*zec2.CidrInfo, err error)
func (*ZecService) DescribeCustomImageById ¶ added in v0.2.26
func (s *ZecService) DescribeCustomImageById(ctx context.Context, imageId string) (*zec2.CustomImage, error)
func (*ZecService) DescribeDDoSPoliciesByFilter ¶ added in v0.2.31
func (s *ZecService) DescribeDDoSPoliciesByFilter(ctx context.Context, filter *DDoSPolicyFilter) (policies []*zec2.PolicyInfo, err error)
func (*ZecService) DescribeDDoSPolicyById ¶ added in v0.2.31
func (s *ZecService) DescribeDDoSPolicyById(ctx context.Context, policyId string) (*zec2.DescribePolicyDetailResponseParams, error)
func (*ZecService) DescribeDhcpOptionsSetById ¶ added in v0.2.18
func (s *ZecService) DescribeDhcpOptionsSetById(ctx context.Context, dhcpOptionsSetId string) (*zec2.DhcpOptionsSet, error)
func (*ZecService) DescribeDhcpOptionsSetsByFilter ¶ added in v0.2.18
func (s *ZecService) DescribeDhcpOptionsSetsByFilter(ctx context.Context, filter *DhcpOptionsSetFilter) (dhcpOptionsSets []*zec2.DhcpOptionsSet, err error)
func (*ZecService) DescribeDiskById ¶
func (*ZecService) DescribeDisks ¶
func (s *ZecService) DescribeDisks(ctx context.Context, filter *ZecDiskFilter) (disks []*zec2.DiskInfo, err error)
func (*ZecService) DescribeEipById ¶
func (*ZecService) DescribeEipsByFilter ¶
func (*ZecService) DescribeGpuInstanceConfigInfos ¶ added in v0.2.31
func (s *ZecService) DescribeGpuInstanceConfigInfos(ctx context.Context, zoneId, instanceType string) ([]*zec2.GpuInstanceTypeQuotaItem, error)
func (*ZecService) DescribeHaVipById ¶ added in v0.2.31
func (*ZecService) DescribeHaVipsByFilter ¶ added in v0.2.31
func (s *ZecService) DescribeHaVipsByFilter(ctx context.Context, filter *HaVipFilter) ([]*zec2.HaVipInfo, error)
func (*ZecService) DescribeImageById ¶ added in v0.2.26
func (s *ZecService) DescribeImageById(ctx context.Context, imageId string) (*zec2.CustomImage, error)
func (*ZecService) DescribeImagesByFilter ¶
func (s *ZecService) DescribeImagesByFilter(filter *ImageFilter) (images []*zec2.Image, err error)
func (*ZecService) DescribeInstanceById ¶
func (s *ZecService) DescribeInstanceById(ctx context.Context, instanceId string) (instance *zec2.InstanceInfo, err error)
func (*ZecService) DescribeInstancesByFilter ¶
func (s *ZecService) DescribeInstancesByFilter(filter *ZecInstancesFilter) (instances []*zec2.InstanceInfo, err error)
func (*ZecService) DescribeIpv6CidrById ¶ added in v0.2.26
func (s *ZecService) DescribeIpv6CidrById(ctx context.Context, cidrId string) (*zec2.Ipv6CidrInfo, error)
func (*ZecService) DescribeIpv6CidrsByFilter ¶ added in v0.2.26
func (s *ZecService) DescribeIpv6CidrsByFilter(ctx context.Context, filter *Ipv6CidrFilter) (cidrs []*zec2.Ipv6CidrInfo, err error)
func (*ZecService) DescribeNatGatewayById ¶
func (s *ZecService) DescribeNatGatewayById(ctx context.Context, natGatewayId string) (*zec2.NatGateway, error)
func (*ZecService) DescribeNatGatewayDetailById ¶ added in v0.2.6
func (s *ZecService) DescribeNatGatewayDetailById(ctx context.Context, natGatewayId string) (*zec2.DescribeNatGatewayDetailResponseParams, error)
func (*ZecService) DescribeNatGateways ¶
func (s *ZecService) DescribeNatGateways(ctx context.Context, filter *ZecNatGatewayFilter) (nats []*zec2.NatGateway, err error)
func (*ZecService) DescribeNetworkInterfacePublicIPv6ByNicId ¶ added in v0.2.26
func (s *ZecService) DescribeNetworkInterfacePublicIPv6ByNicId(ctx context.Context, nicId string) (*zec2.PublicIpv6CidrAddress, error)
func (*ZecService) DescribeNicById ¶
func (*ZecService) DescribeNics ¶
func (s *ZecService) DescribeNics(ctx context.Context, filter *ZecNicFilter) (vnics []*zec2.NicInfo, err error)
func (*ZecService) DescribePlacementGroupById ¶ added in v0.2.23
func (s *ZecService) DescribePlacementGroupById(ctx context.Context, placementGroupId string) (*zec2.PlacementGroupInfo, error)
func (*ZecService) DescribePlacementGroupsByFilter ¶ added in v0.2.23
func (s *ZecService) DescribePlacementGroupsByFilter(ctx context.Context, filter *PlacementGroupFilter) (placementGroups []*zec2.PlacementGroupInfo, err error)
func (*ZecService) DescribeQosPolicyGroupById ¶ added in v0.2.26
func (s *ZecService) DescribeQosPolicyGroupById(ctx context.Context, groupId string) (*zec2.QosPolicyGroup, error)
func (*ZecService) DescribeQosPolicyGroupsByFilter ¶ added in v0.2.26
func (s *ZecService) DescribeQosPolicyGroupsByFilter(ctx context.Context, filter *QosPolicyGroupFilter) (groups []*zec2.QosPolicyGroup, err error)
func (*ZecService) DescribeSecurityGroupById ¶
func (s *ZecService) DescribeSecurityGroupById(ctx context.Context, securityGroupId string) (securityGroup *zec2.SecurityGroupInfo, err error)
func (*ZecService) DescribeSecurityGroupRules ¶ added in v0.2.4
func (s *ZecService) DescribeSecurityGroupRules(ctx context.Context, securityGroupId string) ([]*zec2.SecurityGroupRuleInfo, []*zec2.SecurityGroupRuleInfo, error)
func (*ZecService) DescribeSnapshotById ¶
func (s *ZecService) DescribeSnapshotById(ctx context.Context, id string) (*zec.SnapshotInfo, error)
func (*ZecService) DescribeSnapshotPolicyById ¶
func (s *ZecService) DescribeSnapshotPolicyById(ctx context.Context, autoSnapshotPolicyId string) (*zec2.AutoSnapshotPolicy, error)
func (*ZecService) DescribeSnapshots ¶
func (s *ZecService) DescribeSnapshots(ctx context.Context, filter *ZecSnapshotFilter) (snapshots []*zec.SnapshotInfo, err error)
func (*ZecService) DescribeSubnetById ¶
func (s *ZecService) DescribeSubnetById(ctx context.Context, subnetId string) (*zec2.SubnetInfo, error)
func (*ZecService) DescribeSubnetsByFilter ¶
func (s *ZecService) DescribeSubnetsByFilter(ctx context.Context, filter *SubnetFilter) (subnets []*zec2.SubnetInfo, err error)
func (*ZecService) DescribeUnmanagedEgressIpById ¶ added in v0.2.26
func (s *ZecService) DescribeUnmanagedEgressIpById(ctx context.Context, unmanagedEgressIpId string) (*zec2.UnmanagedEgressIpInfo, error)
func (*ZecService) DescribeVmInventoryCapacity ¶ added in v0.2.26
func (s *ZecService) DescribeVmInventoryCapacity(ctx context.Context, regionIds []string) ([]*zec2.VmRegionCapacityItem, error)
func (*ZecService) DescribeVpcById ¶
func (*ZecService) DescribeVpcRouteById ¶
func (*ZecService) DescribeVpcRoutes ¶ added in v0.2.6
func (s *ZecService) DescribeVpcRoutes(ctx context.Context, filter *VpcRouteFilter) (routes []*zec2.RouteInfo, err error)
func (*ZecService) DescribeVpcsByFilter ¶
func (s *ZecService) DescribeVpcsByFilter(ctx context.Context, filter *ZecVpcFilter) (vpcs []*zec2.VpcInfo, err error)
func (*ZecService) DetachDDoSPolicy ¶ added in v0.2.31
func (*ZecService) DiskStateRefreshFunc ¶
func (s *ZecService) DiskStateRefreshFunc(ctx context.Context, diskId string, failStates []string) resource.StateRefreshFunc
func (*ZecService) ImageAvailableForCopyRefreshFunc ¶ added in v0.2.26
func (s *ZecService) ImageAvailableForCopyRefreshFunc(ctx context.Context, imageId string) resource.StateRefreshFunc
func (*ZecService) ImageCopyStateRefreshFunc ¶ added in v0.2.26
func (s *ZecService) ImageCopyStateRefreshFunc(ctx context.Context, imageId string, wantPresent []string, wantAbsent []string) resource.StateRefreshFunc
func (*ZecService) ImageStateRefreshFunc ¶ added in v0.2.26
func (s *ZecService) ImageStateRefreshFunc(ctx context.Context, imageId string, failStates []string) resource.StateRefreshFunc
func (*ZecService) InstanceStateRefreshFunc ¶
func (s *ZecService) InstanceStateRefreshFunc(ctx context.Context, instanceId string, failStates []string) resource.StateRefreshFunc
func (*ZecService) ModifyBorderGateway ¶
func (s *ZecService) ModifyBorderGateway(ctx context.Context, request *zec.ModifyBorderGatewaysAttributeRequest) error
func (*ZecService) ModifyNetworkInterfaceIpv6Bandwidth ¶ added in v0.2.31
func (*ZecService) ModifyNetworkInterfaceIpv6TrafficPackage ¶ added in v0.2.31
func (*ZecService) ModifyNetworkInterfacePublicIPv6BandwidthLimitMode ¶ added in v0.2.26
func (*ZecService) ModifyRouteAttribute ¶
func (*ZecService) ModifySecurityGroupName ¶
func (*ZecService) ModifySubnet ¶
func (*ZecService) ModifyUnmanagedEgressIpBandwidthLimitMode ¶ added in v0.2.26
func (*ZecService) ModifyVNicAttribute ¶
func (*ZecService) ModifyVpcAttribute ¶
func (s *ZecService) ModifyVpcAttribute(ctx context.Context, request *zec2.ModifyVpcAttributeRequest) error
func (*ZecService) NatStateRefreshFunc ¶ added in v0.2.6
func (s *ZecService) NatStateRefreshFunc(ctx context.Context, natGatewayId string, failStates []string) resource.StateRefreshFunc
func (*ZecService) ResizeDisk ¶
func (*ZecService) ResolveIpv4IdsFromAttachmentIps ¶ added in v0.2.31
func (s *ZecService) ResolveIpv4IdsFromAttachmentIps(ctx context.Context, attachments []string) ([]string, error)
ResolveIpv4IdsFromAttachmentIps maps DescribePolicyDetail AttachmentIps to EIP IDs. The API returns public IP addresses; AttachToPolicy/DetachFromPolicy require ipv4 IDs.
func (*ZecService) SnapshotStateRefreshFunc ¶
func (s *ZecService) SnapshotStateRefreshFunc(ctx context.Context, snapshotId string, failStates []string) resource.StateRefreshFunc
func (*ZecService) StartInstance ¶
func (s *ZecService) StartInstance(ctx context.Context, instanceId string) error
func (*ZecService) UnassignNetworkInterfaceIpv6 ¶ added in v0.2.31
func (s *ZecService) UnassignNetworkInterfaceIpv6(ctx context.Context, nicId string) error
type ZecSnapshotFilter ¶
type ZecVpcFilter ¶
Source Files
¶
- data_source_zc_zec_border_gateways.go
- data_source_zc_zec_cidrs.go
- data_source_zc_zec_ddos_policies.go
- data_source_zc_zec_dhcp_options_sets.go
- data_source_zc_zec_disk_snapshot_policies.go
- data_source_zc_zec_disk_snapshots.go
- data_source_zc_zec_disks.go
- data_source_zc_zec_eips.go
- data_source_zc_zec_gpu_instance_configs.go
- data_source_zc_zec_havips.go
- data_source_zc_zec_images.go
- data_source_zc_zec_instances.go
- data_source_zc_zec_ipv6_cidrs.go
- data_source_zc_zec_nat_gateway_dnats.go
- data_source_zc_zec_nat_gateway_snats.go
- data_source_zc_zec_nat_gateways.go
- data_source_zc_zec_placement_groups.go
- data_source_zc_zec_qos_policy_groups.go
- data_source_zc_zec_subnets.go
- data_source_zc_zec_vm_inventory_capacities.go
- data_source_zc_zec_vnic_public_ipv6.go
- data_source_zc_zec_vnics.go
- data_source_zc_zec_vpc_routes.go
- data_source_zc_zec_vpcs.go
- data_source_zc_zec_zones.go
- extension_zec.go
- resource_zc_zec_cidr.go
- resource_zc_zec_ddos_policy.go
- resource_zc_zec_dhcp_options_set.go
- resource_zc_zec_dhcp_options_set_attachment.go
- resource_zc_zec_disk.go
- resource_zc_zec_disk_attachment.go
- resource_zc_zec_disk_snapshot.go
- resource_zc_zec_disk_snapshot_policy.go
- resource_zc_zec_disk_snapshot_policy_attachment.go
- resource_zc_zec_eip.go
- resource_zc_zec_eip_association.go
- resource_zc_zec_havip.go
- resource_zc_zec_havip_association.go
- resource_zc_zec_image.go
- resource_zc_zec_image_copy.go
- resource_zc_zec_instance.go
- resource_zc_zec_nat_gateway.go
- resource_zc_zec_nat_gateway_dnat.go
- resource_zc_zec_nat_gateway_snat.go
- resource_zc_zec_placement_group.go
- resource_zc_zec_placement_group_assignment.go
- resource_zc_zec_qos_policy_group.go
- resource_zc_zec_qos_policy_group_member.go
- resource_zc_zec_security_group.go
- resource_zc_zec_security_group_rule_set.go
- resource_zc_zec_subnet.go
- resource_zc_zec_unmanaged_egress_ip.go
- resource_zc_zec_vnic.go
- resource_zc_zec_vnic_attachment.go
- resource_zc_zec_vnic_ipv4.go
- resource_zc_zec_vnic_public_ipv6.go
- resource_zc_zec_vpc.go
- resource_zc_zec_vpc_border_gateway.go
- resource_zc_zec_vpc_border_gateway_attachment.go
- resource_zc_zec_vpc_route.go
- resource_zc_zec_vpc_security_group_attachment.go
- service_zenlayer_zec.go