Documentation ¶
Index ¶
- Constants
- func LoadConfigFromProfile(profileName string) (*connectivity.Config, error)
- type AliCloudProvider
- func (p *AliCloudProvider) GetConfig() cty.Value
- func (p *AliCloudProvider) GetName() string
- func (p AliCloudProvider) GetProviderData(arg ...string) map[string]interface{}
- func (p AliCloudProvider) GetResourceConnections() map[string]map[string][]string
- func (p *AliCloudProvider) GetSupportedService() map[string]terraformutils.ServiceGenerator
- func (p *AliCloudProvider) Init(args []string) error
- func (p *AliCloudProvider) InitService(serviceName string, verbose bool) error
- type AliCloudService
- type ConfigFile
- type DNSGenerator
- type EcsGenerator
- type KeyPairGenerator
- type NatGatewayGenerator
- type PvtzGenerator
- type RAMGenerator
- type RdsGenerator
- type SgGenerator
- type SlbGenerator
- type VSwitchGenerator
- type VpcGenerator
Constants ¶
const GlobalRegion = "alicloud-global"
Variables ¶
This section is empty.
Functions ¶
func LoadConfigFromProfile ¶
func LoadConfigFromProfile(profileName string) (*connectivity.Config, error)
LoadConfigFromProfile Loads profile from ~/.aliyun/config.json
Types ¶
type AliCloudProvider ¶
type AliCloudProvider struct { terraformutils.Provider // contains filtered or unexported fields }
AliCloudProvider Provider for alicloud
func (*AliCloudProvider) GetConfig ¶
func (p *AliCloudProvider) GetConfig() cty.Value
GetConfig Converts json config to go-cty
func (*AliCloudProvider) GetName ¶
func (p *AliCloudProvider) GetName() string
GetName Gets name of provider
func (AliCloudProvider) GetProviderData ¶
func (p AliCloudProvider) GetProviderData(arg ...string) map[string]interface{}
GetProviderData Used for generated HCL2 for the provider
func (AliCloudProvider) GetResourceConnections ¶
func (p AliCloudProvider) GetResourceConnections() map[string]map[string][]string
GetResourceConnections Gets resource connections for alicloud
func (*AliCloudProvider) GetSupportedService ¶
func (p *AliCloudProvider) GetSupportedService() map[string]terraformutils.ServiceGenerator
GetSupportedService Gets a list of all supported services
func (*AliCloudProvider) Init ¶
func (p *AliCloudProvider) Init(args []string) error
Init Loads up command line arguments in the provider
func (*AliCloudProvider) InitService ¶
func (p *AliCloudProvider) InitService(serviceName string, verbose bool) error
InitService Initializes the AliCloud service
type AliCloudService ¶
type AliCloudService struct {
terraformutils.Service
}
AliCloudService Service struct for AliCloud
func (*AliCloudService) LoadClientFromProfile ¶
func (s *AliCloudService) LoadClientFromProfile() (*connectivity.AliyunClient, error)
LoadClientFromProfile Loads profile from ~/.aliyun/config.json and then applies the region from cmd line
type ConfigFile ¶
type ConfigFile struct { Current string `json:"current"` MetaPath string `json:"meta_path"` Profiles []struct { AccessKeyID string `json:"access_key_id"` AccessKeySecret string `json:"access_key_secret"` ExpiredSeconds int `json:"expired_seconds"` KeyPairName string `json:"key_pair_name"` Language string `json:"language"` Mode string `json:"mode"` Name string `json:"name"` OutputFormat string `json:"output_format"` PrivateKey string `json:"private_key"` RAMRoleArn string `json:"ram_role_arn"` RAMRoleName string `json:"ram_role_name"` RAMSessionName string `json:"ram_session_name"` RegionID string `json:"region_id"` RetryCount int `json:"retry_count"` RetryTimeout int `json:"retry_timeout"` Site string `json:"site"` StsToken string `json:"sts_token"` Verified string `json:"verified"` } `json:"profiles"` }
ConfigFile go struct for ~/.aliyun/config.json
type DNSGenerator ¶
type DNSGenerator struct {
AliCloudService
}
DNSGenerator Struct for generating AliCloud Elastic Compute Service
func (*DNSGenerator) InitResources ¶
func (g *DNSGenerator) InitResources() error
InitResources Gets the list of all alidns domain ids and generates resources
type EcsGenerator ¶
type EcsGenerator struct {
AliCloudService
}
EcsGenerator Struct for generating AliCloud Elastic Compute Service
func (*EcsGenerator) InitResources ¶
func (g *EcsGenerator) InitResources() error
InitResources Gets the list of all ECS instance ids and generates resources
func (*EcsGenerator) PostConvertHook ¶
func (g *EcsGenerator) PostConvertHook() error
PostConvertHook Runs before HCL files are generated
type KeyPairGenerator ¶
type KeyPairGenerator struct {
AliCloudService
}
KeyPairGenerator Struct for generating AliCloud Key pair
func (*KeyPairGenerator) InitResources ¶
func (g *KeyPairGenerator) InitResources() error
InitResources Gets the list of all key pair ids and generates resources
type NatGatewayGenerator ¶
type NatGatewayGenerator struct {
AliCloudService
}
NatGatewayGenerator Struct for generating AliCloud Elastic Compute Service
func (*NatGatewayGenerator) InitResources ¶
func (g *NatGatewayGenerator) InitResources() error
InitResources Gets the list of all natgateway NatGateway ids and generates resources
type PvtzGenerator ¶
type PvtzGenerator struct {
AliCloudService
}
PvtzGenerator Struct for generating AliCloud private zone
func (*PvtzGenerator) InitResources ¶
func (g *PvtzGenerator) InitResources() error
InitResources Gets the list of all pvtz Zone ids and generates resources
func (*PvtzGenerator) PostConvertHook ¶
func (g *PvtzGenerator) PostConvertHook() error
PostConvertHook Runs before HCL files are generated
type RAMGenerator ¶
type RAMGenerator struct {
AliCloudService
}
RAMGenerator Struct for generating AliCloud Elastic Compute Service
func (*RAMGenerator) InitResources ¶
func (g *RAMGenerator) InitResources() error
InitResources Gets the list of all ram role ids and generates resources
func (*RAMGenerator) PostConvertHook ¶
func (g *RAMGenerator) PostConvertHook() error
PostConvertHook Runs before HCL files are generated
type RdsGenerator ¶
type RdsGenerator struct {
AliCloudService
}
RdsGenerator Struct for generating AliCloud Elastic Compute Service
func (*RdsGenerator) InitResources ¶
func (g *RdsGenerator) InitResources() error
InitResources Gets the list of all rds ids and generates resources
func (*RdsGenerator) PostConvertHook ¶
func (g *RdsGenerator) PostConvertHook() error
PostConvertHook Runs before HCL files are generated
type SgGenerator ¶
type SgGenerator struct {
AliCloudService
}
SgGenerator Struct for generating AliCloud Security group
func (*SgGenerator) InitResources ¶
func (g *SgGenerator) InitResources() error
InitResources Gets the list of all security group ids and generates resources
func (*SgGenerator) PostConvertHook ¶
func (g *SgGenerator) PostConvertHook() error
PostConvertHook Runs before HCL files are generated
type SlbGenerator ¶
type SlbGenerator struct {
AliCloudService
}
SlbGenerator Struct for generating AliCloud Elastic Compute Service
func (*SlbGenerator) InitResources ¶
func (g *SlbGenerator) InitResources() error
InitResources Gets the list of all slb loadBalancer ids and generates resources
func (*SlbGenerator) PostConvertHook ¶
func (g *SlbGenerator) PostConvertHook() error
PostConvertHook Runs before HCL files are generated
type VSwitchGenerator ¶
type VSwitchGenerator struct {
AliCloudService
}
VSwitchGenerator Struct for generating AliCloud Elastic Compute Service
func (*VSwitchGenerator) InitResources ¶
func (g *VSwitchGenerator) InitResources() error
InitResources Gets the list of all vpc VSwitch ids and generates resources
type VpcGenerator ¶
type VpcGenerator struct {
AliCloudService
}
VpcGenerator Struct for generating AliCloud Elastic Compute Service
func (*VpcGenerator) InitResources ¶
func (g *VpcGenerator) InitResources() error
InitResources Gets the list of all vpc Vpc ids and generates resources