zec

package
v0.2.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

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*"
}

```

Index

Constants

View Source
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"

	// 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"

	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"
)

Variables

View Source
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 DataSourceZenlayerCloudBorderGateways

func DataSourceZenlayerCloudBorderGateways() *schema.Resource

func DataSourceZenlayerCloudCidrs added in v0.2.4

func DataSourceZenlayerCloudCidrs() *schema.Resource

func DataSourceZenlayerCloudEips

func DataSourceZenlayerCloudEips() *schema.Resource

func DataSourceZenlayerCloudZecAutoSnapshotPolicies

func DataSourceZenlayerCloudZecAutoSnapshotPolicies() *schema.Resource

func DataSourceZenlayerCloudZecDhcpOptionsSets added in v0.2.18

func DataSourceZenlayerCloudZecDhcpOptionsSets() *schema.Resource

func DataSourceZenlayerCloudZecDisks

func DataSourceZenlayerCloudZecDisks() *schema.Resource

func DataSourceZenlayerCloudZecImages

func DataSourceZenlayerCloudZecImages() *schema.Resource

func DataSourceZenlayerCloudZecInstances

func DataSourceZenlayerCloudZecInstances() *schema.Resource

func DataSourceZenlayerCloudZecNatGateway

func DataSourceZenlayerCloudZecNatGateway() *schema.Resource

func DataSourceZenlayerCloudZecNatGatewayDnats added in v0.2.6

func DataSourceZenlayerCloudZecNatGatewayDnats() *schema.Resource

func DataSourceZenlayerCloudZecNatGatewaySnats added in v0.2.6

func DataSourceZenlayerCloudZecNatGatewaySnats() *schema.Resource

func DataSourceZenlayerCloudZecSnapshots

func DataSourceZenlayerCloudZecSnapshots() *schema.Resource

func DataSourceZenlayerCloudZecSubnets

func DataSourceZenlayerCloudZecSubnets() *schema.Resource

func DataSourceZenlayerCloudZecVnics

func DataSourceZenlayerCloudZecVnics() *schema.Resource

func DataSourceZenlayerCloudZecVpcRoutes added in v0.2.6

func DataSourceZenlayerCloudZecVpcRoutes() *schema.Resource

func DataSourceZenlayerCloudZecVpcs

func DataSourceZenlayerCloudZecVpcs() *schema.Resource

func ResourceZenlayerCloudBorderGateway

func ResourceZenlayerCloudBorderGateway() *schema.Resource

func ResourceZenlayerCloudBorderGatewayAssociation

func ResourceZenlayerCloudBorderGatewayAssociation() *schema.Resource

func ResourceZenlayerCloudEipAssociation

func ResourceZenlayerCloudEipAssociation() *schema.Resource

func ResourceZenlayerCloudGlobalVpc

func ResourceZenlayerCloudGlobalVpc() *schema.Resource

func ResourceZenlayerCloudGlobalVpcRoute

func ResourceZenlayerCloudGlobalVpcRoute() *schema.Resource

func ResourceZenlayerCloudZecCidr added in v0.2.4

func ResourceZenlayerCloudZecCidr() *schema.Resource

func ResourceZenlayerCloudZecDhcpOptionsSet added in v0.2.18

func ResourceZenlayerCloudZecDhcpOptionsSet() *schema.Resource

func ResourceZenlayerCloudZecDhcpOptionsSetAttachment added in v0.2.18

func ResourceZenlayerCloudZecDhcpOptionsSetAttachment() *schema.Resource

func ResourceZenlayerCloudZecDisk

func ResourceZenlayerCloudZecDisk() *schema.Resource

func ResourceZenlayerCloudZecDiskAttachment

func ResourceZenlayerCloudZecDiskAttachment() *schema.Resource

func ResourceZenlayerCloudZecElasticIP

func ResourceZenlayerCloudZecElasticIP() *schema.Resource

func ResourceZenlayerCloudZecInstance

func ResourceZenlayerCloudZecInstance() *schema.Resource

func ResourceZenlayerCloudZecSecurityGroup

func ResourceZenlayerCloudZecSecurityGroup() *schema.Resource

func ResourceZenlayerCloudZecSecurityGroupRuleSet added in v0.2.4

func ResourceZenlayerCloudZecSecurityGroupRuleSet() *schema.Resource

func ResourceZenlayerCloudZecSnapshot

func ResourceZenlayerCloudZecSnapshot() *schema.Resource

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 ResourceZenlayerCloudZecSnapshotPolicy

func ResourceZenlayerCloudZecSnapshotPolicy() *schema.Resource

func ResourceZenlayerCloudZecSnapshotPolicyAttachment

func ResourceZenlayerCloudZecSnapshotPolicyAttachment() *schema.Resource

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 ResourceZenlayerCloudZecSubnet

func ResourceZenlayerCloudZecSubnet() *schema.Resource

func ResourceZenlayerCloudZecVNic

func ResourceZenlayerCloudZecVNic() *schema.Resource

func ResourceZenlayerCloudZecVNicAttachment

func ResourceZenlayerCloudZecVNicAttachment() *schema.Resource

func ResourceZenlayerCloudZecVNicIPv4

func ResourceZenlayerCloudZecVNicIPv4() *schema.Resource

func ResourceZenlayerCloudZecVpcNatGateway

func ResourceZenlayerCloudZecVpcNatGateway() *schema.Resource

func ResourceZenlayerCloudZecVpcNatGatewayDnat added in v0.2.6

func ResourceZenlayerCloudZecVpcNatGatewayDnat() *schema.Resource

func ResourceZenlayerCloudZecVpcNatGatewaySnat added in v0.2.6

func ResourceZenlayerCloudZecVpcNatGatewaySnat() *schema.Resource

func ResourceZenlayerCloudZecVpcSecurityGroupAttachment

func ResourceZenlayerCloudZecVpcSecurityGroupAttachment() *schema.Resource

Types

type BoarderGatewayFilter

type BoarderGatewayFilter struct {
	Ids      []string
	VpcId    string
	RegionId string
}

type CidrFilter added in v0.2.4

type CidrFilter struct {
	Ids             []string
	RegionId        string
	ResourceGroupId string
}

type DhcpOptionsSetFilter added in v0.2.18

type DhcpOptionsSetFilter struct {
	// contains filtered or unexported fields
}

type EipFilter

type EipFilter struct {
	Ids              []string
	RegionId         string
	IpAddress        []string
	Status           string
	ResourceGroupId  string
	PrivateIpAddress string
	CidrIds          []string
	AssociatedId     string
}

type ImageFilter

type ImageFilter struct {
	// contains filtered or unexported fields
}

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 ZecAutoSnapshotPolicyFilter

type ZecAutoSnapshotPolicyFilter struct {
	AutoSnapshotPolicyIds []string
	ZoneId                string
	ResourceGroupId       string
}

type ZecDiskFilter

type ZecDiskFilter struct {
	Ids        []string
	ZoneId     string
	DiskType   string
	DiskName   string
	InstanceId string
	Status     string
}

type ZecInstancesFilter

type ZecInstancesFilter struct {
	InstancesIds    []string
	ZoneId          string
	InstanceName    string
	ImageId         string
	InstanceStatus  string
	ResourceGroupId string
	Ipv4            string
	Ipv6            string
}

type ZecNatGatewayFilter

type ZecNatGatewayFilter struct {
	Ids             []string
	RegionId        string
	SecurityGroupId string
	VpcId           string
	Name            string
	ResourceGroupId string
}

type ZecNicFilter

type ZecNicFilter struct {
	RegionId        string
	VpcId           string
	SubnetId        string
	ResourceGroupId string
	InstanceId      string
	// contains filtered or unexported fields
}

type ZecService

type ZecService struct {
	// contains filtered or unexported fields
}

func (*ZecService) AddSubnetIpv6

func (s *ZecService) AddSubnetIpv6(ctx context.Context, subnetId string, ipv6Type string) error

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) 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 (s *ZecService) DescribeBorderGatewayById(ctx context.Context, zbgId string) (*zec.ZbgInfo, error)

func (*ZecService) DescribeCidrById added in v0.2.4

func (s *ZecService) DescribeCidrById(ctx context.Context, cidrId string) (*zec2.CidrInfo, error)

func (*ZecService) DescribeCidrsByFilter added in v0.2.4

func (s *ZecService) DescribeCidrsByFilter(ctx context.Context, filter *CidrFilter) (cidrs []*zec2.CidrInfo, err 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 (s *ZecService) DescribeDiskById(ctx context.Context, diskId string) (*zec2.DiskInfo, error)

func (*ZecService) DescribeDisks

func (s *ZecService) DescribeDisks(ctx context.Context, filter *ZecDiskFilter) (disks []*zec2.DiskInfo, err error)

func (*ZecService) DescribeEipById

func (s *ZecService) DescribeEipById(ctx context.Context, eipId string) (*zec2.EipInfo, error)

func (*ZecService) DescribeEipsByFilter

func (s *ZecService) DescribeEipsByFilter(ctx context.Context, filter *EipFilter) (eips []*zec2.EipInfo, err 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) 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) DescribeNicById

func (s *ZecService) DescribeNicById(ctx context.Context, nicId string) (*zec2.NicInfo, error)

func (*ZecService) DescribeNics

func (s *ZecService) DescribeNics(ctx context.Context, filter *ZecNicFilter) (vnics []*zec2.NicInfo, 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) DescribeVpcById

func (s *ZecService) DescribeVpcById(ctx context.Context, vpcId string) (*zec2.VpcInfo, error)

func (*ZecService) DescribeVpcRouteById

func (s *ZecService) DescribeVpcRouteById(ctx context.Context, routeId string) (*zec2.RouteInfo, error)

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) DiskStateRefreshFunc

func (s *ZecService) DiskStateRefreshFunc(ctx context.Context, diskId 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) ModifyRouteAttribute

func (s *ZecService) ModifyRouteAttribute(ctx context.Context, routeId string, name string) error

func (*ZecService) ModifySecurityGroupName

func (s *ZecService) ModifySecurityGroupName(ctx context.Context, securityGroupId string, name string) error

func (*ZecService) ModifySubnet

func (s *ZecService) ModifySubnet(ctx context.Context, subnetId string, name string, cidr string) error

func (*ZecService) ModifyVNicAttribute

func (s *ZecService) ModifyVNicAttribute(ctx context.Context, vnicId string, name string, securityGroupId string) error

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 (s *ZecService) ResizeDisk(ctx context.Context, diskId string, diskSize int) error

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

type ZecSnapshotFilter

type ZecSnapshotFilter struct {
	SnapshotIds     []string
	DiskIds         []string
	ZoneId          string
	SnapshotName    string
	SnapshotType    string
	ResourceGroupId string
}

type ZecVpcFilter

type ZecVpcFilter struct {
	VpcIds    []string
	CidrBlock *string

	ResourceGroupId *string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL