Documentation ¶
Index ¶
- Variables
- func RandomAccResourceName() string
- func RandomAccResourceNameWithDash() string
- func RandomCidr() string
- func RandomCidrAndGatewayIp() (string, string)
- func RandomPassword() string
- func TestAccPreCheck(t *testing.T)
- func TestAccPreCheckAadForwardRule(t *testing.T)
- func TestAccPreCheckAdminOnly(t *testing.T)
- func TestAccPreCheckAppAuth(t *testing.T)
- func TestAccPreCheckBms(t *testing.T)
- func TestAccPreCheckCceClusterId(t *testing.T)
- func TestAccPreCheckCcePartitionAz(t *testing.T)
- func TestAccPreCheckCfw(t *testing.T)
- func TestAccPreCheckChargingMode(t *testing.T)
- func TestAccPreCheckCnEast3(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 TestAccPreCheckDliJarPath(t *testing.T)
- func TestAccPreCheckDms(t *testing.T)
- func TestAccPreCheckER(t *testing.T)
- func TestAccPreCheckEip(t *testing.T)
- func TestAccPreCheckEipAddress(t *testing.T)
- func TestAccPreCheckEipId(t *testing.T)
- func TestAccPreCheckEpsID(t *testing.T)
- func TestAccPreCheckFgsTrigger(t *testing.T)
- func TestAccPreCheckHighCostAllow(t *testing.T)
- func TestAccPreCheckImageUrlUpdated(t *testing.T)
- func TestAccPreCheckImsBackupId(t *testing.T)
- func TestAccPreCheckInternal(t *testing.T)
- func TestAccPreCheckKms(t *testing.T)
- func TestAccPreCheckKmsKey(t *testing.T)
- func TestAccPreCheckMaas(t *testing.T)
- func TestAccPreCheckMeetingRoom(t *testing.T)
- func TestAccPreCheckMigrateEpsID(t *testing.T)
- func TestAccPreCheckMrsBootstrapScript(t *testing.T)
- func TestAccPreCheckMrsCustom(t *testing.T)
- func TestAccPreCheckOBS(t *testing.T)
- func TestAccPreCheckOBSBucket(t *testing.T)
- func TestAccPreCheckOBSDestinationBucket(t *testing.T)
- func TestAccPreCheckOmsInstance(t *testing.T)
- func TestAccPreCheckOrganizations(t *testing.T)
- func TestAccPreCheckOrganizationsInvitationId(t *testing.T)
- func TestAccPreCheckOrganizationsInviteAccountId(t *testing.T)
- func TestAccPreCheckOrganizationsOrganizationalUnitId(t *testing.T)
- func TestAccPreCheckParticipants(t *testing.T)
- func TestAccPreCheckProject(t *testing.T)
- func TestAccPreCheckProjectID(t *testing.T)
- func TestAccPreCheckProjectId(t *testing.T)
- func TestAccPreCheckPwdAuth(t *testing.T)
- func TestAccPreCheckRAM(t *testing.T)
- func TestAccPreCheckReplication(t *testing.T)
- func TestAccPreCheckRepoPwdAuth(t *testing.T)
- func TestAccPreCheckRepoTokenAuth(t *testing.T)
- func TestAccPreCheckRfArchives(t *testing.T)
- func TestAccPreCheckSWRDomian(t *testing.T)
- func TestAccPreCheckScm(t *testing.T)
- func TestAccPreCheckScmCertificateName(t *testing.T)
- func TestAccPreCheckSecMaster(t *testing.T)
- func TestAccPreCheckSms(t *testing.T)
- func TestAccPreCheckSourceImage(t *testing.T)
- func TestAccPreCheckSwrTargetOrigination(t *testing.T)
- func TestAccPreCheckSwrTargetRegion(t *testing.T)
- func TestAccPreCheckUserId(t *testing.T)
- func TestAccPreCheckVODMediaAsset(t *testing.T)
- func TestAccPreCheckVODWatermark(t *testing.T)
- func TestAccPreCheckWorkloadName(t *testing.T)
- func TestAccPreCheckWorkloadNameSpace(t *testing.T)
- func TestAccPreCheckWorkloadType(t *testing.T)
- func TestAccPreCheckWorkspaceAD(t *testing.T)
- func TestAccPrecheckCustomRegion(t *testing.T)
- func TestAccPrecheckDomainId(t *testing.T)
- func TestAccPrecheckWafInstance(t *testing.T)
- func TestAccSkipUnsupportedTest(t *testing.T)
- func TestCheckResourceAttrWithVariable(name, key, pair string) resource.TestCheckFunc
- type ResourceCheck
- type ServiceFunc
Constants ¶
This section is empty.
Variables ¶
var ( HCS_SKIP_UNSUPPORTED_TEST = os.Getenv("HCS_SKIP_UNSUPPORTED_TEST") HCS_REGION_NAME = os.Getenv("HCS_REGION_NAME") HCS_CUSTOM_REGION_NAME = os.Getenv("HCS_CUSTOM_REGION_NAME") HCS_AVAILABILITY_ZONE = os.Getenv("HCS_AVAILABILITY_ZONE") HCS_ACCESS_KEY = os.Getenv("HCS_ACCESS_KEY") HCS_SECRET_KEY = os.Getenv("HCS_SECRET_KEY") HCS_USER_ID = os.Getenv("HCS_USER_ID") HCS_USER_NAME = os.Getenv("HCS_USER_NAME") HCS_PROJECT_ID = os.Getenv("HCS_PROJECT_ID") HCS_DOMAIN_ID = os.Getenv("HCS_DOMAIN_ID") HCS_DOMAIN_NAME = os.Getenv("HCS_DOMAIN_NAME") HCS_ENTERPRISE_PROJECT_ID_TEST = os.Getenv("HCS_ENTERPRISE_PROJECT_ID_TEST") HCS_ENTERPRISE_MIGRATE_PROJECT_ID_TEST = os.Getenv("HCS_ENTERPRISE_MIGRATE_PROJECT_ID_TEST") HCS_FLAVOR_ID = os.Getenv("HCS_FLAVOR_ID") HCS_FLAVOR_NAME = os.Getenv("HCS_FLAVOR_NAME") HCS_IMAGE_ID = os.Getenv("HCS_IMAGE_ID") HCS_IMAGE_NAME = os.Getenv("HCS_IMAGE_NAME") HCS_VPC_ID = os.Getenv("HCS_VPC_ID") HCS_NETWORK_ID = os.Getenv("HCS_NETWORK_ID") HCS_SUBNET_ID = os.Getenv("HCS_SUBNET_ID") HCS_ENTERPRISE_PROJECT_ID = os.Getenv("HCS_ENTERPRISE_PROJECT_ID") HCS_ADMIN = os.Getenv("HCS_ADMIN") HCS_KEYPAIR_NAME = os.Getenv("HCS_KEYPAIR_NAME") HCS_SERVER_GROUP_ID = os.Getenv("HCS_SERVER_GROUP_ID") HCS_ECS_INSTANCE_ID = os.Getenv("HCS_ECS_INSTANCE_ID") HCS_EIP_ID = os.Getenv("HCS_EIP_ID") HCS_EIP_NAME = os.Getenv("HCS_EIP_NAME") HCS_EIP_ADDRESS = os.Getenv("HCS_EIP_ADDRESS") HCS_EIP_EXTERNAL_NETWORK_NAME = os.Getenv("HCS_EIP_EXTERNAL_NETWORK_NAME") HCS_MAPREDUCE_CUSTOM = os.Getenv("HCS_MAPREDUCE_CUSTOM") HCS_MAPREDUCE_BOOTSTRAP_SCRIPT = os.Getenv("HCS_MAPREDUCE_BOOTSTRAP_SCRIPT") HCS_OBS_BUCKET_NAME = os.Getenv("HCS_OBS_BUCKET_NAME") HCS_OBS_DESTINATION_BUCKET = os.Getenv("HCS_OBS_DESTINATION_BUCKET") HCS_OMS_ENABLE_FLAG = os.Getenv("HCS_OMS_ENABLE_FLAG") HCS_DEPRECATED_ENVIRONMENT = os.Getenv("HCS_DEPRECATED_ENVIRONMENT") HCS_INTERNAL_USED = os.Getenv("HCS_INTERNAL_USED") HCS_WAF_ENABLE_FLAG = os.Getenv("HCS_WAF_ENABLE_FLAG") HCS_DEST_REGION = os.Getenv("HCS_DEST_REGION") HCS_DEST_PROJECT_ID = os.Getenv("HCS_DEST_PROJECT_ID") HCS_DEST_PROJECT_ID_TEST = os.Getenv("HCS_DEST_PROJECT_ID_TEST") HCS_CHARGING_MODE = os.Getenv("HCS_CHARGING_MODE") HCS_HIGH_COST_ALLOW = os.Getenv("HCS_HIGH_COST_ALLOW") HCS_SWR_SHARING_ACCOUNT = os.Getenv("HCS_SWR_SHARING_ACCOUNT") HCS_RAM_SHARE_ACCOUNT_ID = os.Getenv("HCS_RAM_SHARE_ACCOUNT_ID") HCS_RAM_SHARE_RESOURCE_URN = os.Getenv("HCS_RAM_SHARE_RESOURCE_URN") HCS_CERTIFICATE_KEY_PATH = os.Getenv("HCS_CERTIFICATE_KEY_PATH") HCS_CERTIFICATE_CHAIN_PATH = os.Getenv("HCS_CERTIFICATE_CHAIN_PATH") HCS_CERTIFICATE_PRIVATE_KEY_PATH = os.Getenv("HCS_CERTIFICATE_PRIVATE_KEY_PATH") HCS_CERTIFICATE_SERVICE = os.Getenv("HCS_CERTIFICATE_SERVICE") HCS_CERTIFICATE_PROJECT = os.Getenv("HCS_CERTIFICATE_PROJECT") HCS_CERTIFICATE_PROJECT_UPDATED = os.Getenv("HCS_CERTIFICATE_PROJECT_UPDATED") HCS_CERTIFICATE_NAME = os.Getenv("HCS_CERTIFICATE_NAME") HCS_DMS_ENVIRONMENT = os.Getenv("HCS_DMS_ENVIRONMENT") HCS_SMS_SOURCE_SERVER = os.Getenv("HCS_SMS_SOURCE_SERVER") HCS_DLI_FLINK_JAR_OBS_PATH = os.Getenv("HCS_DLI_FLINK_JAR_OBS_PATH") HCS_DLI_DS_AUTH_CSS_OBS_PATH = os.Getenv("HCS_DLI_DS_AUTH_CSS_OBS_PATH") HCS_DLI_DS_AUTH_KAFKA_TRUST_OBS_PATH = os.Getenv("HCS_DLI_DS_AUTH_KAFKA_TRUST_OBS_PATH") HCS_DLI_DS_AUTH_KAFKA_KEY_OBS_PATH = os.Getenv("HCS_DLI_DS_AUTH_KAFKA_KEY_OBS_PATH") HCS_DLI_DS_AUTH_KRB_CONF_OBS_PATH = os.Getenv("HCS_DLI_DS_AUTH_KRB_CONF_OBS_PATH") HCS_DLI_DS_AUTH_KRB_TAB_OBS_PATH = os.Getenv("HCS_DLI_DS_AUTH_KRB_TAB_OBS_PATH") HCS_DLI_AGENCY_FLAG = os.Getenv("HCS_DLI_AGENCY_FLAG") HCS_GITHUB_REPO_HOST = os.Getenv("HCS_GITHUB_REPO_HOST") // Repository host (Github, Gitlab, Gitee) HCS_GITHUB_PERSONAL_TOKEN = os.Getenv("HCS_GITHUB_PERSONAL_TOKEN") // Personal access token (Github, Gitlab, Gitee) HCS_GITHUB_REPO_PWD = os.Getenv("HCS_GITHUB_REPO_PWD") // Repository password (DevCloud, BitBucket) HCS_GITHUB_REPO_URL = os.Getenv("HCS_GITHUB_REPO_URL") // Repository URL (Github, Gitlab, Gitee) HCS_OBS_STORAGE_URL = os.Getenv("HCS_OBS_STORAGE_URL") // OBS storage URL where ZIP file is located HCS_BUILD_IMAGE_URL = os.Getenv("HCS_BUILD_IMAGE_URL") // SWR Image URL for component deployment HCS_BUILD_IMAGE_URL_UPDATED = os.Getenv("HCS_BUILD_IMAGE_URL_UPDATED") // SWR Image URL for component deployment update HCS_VOD_WATERMARK_FILE = os.Getenv("HCS_VOD_WATERMARK_FILE") HCS_VOD_MEDIA_ASSET_FILE = os.Getenv("HCS_VOD_MEDIA_ASSET_FILE") HCS_CHAIR_EMAIL = os.Getenv("HCS_CHAIR_EMAIL") HCS_GUEST_EMAIL = os.Getenv("HCS_GUEST_EMAIL") HCS_MEETING_ACCOUNT_NAME = os.Getenv("HCS_MEETING_ACCOUNT_NAME") HCS_MEETING_ACCOUNT_PASSWORD = os.Getenv("HCS_MEETING_ACCOUNT_PASSWORD") HCS_MEETING_APP_ID = os.Getenv("HCS_MEETING_APP_ID") HCS_MEETING_APP_KEY = os.Getenv("HCS_MEETING_APP_KEY") HCS_MEETING_USER_ID = os.Getenv("HCS_MEETING_USER_ID") HCS_MEETING_ROOM_ID = os.Getenv("HCS_MEETING_ROOM_ID") HCS_AAD_INSTANCE_ID = os.Getenv("HCS_AAD_INSTANCE_ID") HCS_AAD_IP_ADDRESS = os.Getenv("HCS_AAD_IP_ADDRESS") HCS_WORKSPACE_AD_DOMAIN_NAME = os.Getenv("HCS_WORKSPACE_AD_DOMAIN_NAME") // Domain name, e.g. "example.com". HCS_WORKSPACE_AD_SERVER_PWD = os.Getenv("HCS_WORKSPACE_AD_SERVER_PWD") // The password of AD server. HCS_WORKSPACE_AD_DOMAIN_IP = os.Getenv("HCS_WORKSPACE_AD_DOMAIN_IP") // Active domain IP, e.g. "192.168.196.3". HCS_WORKSPACE_AD_VPC_ID = os.Getenv("HCS_WORKSPACE_AD_VPC_ID") // The VPC ID to which the AD server and desktops belongs. HCS_WORKSPACE_AD_NETWORK_ID = os.Getenv("HCS_WORKSPACE_AD_NETWORK_ID") // The network ID to which the AD server belongs. HCS_FGS_TRIGGER_LTS_AGENCY = os.Getenv("HCS_FGS_TRIGGER_LTS_AGENCY") HCS_KMS_ENVIRONMENT = os.Getenv("HCS_KMS_ENVIRONMENT") HCS_KMS_KEY_ID = os.Getenv("HCS_KMS_KEY_ID") HCS_ORGANIZATIONS_ENVIRONMENT = os.Getenv("HCS_ORGANIZATIONS_ENVIRONMENT") HCS_ORGANIZATIONS_INVITE_ACCOUNT_ID = os.Getenv("HCS_ORGANIZATIONS_INVITE_ACCOUNT_ID") HCS_ORGANIZATIONS_ORGANIZATIONAL_UNIT_ID = os.Getenv("HCS_ORGANIZATIONS_ORGANIZATIONAL_UNIT_ID") HCS_ORGANIZATIONS_INVITATION_ID = os.Getenv("HCS_ORGANIZATIONS_INVITATION_ID") HCS_ER_TEST_ON = os.Getenv("HCS_ER_TEST_ON") // Whether to run the ER related tests. // The OBS address where the HCL/JSON template archive (No variables) is located. HCS_RF_TEMPLATE_ARCHIVE_NO_VARS_URI = os.Getenv("HCS_RF_TEMPLATE_ARCHIVE_NO_VARS_URI") // The OBS address where the HCL/JSON template archive is located. HCS_RF_TEMPLATE_ARCHIVE_URI = os.Getenv("HCS_RF_TEMPLATE_ARCHIVE_URI") // The OBS address where the variable archive corresponding to the HCL/JSON template is located. HCS_RF_VARIABLES_ARCHIVE_URI = os.Getenv("HCS_RF_VARIABLES_ARCHIVE_URI") // The direct connection ID (provider does not support direct connection resource). HCS_DC_DIRECT_CONNECT_ID = os.Getenv("HCS_DC_DIRECT_CONNECT_ID") // The CFW instance ID HCS_CFW_INSTANCE_ID = os.Getenv("HCS_CFW_INSTANCE_ID") // The cluster ID of the CCE HCS_CCE_CLUSTER_ID = os.Getenv("HCS_CCE_CLUSTER_ID") // The partition az of the CCE HCS_CCE_PARTITION_AZ = os.Getenv("HCS_CCE_PARTITION_AZ") // The namespace of the workload is located HCS_WORKLOAD_NAMESPACE = os.Getenv("HCS_WORKLOAD_NAMESPACE") // The workload type deployed in CCE/CCI HCS_WORKLOAD_TYPE = os.Getenv("HCS_WORKLOAD_TYPE") // The workload name deployed in CCE/CCI HCS_WORKLOAD_NAME = os.Getenv("HCS_WORKLOAD_NAME") // The target region of SWR image auto sync HCS_SWR_TARGET_REGION = os.Getenv("HCS_SWR_TARGET_REGION") // The target organization of SWR image auto sync HCS_SWR_TARGET_ORGANIZATION = os.Getenv("HCS_SWR_TARGET_ORGANIZATION") // The ID of the CBR backup HCS_IMS_BACKUP_ID = os.Getenv("HCS_IMS_BACKUP_ID") // The SecMaster workspace ID HCS_SECMASTER_WORKSPACE_ID = os.Getenv("HCS_SECMASTER_WORKSPACE_ID") // Deprecated HCS_SRC_ACCESS_KEY = os.Getenv("HCS_SRC_ACCESS_KEY") HCS_SRC_SECRET_KEY = os.Getenv("HCS_SRC_SECRET_KEY") HCS_EXTGW_ID = os.Getenv("HCS_EXTGW_ID") HCS_POOL_NAME = os.Getenv("HCS_POOL_NAME") HCS_IMAGE_SHARE_SOURCE_IMAGE_ID = os.Getenv("HCS_IMAGE_SHARE_SOURCE_IMAGE_ID") )
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 RandomAccResourceName ¶
func RandomAccResourceName() string
func RandomAccResourceNameWithDash ¶
func RandomAccResourceNameWithDash() string
func RandomCidr ¶
func RandomCidr() string
func RandomCidrAndGatewayIp ¶
func RandomPassword ¶
func RandomPassword() string
func TestAccPreCheckAadForwardRule ¶
lintignore:AT003
func TestAccPreCheckCcePartitionAz ¶
lintignore:AT003
func TestAccPreCheckComponentDeployment ¶
lintignore:AT003
func TestAccPreCheckDcDirectConnection ¶
lintignore:AT003
func TestAccPreCheckDliDsAuthKafka ¶
lintignore:AT003
func TestAccPreCheckEip ¶
func TestAccPreCheckHighCostAllow ¶
lintignore:AT003
func TestAccPreCheckImageUrlUpdated ¶
lintignore:AT003
func TestAccPreCheckKms ¶
TestAccPreCheckKms is a pre-check method that used to control whether KMS resource-related tests are performed. KMS resources cannot be deleted immediately (at least 7 days) and the quota is small. To save resources and ensure normal pipeline testing, automatic verification is canceled. Manual verification is used to ensure the availability of this function (KMS encryption). lintignore:AT003
func TestAccPreCheckMrsBootstrapScript ¶
lintignore:AT003
func TestAccPreCheckOBSDestinationBucket ¶
lintignore:AT003
func TestAccPreCheckOrganizations ¶
lintignore:AT003
func TestAccPreCheckOrganizationsInvitationId ¶
lintignore:AT003
func TestAccPreCheckOrganizationsInviteAccountId ¶
lintignore:AT003
func TestAccPreCheckOrganizationsOrganizationalUnitId ¶
lintignore:AT003
func TestAccPreCheckRepoTokenAuth ¶
lintignore:AT003
func TestAccPreCheckScmCertificateName ¶
lintignore:AT003
func TestAccPreCheckSwrTargetOrigination ¶
lintignore:AT003
func TestAccPreCheckSwrTargetRegion ¶
lintignore:AT003
func TestAccPreCheckVODMediaAsset ¶
lintignore:AT003
func TestAccPreCheckWorkloadNameSpace ¶
lintignore:AT003
func TestAccSkipUnsupportedTest ¶
TestAccSkipUnsupportedTest is a method for skipping acceptance tests for which all related features are not yet supported. lintignore:AT003
func TestCheckResourceAttrWithVariable ¶
func TestCheckResourceAttrWithVariable(name, key, pair string) resource.TestCheckFunc
TestCheckResourceAttrWithVariable validates the pair variable in state for the given name/key combination.
Parameters: name: The resource or data source name is used to check in the terraform.State. key: The field name of the resource. pair: The pair name of the value to be checked. pair such like ${hcs_waf_certificate.certificate_1.id} or ${data.hcs_waf_policies.policies_2.policies.0.id}
Types ¶
type ResourceCheck ¶
type ResourceCheck struct {
// contains filtered or unexported fields
}
ResourceCheck resource check object
func InitDataSourceCheck ¶
func InitDataSourceCheck(dName string) *ResourceCheck
InitDataSourceCheck build a 'ResourceCheck' object. Only used to check datasource attributes.
Parameters: dName: The data source name is used to check in the terraform.State. e.g. data.hcs_css_flavors.test Return: *ResourceCheck: ResourceCheck object
func InitResourceCheck ¶
func InitResourceCheck(rName string, rObject interface{}, getResourceFunc ServiceFunc) *ResourceCheck
InitResourceCheck build a 'ResourceCheck' object. The common test methods are provided in 'ResourceCheck'.
Parameters: rName: The resource name is used to check in the terraform.State. e.g. hcs_waf_domain.domain_1 rObject: Resource object pointer, used to check whether the resource exists getResourceFunc: The function used to get the resource object. Return: *ResourceCheck: ResourceCheck object
func (*ResourceCheck) CheckMultiResourcesExists ¶
func (rc *ResourceCheck) CheckMultiResourcesExists(count int) resource.TestCheckFunc
CheckMultiResourcesExists checks whether multiple resources created by count are both existed.
Parameters: count: the expected number of resources that will be created.
func (*ResourceCheck) CheckResourceDestroy ¶
func (rc *ResourceCheck) CheckResourceDestroy() resource.TestCheckFunc
CheckResourceDestroy check whether resources destroyed
func (*ResourceCheck) CheckResourceExists ¶
func (rc *ResourceCheck) CheckResourceExists() resource.TestCheckFunc
CheckResourceExists check whether resources exist
type ServiceFunc ¶
type ServiceFunc func(*config.HcsConfig, *terraform.ResourceState) (interface{}, error)
ServiceFunc the resource query functions