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 TestAccPreCheckDeprecated(t *testing.T)
- func TestAccPreCheckEpsID(t *testing.T)
- func TestAccPreCheckProject(t *testing.T)
- func TestCheckResourceAttrWithVariable(resourceName, key, varStr string) resource.TestCheckFunc
- type ServiceFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SBC_REGION_NAME = os.Getenv("SBC_REGION_NAME") SBC_ENTERPRISE_PROJECT_ID = os.Getenv("SBC_ENTERPRISE_PROJECT_ID") SBC_ENTERPRISE_PROJECT_ID_TEST = os.Getenv("SBC_ENTERPRISE_PROJECT_ID_TEST") SBC_PROJECT_ID = os.Getenv("SBC_PROJECT_ID") SBC_DEPRECATED_ENVIRONMENT = os.Getenv("SBC_DEPRECATED_ENVIRONMENT") SBC_ADMIN = os.Getenv("SBC_ADMIN") SBC_DOMAIN_ID = os.Getenv("SBC_DOMAIN_ID") SBC_DOMAIN_NAME = os.Getenv("SBC_DOMAIN_NAME") )
View Source
var TestAccProvider *schema.Provider
TestAccProvider is the "main" provider instance
View Source
var TestAccProviderFactories map[string]func() (*schema.Provider, error)
TestAccProviderFactories is a static map containing only the main provider instance
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. : sbercloud_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. : sbercloud_waf_domain.domain_1. resourceObject: Resource object, used to check whether the resource exists in SberCloud. 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 TestAccPreCheck ¶
func TestAccPreCheckEpsID ¶
func TestAccPreCheckProject ¶
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 ${sbercloud_waf_certificate.certificate_1.id} or ${data.sbercloud_waf_policies.policies_2.policies.0.id}
Types ¶
type ServiceFunc ¶
type ServiceFunc func(*config.Config, *terraform.ResourceState) (interface{}, error)
ServiceFunc the SberCloud resource query functions.
Click to show internal directories.
Click to hide internal directories.