Documentation ¶
Index ¶
- Variables
- func InitDataSourceCheck(sourceName string) *resourceCheck
- func InitResourceCheck(resourceName string, resourceObject interface{}, getResourceFunc ServiceFunc) *resourceCheck
- func RandomAccResourceName() string
- func RandomAccResourceNameWithDash() string
- func RandomCidr() string
- func RandomCidrAndGatewayIp() (string, string)
- func TestAccPreCheck(t *testing.T)
- func TestAccPreCheckAdminOnly(t *testing.T)
- func TestAccPreCheckBms(t *testing.T)
- func TestAccPreCheckChargingMode(t *testing.T)
- func TestAccPreCheckDeprecated(t *testing.T)
- func TestAccPreCheckEpsID(t *testing.T)
- func TestAccPreCheckMrsCustom(t *testing.T)
- func TestAccPreCheckOBS(t *testing.T)
- func TestAccPreCheckProject(t *testing.T)
- func TestAccPreCheckReplication(t *testing.T)
- func TestAccPrecheckCustomRegion(t *testing.T)
- func TestAccPrecheckWafInstance(t *testing.T)
- func TestCheckResourceAttrWithVariable(resourceName, key, varStr string) resource.TestCheckFunc
- type ServiceFunc
Constants ¶
This section is empty.
Variables ¶
var ( G42VB_REGION_NAME = os.Getenv("G42VB_REGION_NAME") G42VB_CUSTOM_REGION_NAME = os.Getenv("G42VB_CUSTOM_REGION_NAME") G42VB_AVAILABILITY_ZONE = os.Getenv("G42VB_AVAILABILITY_ZONE") G42VB_ACCESS_KEY = os.Getenv("G42VB_ACCESS_KEY") G42VB_SECRET_KEY = os.Getenv("G42VB_SECRET_KEY") G42VB_USER_ID = os.Getenv("G42VB_USER_ID") G42VB_PROJECT_ID = os.Getenv("G42VB_PROJECT_ID") G42VB_DOMAIN_ID = os.Getenv("G42VB_DOMAIN_ID") G42VB_DOMAIN_NAME = os.Getenv("G42VB_DOMAIN_NAME") G42VB_ENTERPRISE_PROJECT_ID_TEST = os.Getenv("G42VB_ENTERPRISE_PROJECT_ID_TEST") G42VB_FLAVOR_ID = os.Getenv("G42VB_FLAVOR_ID") G42VB_FLAVOR_NAME = os.Getenv("G42VB_FLAVOR_NAME") G42VB_IMAGE_ID = os.Getenv("G42VB_IMAGE_ID") G42VB_IMAGE_NAME = os.Getenv("G42VB_IMAGE_NAME") G42VB_VPC_ID = os.Getenv("G42VB_VPC_ID") G42VB_NETWORK_ID = os.Getenv("G42VB_NETWORK_ID") G42VB_SUBNET_ID = os.Getenv("G42VB_SUBNET_ID") G42VB_MAPREDUCE_CUSTOM = os.Getenv("G42VB_MAPREDUCE_CUSTOM") G42VB_ADMIN = os.Getenv("G42VB_ADMIN") G42VB_DEPRECATED_ENVIRONMENT = os.Getenv("G42VB_DEPRECATED_ENVIRONMENT") G42VB_WAF_ENABLE_FLAG = os.Getenv("G42VB_WAF_ENABLE_FLAG") G42VB_DEST_REGION = os.Getenv("G42VB_DEST_REGION") G42VB_DEST_PROJECT_ID = os.Getenv("G42VB_DEST_PROJECT_ID") G42VB_CHARGING_MODE = os.Getenv("G42VB_CHARGING_MODE") )
var TestAccProvider *schema.Provider
TestAccProvider is the "main" provider instance
var TestAccProviderFactories map[string]func() (*schema.Provider, error)
TestAccProviderFactories is a static map containing only the main provider instance
var TestAccProviders map[string]*schema.Provider
TestAccProviders is a static map containing only the main provider instance.
Deprecated: Terraform Plugin SDK version 2 uses TestCase.ProviderFactories but supports this value in TestCase.Providers for backwards compatibility. In the future Providers: TestAccProviders will be changed to ProviderFactories: TestAccProviderFactories
Functions ¶
func InitDataSourceCheck ¶
func InitDataSourceCheck(sourceName string) *resourceCheck
InitDataSourceCheck build a 'resourceCheck' object. Only used to check datasource attributes.
Parameters: resourceName: The resource name is used to check in the terraform.State.e.g. : g42vbcloud_waf_domain.domain_1. Return: *resourceCheck: resourceCheck object
func InitResourceCheck ¶
func InitResourceCheck(resourceName string, resourceObject interface{}, getResourceFunc ServiceFunc) *resourceCheck
InitResourceCheck build a 'resourceCheck' object. The common test methods are provided in 'resourceCheck'.
Parameters: resourceName: The resource name is used to check in the terraform.State.e.g. : g42vbcloud_waf_domain.domain_1. resourceObject: Resource object, used to check whether the resource exists in G42cloud. getResourceFunc: The function used to get the resource object. Return: *resourceCheck: resourceCheck object
func RandomAccResourceName ¶
func RandomAccResourceName() string
func RandomAccResourceNameWithDash ¶
func RandomAccResourceNameWithDash() string
func RandomCidr ¶
func RandomCidr() string
func RandomCidrAndGatewayIp ¶
func TestCheckResourceAttrWithVariable ¶
func TestCheckResourceAttrWithVariable(resourceName, key, varStr string) resource.TestCheckFunc
TestCheckResourceAttrWithVariable validates the variable in state for the given name/key combination.
Parameters: resourceName: The resource name is used to check in the terraform.State. key: The field name of the resource. variable: The variable name of the value to be checked. variable such like ${g42vbcloud_waf_certificate.certificate_1.id} or ${data.g42vbcloud_waf_policies.policies_2.policies.0.id}
Types ¶
type ServiceFunc ¶
type ServiceFunc func(*config.Config, *terraform.ResourceState) (interface{}, error)
ServiceFunc the G42cloud resource query functions.