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 RandomPassword() string
- func TestAccPreCheck(t *testing.T)
- func TestAccPreCheckAdminOnly(t *testing.T)
- func TestAccPreCheckBms(t *testing.T)
- func TestAccPreCheckChargingMode(t *testing.T)
- func TestAccPreCheckComponent(t *testing.T)
- func TestAccPreCheckComponentDeployment(t *testing.T)
- func TestAccPreCheckDcDirectConnection(t *testing.T)
- func TestAccPreCheckDeprecated(t *testing.T)
- func TestAccPreCheckDliAgency(t *testing.T)
- func TestAccPreCheckDliDsAuthCss(t *testing.T)
- func TestAccPreCheckDliDsAuthKafka(t *testing.T)
- func TestAccPreCheckDliDsAuthKrb(t *testing.T)
- func TestAccPreCheckEpsID(t *testing.T)
- func TestAccPreCheckKms(t *testing.T)
- func TestAccPreCheckLtsAomAccess(t *testing.T)
- func TestAccPreCheckLtsAomAccessUpdate(t *testing.T)
- func TestAccPreCheckLtsEnableFlag(t *testing.T)
- func TestAccPreCheckLtsStructConfigCustom(t *testing.T)
- func TestAccPreCheckMigrateEpsID(t *testing.T)
- func TestAccPreCheckMrsCustom(t *testing.T)
- func TestAccPreCheckOBS(t *testing.T)
- func TestAccPreCheckProject(t *testing.T)
- func TestAccPreCheckProjectID(t *testing.T)
- func TestAccPreCheckProjectId(t *testing.T)
- func TestAccPreCheckReplication(t *testing.T)
- func TestAccPreCheckRepoPwdAuth(t *testing.T)
- func TestAccPreCheckRepoTokenAuth(t *testing.T)
- func TestAccPreCheckSWRDomian(t *testing.T)
- func TestAccPreCheckSms(t *testing.T)
- func TestAccPreCheckSourceImage(t *testing.T)
- func TestAccPreCheckUserId(t *testing.T)
- func TestAccPrecheckCustomRegion(t *testing.T)
- func TestAccPrecheckDomainId(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 ( G42_REGION_NAME = os.Getenv("G42_REGION_NAME") G42_CUSTOM_REGION_NAME = os.Getenv("G42_CUSTOM_REGION_NAME") G42_AVAILABILITY_ZONE = os.Getenv("G42_AVAILABILITY_ZONE") G42_ACCESS_KEY = os.Getenv("G42_ACCESS_KEY") G42_SECRET_KEY = os.Getenv("G42_SECRET_KEY") G42_USER_ID = os.Getenv("G42_USER_ID") G42_PROJECT_ID = os.Getenv("G42_PROJECT_ID") G42_DOMAIN_ID = os.Getenv("G42_DOMAIN_ID") G42_ACCOUNT_NAME = os.Getenv("G42_ACCOUNT_NAME") G42_USERNAME = os.Getenv("G42_USERNAME") G42_ENTERPRISE_PROJECT_ID_TEST = os.Getenv("G42_ENTERPRISE_PROJECT_ID_TEST") G42_SWR_SHARING_ACCOUNT = os.Getenv("G42_SWR_SHARING_ACCOUNT") G42_DEST_PROJECT_ID_TEST = os.Getenv("G42_DEST_PROJECT_ID_TEST") G42_IMAGE_SHARE_SOURCE_IMAGE_ID = os.Getenv("G42_IMAGE_SHARE_SOURCE_IMAGE_ID") G42_FLAVOR_ID = os.Getenv("G42_FLAVOR_ID") G42_FLAVOR_NAME = os.Getenv("G42_FLAVOR_NAME") G42_IMAGE_ID = os.Getenv("G42_IMAGE_ID") G42_IMAGE_NAME = os.Getenv("G42_IMAGE_NAME") G42_VPC_ID = os.Getenv("G42_VPC_ID") G42_NETWORK_ID = os.Getenv("G42_NETWORK_ID") G42_SUBNET_ID = os.Getenv("G42_SUBNET_ID") G42_MAPREDUCE_CUSTOM = os.Getenv("G42_MAPREDUCE_CUSTOM") G42_ADMIN = os.Getenv("G42_ADMIN") G42_DEPRECATED_ENVIRONMENT = os.Getenv("G42_DEPRECATED_ENVIRONMENT") G42_WAF_ENABLE_FLAG = os.Getenv("G42_WAF_ENABLE_FLAG") G42_DEST_REGION = os.Getenv("G42_DEST_REGION") G42_DEST_PROJECT_ID = os.Getenv("G42_DEST_PROJECT_ID") G42_CHARGING_MODE = os.Getenv("G42_CHARGING_MODE") G42_GITHUB_REPO_PWD = os.Getenv("G42_GITHUB_REPO_PWD") G42_GITHUB_REPO_HOST = os.Getenv("G42_GITHUB_REPO_HOST") G42_GITHUB_PERSONAL_TOKEN = os.Getenv("G42_GITHUB_PERSONAL_TOKEN") G42_GITHUB_REPO_URL = os.Getenv("G42_GITHUB_REPO_URL") G42_OBS_STORAGE_URL = os.Getenv("G42_OBS_STORAGE_URL") G42_BUILD_IMAGE_URL = os.Getenv("G42_BUILD_IMAGE_URL") G42_DC_DIRECT_CONNECT_ID = os.Getenv("G42_DC_DIRECT_CONNECT_ID") G42_DLI_AGENCY_FLAG = os.Getenv("G42_DLI_AGENCY_FLAG") G42_DLI_DS_AUTH_CSS_OBS_PATH = os.Getenv("G42_DLI_DS_AUTH_CSS_OBS_PATH") G42_DLI_DS_AUTH_KAFKA_TRUST_OBS_PATH = os.Getenv("G42_DLI_DS_AUTH_KAFKA_TRUST_OBS_PATH") G42_DLI_DS_AUTH_KAFKA_KEY_OBS_PATH = os.Getenv("G42_DLI_DS_AUTH_KAFKA_KEY_OBS_PATH") G42_DLI_DS_AUTH_KRB_CONF_OBS_PATH = os.Getenv("G42_DLI_DS_AUTH_KRB_CONF_OBS_PATH") G42_DLI_DS_AUTH_KRB_TAB_OBS_PATH = os.Getenv("G42_DLI_DS_AUTH_KRB_TAB_OBS_PATH") G42_SMS_SOURCE_SERVER = os.Getenv("G42_SMS_SOURCE_SERVER") G42_KMS_ENVIRONMENT = os.Getenv("G42_KMS_ENVIRONMENT") G42_ENTERPRISE_MIGRATE_PROJECT_ID_TEST = os.Getenv("G42_ENTERPRISE_MIGRATE_PROJECT_ID_TEST") G42_MODELARTS_HAS_SUBSCRIBE_MODEL = os.Getenv("G42_MODELARTS_HAS_SUBSCRIBE_MODEL") G42_CCE_CLUSTER_ID = os.Getenv("G42_CCE_CLUSTER_ID") G42_CCE_CLUSTER_NAME = os.Getenv("G42_CCE_CLUSTER_NAME") G42_CCE_CLUSTER_ID_ANOTHER = os.Getenv("G42_CCE_CLUSTER_ID_ANOTHER") G42_CCE_CLUSTER_NAME_ANOTHER = os.Getenv("G42_CCE_CLUSTER_NAME_ANOTHER") G42_LTS_STRUCT_CONFIG_TEMPLATE_ID = os.Getenv("G42_LTS_STRUCT_CONFIG_TEMPLATE_ID") G42_LTS_STRUCT_CONFIG_TEMPLATE_NAME = os.Getenv("G42_LTS_STRUCT_CONFIG_TEMPLATE_NAME") G42_LTS_ENABLE_FLAG = os.Getenv("G42_LTS_ENABLE_FLAG") )
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. : g42cloud_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. : g42cloud_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 RandomPassword ¶ added in v1.8.0
func RandomPassword() string
func TestAccPreCheckComponent ¶ added in v1.5.0
lintignore:AT003
func TestAccPreCheckComponentDeployment ¶ added in v1.5.0
lintignore:AT003
func TestAccPreCheckDcDirectConnection ¶ added in v1.8.0
lintignore:AT003
func TestAccPreCheckDliAgency ¶ added in v1.13.0
lintignore:AT003
func TestAccPreCheckDliDsAuthCss ¶ added in v1.13.0
lintignore:AT003
func TestAccPreCheckDliDsAuthKafka ¶ added in v1.13.0
lintignore:AT003
func TestAccPreCheckDliDsAuthKrb ¶ added in v1.13.0
lintignore:AT003
func TestAccPreCheckLtsAomAccess ¶ added in v1.13.0
lintignore:AT003
func TestAccPreCheckLtsAomAccessUpdate ¶ added in v1.13.0
lintignore:AT003
func TestAccPreCheckLtsEnableFlag ¶ added in v1.13.0
lintignore:AT003
func TestAccPreCheckLtsStructConfigCustom ¶ added in v1.13.0
lintignore:AT003
func TestAccPreCheckMigrateEpsID ¶ added in v1.12.0
lintignore:AT003
func TestAccPreCheckProjectID ¶ added in v1.13.0
func TestAccPreCheckProjectId ¶ added in v1.13.0
lintignore:AT003
func TestAccPreCheckRepoPwdAuth ¶ added in v1.5.0
lintignore:AT003
func TestAccPreCheckRepoTokenAuth ¶ added in v1.5.0
lintignore:AT003
func TestAccPreCheckSWRDomian ¶ added in v1.4.0
lintignore:AT003
func TestAccPreCheckSourceImage ¶ added in v1.13.0
lintignore:AT003
func TestAccPreCheckUserId ¶ added in v1.12.0
func TestAccPrecheckDomainId ¶ added in v1.10.0
lintignore:AT003
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 ${g42cloud_waf_certificate.certificate_1.id} or ${data.g42cloud_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.