Documentation
¶
Index ¶
- Constants
- Variables
- func CheckResourceIdFormat(resource string, id string) bool
- func MessageClean(state multistep.StateBag, module string)
- func SSHHost(pubilcIp bool) func(multistep.StateBag) (string, error)
- func WaitForImageReady(client *cvm.Client, imageName string, status string, timeout int) error
- func WaitForInstance(client *cvm.Client, instanceId string, status string, timeout int) error
- type Artifact
- type Builder
- type Config
- type Region
- type TencentCloudAccessConfig
- type TencentCloudImageConfig
- type TencentCloudRunConfig
Constants ¶
View Source
const ( Bangkok = Region("ap-bangkok") Beijing = Region("ap-beijing") Chengdu = Region("ap-chengdu") Chongqing = Region("ap-chongqing") Guangzhou = Region("ap-guangzhou") GuangzhouOpen = Region("ap-guangzhou-open") Hongkong = Region("ap-hongkong") Mumbai = Region("ap-mumbai") Seoul = Region("ap-seoul") Shanghai = Region("ap-shanghai") ShanghaiFsi = Region("ap-shanghai-fsi") ShenzhenFsi = Region("ap-shenzhen-fsi") Singapore = Region("ap-singapore") Tokyo = Region("ap-tokyo") Frankfurt = Region("eu-frankfurt") Moscow = Region("eu-moscow") Ashburn = Region("na-ashburn") Siliconvalley = Region("na-siliconvalley") Toronto = Region("na-toronto") )
below would be moved to tencentcloud sdk git repo
View Source
const BuilderId = "tencent.cloud"
View Source
const DefaultWaitForInterval = 5
Variables ¶
View Source
var ValidCBSType = []string{
"LOCAL_BASIC", "LOCAL_SSD", "CLOUD_BASIC", "CLOUD_SSD", "CLOUD_PREMIUM",
}
View Source
var ValidRegions = []Region{ Bangkok, Beijing, Chengdu, Chongqing, Guangzhou, GuangzhouOpen, Hongkong, Shanghai, ShanghaiFsi, ShenzhenFsi, Mumbai, Seoul, Singapore, Tokyo, Moscow, Frankfurt, Ashburn, Siliconvalley, Toronto, }
Functions ¶
func CheckResourceIdFormat ¶
func MessageClean ¶
func WaitForImageReady ¶
Types ¶
type Artifact ¶
type Config ¶
type Config struct {
common.PackerConfig `mapstructure:",squash"`
TencentCloudAccessConfig `mapstructure:",squash"`
TencentCloudImageConfig `mapstructure:",squash"`
TencentCloudRunConfig `mapstructure:",squash"`
// contains filtered or unexported fields
}
type TencentCloudAccessConfig ¶
type TencentCloudAccessConfig struct {
SecretId string `mapstructure:"secret_id"`
SecretKey string `mapstructure:"secret_key"`
Region string `mapstructure:"region"`
Zone string `mapstructure:"zone"`
SkipValidation bool `mapstructure:"skip_region_validation"`
}
func (*TencentCloudAccessConfig) Config ¶
func (cf *TencentCloudAccessConfig) Config() error
func (*TencentCloudAccessConfig) Prepare ¶
func (cf *TencentCloudAccessConfig) Prepare(ctx *interpolate.Context) []error
type TencentCloudImageConfig ¶
type TencentCloudImageConfig struct {
ImageName string `mapstructure:"image_name"`
ImageDescription string `mapstructure:"image_description"`
Reboot bool `mapstructure:"reboot"`
ForcePoweroff bool `mapstructure:"force_poweroff"`
Sysprep bool `mapstructure:"sysprep"`
ImageForceDelete bool `mapstructure:"image_force_delete"`
ImageCopyRegions []string `mapstructure:"image_copy_regions"`
SkipValidation bool `mapstructure:"skip_region_validation"`
}
func (*TencentCloudImageConfig) Prepare ¶
func (cf *TencentCloudImageConfig) Prepare(ctx *interpolate.Context) []error
type TencentCloudRunConfig ¶
type TencentCloudRunConfig struct {
AssociatePublicIpAddress bool `mapstructure:"associate_public_ip_address"`
SourceImageId string `mapstructure:"source_image_id"`
InstanceType string `mapstructure:"instance_type"`
InstanceName string `mapstructure:"instance_name"`
DiskType string `mapstructure:"disk_type"`
DiskSize int64 `mapstructure:"disk_size"`
VpcId string `mapstructure:"vpc_id"`
VpcName string `mapstructure:"vpc_name"`
VpcIp string `mapstructure:"vpc_ip"`
SubnetId string `mapstructure:"subnet_id"`
SubnetName string `mapstructure:"subnet_name"`
CidrBlock string `mapstructure:"cidr_block"` // 10.0.0.0/16(default), 172.16.0.0/12, 192.168.0.0/16
SubnectCidrBlock string `mapstructure:"subnect_cidr_block"`
InternetChargeType string `mapstructure:"internet_charge_type"`
InternetMaxBandwidthOut int64 `mapstructure:"internet_max_bandwidth_out"`
SecurityGroupId string `mapstructure:"security_group_id"`
SecurityGroupName string `mapstructure:"security_group_name"`
UserData string `mapstructure:"user_data"`
UserDataFile string `mapstructure:"user_data_file"`
HostName string `mapstructure:"host_name"`
// Communicator settings
Comm communicator.Config `mapstructure:",squash"`
SSHPrivateIp bool `mapstructure:"ssh_private_ip"`
}
func (*TencentCloudRunConfig) Prepare ¶
func (cf *TencentCloudRunConfig) Prepare(ctx *interpolate.Context) []error
Source Files
¶
- access_config.go
- artifact.go
- builder.go
- common.go
- image_config.go
- run_config.go
- step_check_source_image.go
- step_config_key_pair.go
- step_config_security_group.go
- step_config_subnet.go
- step_config_vpc.go
- step_copy_image.go
- step_create_image.go
- step_detach_temp_key_pair.go
- step_pre_validate.go
- step_run_instance.go
- step_share_image.go
Click to show internal directories.
Click to hide internal directories.