Documentation ¶
Index ¶
- Constants
- Variables
- func ACMCertificateDomainFromEnv(t *testing.T) string
- func ACMCertificateRandomSubDomain(rootDomain string) string
- func AccountID() string
- func AlternateRegion() string
- func AvailableEC2InstanceTypeForAvailabilityZone(availabilityZoneName string, preferredInstanceTypes ...string) string
- func AvailableEC2InstanceTypeForRegion(preferredInstanceTypes ...string) string
- func AvailableEC2InstanceTypeForRegionNamed(name string, preferredInstanceTypes ...string) string
- func CheckACMPCACertificateAuthorityActivateRootCA(certificateAuthority *acmpca.CertificateAuthority) resource.TestCheckFunc
- func CheckACMPCACertificateAuthorityActivateSubordinateCA(rootCertificateAuthority, certificateAuthority *acmpca.CertificateAuthority) resource.TestCheckFunc
- func CheckACMPCACertificateAuthorityDisableCA(certificateAuthority *acmpca.CertificateAuthority) resource.TestCheckFunc
- func CheckACMPCACertificateAuthorityExists(n string, certificateAuthority *acmpca.CertificateAuthority) resource.TestCheckFunc
- func CheckCallerIdentityAccountID(n string) resource.TestCheckFunc
- func CheckDestroyNoop(_ *terraform.State) error
- func CheckResourceAttrAccountID(resourceName, attributeName string) resource.TestCheckFunc
- func CheckResourceAttrEquivalentJSON(resourceName, attributeName, expectedJSON string) resource.TestCheckFunc
- func CheckResourceAttrGlobalARN(resourceName, attributeName, arnService, arnResource string) resource.TestCheckFunc
- func CheckResourceAttrGlobalARNAccountID(resourceName, attributeName, accountID, arnService, arnResource string) resource.TestCheckFunc
- func CheckResourceAttrGlobalARNNoAccount(resourceName, attributeName, arnService, arnResource string) resource.TestCheckFunc
- func CheckResourceAttrGreaterThanValue(n, key, value string) resource.TestCheckFunc
- func CheckResourceAttrRFC3339(resourceName, attributeName string) resource.TestCheckFunc
- func CheckResourceAttrRegionalARN(resourceName, attributeName, arnService, arnResource string) resource.TestCheckFunc
- func CheckResourceAttrRegionalARNAccountID(resourceName, attributeName, arnService, accountID, arnResource string) resource.TestCheckFunc
- func CheckResourceAttrRegionalARNEC2Classic(resourceName, attributeName, arnService, arnResource string) resource.TestCheckFunc
- func CheckResourceAttrRegionalARNIgnoreRegionAndAccount(resourceName, attributeName, arnService, arnResource string) resource.TestCheckFunc
- func CheckResourceAttrRegionalARNNoAccount(resourceName, attributeName, arnService, arnResource string) resource.TestCheckFunc
- func CheckResourceAttrRegionalHostnameService(resourceName, attributeName, serviceName string) resource.TestCheckFunc
- func CheckResourceDisappears(provo *schema.Provider, resource *schema.Resource, resourceName string) resource.TestCheckFunc
- func CheckVPCExists(n string, v *ec2.Vpc) resource.TestCheckFunc
- func CheckWithProviders(f func(*terraform.State, *schema.Provider) error, ...) resource.TestCheckFunc
- func ConfigAlternateAccountProvider() string
- func ConfigAlternateRegionProvider() stringdeprecated
- func ConfigAssumeRolePolicy(policy string) string
- func ConfigAvailableAZsNoOptIn() string
- func ConfigAvailableAZsNoOptInDefaultExclude() string
- func ConfigAvailableAZsNoOptInExclude(excludeZoneIds ...string) string
- func ConfigCompose(config ...string) string
- func ConfigDefaultAndIgnoreTagsKeyPrefixes1(key1, value1, keyPrefix1 string) string
- func ConfigDefaultAndIgnoreTagsKeys1(key1, value1 string) string
- func ConfigDefaultTags_Tags0() string
- func ConfigDefaultTags_Tags1(tag1, value1 string) string
- func ConfigDefaultTags_Tags2(tag1, value1, tag2, value2 string) string
- func ConfigEC2ClassicRegionProvider() string
- func ConfigIgnoreTagsKeyPrefixes1(keyPrefix1 string) string
- func ConfigIgnoreTagsKeys(key1 string) string
- func ConfigLambdaBase(policyName, roleName, sgName string) string
- func ConfigLatestAmazonLinux2HVMEBSARM64AMI() string
- func ConfigLatestAmazonLinux2HVMEBSX8664AMI() string
- func ConfigLatestAmazonLinuxHVMEBSAMI() string
- func ConfigMultipleRegionProvider(regions int) string
- func ConfigNamedRegionalProvider(providerName string, region string) string
- func ConfigRegionalProvider(region string) string
- func ConfigVPCWithSubnets(rName string, subnetCount int) string
- func DeleteResource(resource *schema.Resource, d *schema.ResourceData, meta interface{}) error
- func EC2ClassicRegion() string
- func ErrorCheck(t *testing.T, endpointIDs ...string) resource.ErrorCheckFunc
- func ErrorCheckSkipMessagesContaining(t *testing.T, messages ...string) resource.ErrorCheckFunc
- func FactoriesAlternate(t *testing.T, providers *[]*schema.Provider) map[string]func() (*schema.Provider, error)
- func MatchResourceAttrAccountID(resourceName, attributeName string) resource.TestCheckFunc
- func MatchResourceAttrGlobalARN(resourceName, attributeName, arnService string, ...) resource.TestCheckFunc
- func MatchResourceAttrGlobalARNNoAccount(resourceName, attributeName, arnService string, ...) resource.TestCheckFunc
- func MatchResourceAttrGlobalHostname(resourceName, attributeName, serviceName string, ...) resource.TestCheckFunc
- func MatchResourceAttrRegionalARN(resourceName, attributeName, arnService string, ...) resource.TestCheckFunc
- func MatchResourceAttrRegionalARNAccountID(resourceName, attributeName, arnService, accountID string, ...) resource.TestCheckFunc
- func MatchResourceAttrRegionalARNNoAccount(resourceName, attributeName, arnService string, ...) resource.TestCheckFunc
- func MatchResourceAttrRegionalHostname(resourceName, attributeName, serviceName string, ...) resource.TestCheckFunc
- func Partition() string
- func PartitionDNSSuffix() string
- func PartitionReverseDNSPrefix() string
- func PreCheck(t *testing.T)
- func PreCheckAPIGatewayTypeEDGE(t *testing.T)
- func PreCheckAlternateAccount(t *testing.T)
- func PreCheckAssumeRoleARN(t *testing.T)
- func PreCheckDirectoryService(t *testing.T)
- func PreCheckDirectoryServiceSimpleDirectory(t *testing.T)
- func PreCheckEC2Classic(t *testing.T)
- func PreCheckHasIAMRole(t *testing.T, roleName string)
- func PreCheckIAMServiceLinkedRole(t *testing.T, pathPrefix string)
- func PreCheckMultipleRegion(t *testing.T, regions int)
- func PreCheckOrganizationManagementAccount(t *testing.T)
- func PreCheckOrganizationsAccount(t *testing.T)
- func PreCheckOrganizationsEnabled(t *testing.T)
- func PreCheckOutpostsOutposts(t *testing.T)
- func PreCheckPartition(t *testing.T, partition string)
- func PreCheckPartitionHasService(serviceId string, t *testing.T)
- func PreCheckPartitionNot(t *testing.T, partitions ...string)
- func PreCheckRegion(t *testing.T, region string)
- func PreCheckRegionNot(t *testing.T, regions ...string)
- func PreCheckSSOAdminInstances(t *testing.T)
- func PreCheckSkipError(err error) bool
- func PrimaryInstanceState(s *terraform.State, name string) (*terraform.InstanceState, error)
- func ProtoV5FactoriesAlternate(t *testing.T) map[string]func() (tfprotov5.ProviderServer, error)
- func ProtoV5FactoriesAlternateAccountAndAlternateRegion(t *testing.T) map[string]func() (tfprotov5.ProviderServer, error)
- func ProtoV5FactoriesMultipleRegions(t *testing.T, n int) map[string]func() (tfprotov5.ProviderServer, error)
- func RandomDomain() domainName
- func RandomDomainName() string
- func RandomEmailAddress(domainName string) string
- func RandomFQDomainName() string
- func RandomSubdomain() string
- func Region() string
- func RegionProviderFunc(region string, providers *[]*schema.Provider) func() *schema.Provider
- func RegisterServiceErrorCheckFunc(endpointID string, f ServiceErrorCheckFunc)
- func Skip(t *testing.T, message string)
- func TLSPEMEscapeNewlines(pem string) string
- func TLSRSAPrivateKeyPEM(bits int) string
- func TLSRSAPublicKeyPEM(keyPem string) string
- func TLSRSAX509CertificateRequestPEM(keyBits int, commonName string) (string, string)
- func TLSRSAX509LocallySignedCertificatePEM(caKeyPem, caCertificatePem, keyPem, commonName string) string
- func TLSRSAX509SelfSignedCACertificateForRolesAnywhereTrustAnchorPEM(keyPem string) string
- func TLSRSAX509SelfSignedCACertificatePEM(keyPem string) string
- func TLSRSAX509SelfSignedCertificatePEM(keyPem, commonName string) string
- func ThirdRegion() string
- type ServiceErrorCheckFunc
Constants ¶
const ( // Provider name for single configuration testing ProviderName = "aws" // Provider name for alternate configuration testing ProviderNameAlternate = "awsalternate" // Provider name for alternate account and alternate region configuration testing ProviderNameAlternateAccountAlternateRegion = "awsalternateaccountalternateregion" // Provider name for alternate account and same region configuration testing ProviderNameAlternateAccountSameRegion = "awsalternateaccountsameregion" // Provider name for same account and alternate region configuration testing ProviderNameSameAccountAlternateRegion = "awssameaccountalternateregion" // Provider name for third configuration testing ProviderNameThird = "awsthird" ResourcePrefix = "tf-acc-test" )
const DefaultEmailAddress = "no-reply@hashicorp.com"
DefaultEmailAddress is the default email address to set as a resource or data source parameter for acceptance tests.
const RFC3339RegexPattern = `` /* 148-byte string literal not displayed */
Variables ¶
var ProtoV5ProviderFactories map[string]func() (tfprotov5.ProviderServer, error)
ProtoV5ProviderFactories is a static map containing only the main provider instance
Use other ProviderFactories functions, such as FactoriesAlternate, for tests requiring special provider configurations.
var Provider *schema.Provider
Provider is the "main" provider instance
This Provider can be used in testing code for API calls without requiring the use of saving and referencing specific ProviderFactories instances.
PreCheck(t) must be called before using this provider instance.
var ProviderEC2Classic *schema.Provider
ProviderEC2Classic is the EC2-Classic provider instance
This Provider can be used in testing code for API calls without requiring the use of saving and referencing specific ProviderFactories instances.
PreCheckEC2Classic(t) must be called before using this provider instance.
Functions ¶
func ACMCertificateRandomSubDomain ¶
ACM domain names cannot be longer than 64 characters Other resources, e.g. Cognito User Pool Domains, limit this to 63
func AccountID ¶
func AccountID() string
AccountID returns the account ID of Provider Must be used within a resource.TestCheckFunc
func AlternateRegion ¶
func AlternateRegion() string
func AvailableEC2InstanceTypeForAvailabilityZone ¶
func AvailableEC2InstanceTypeForAvailabilityZone(availabilityZoneName string, preferredInstanceTypes ...string) string
AvailableEC2InstanceTypeForAvailabilityZone returns the configuration for a data source that describes the first available EC2 instance type offering in the specified availability zone from a list of preferred instance types. The first argument is either an Availability Zone name or Terraform configuration reference to one, e.g.
- data.aws_availability_zones.available.names[0]
- aws_subnet.test.availability_zone
- us-west-2a
The data source is named 'available'.
func AvailableEC2InstanceTypeForRegion ¶
AvailableEC2InstanceTypeForRegion returns the configuration for a data source that describes the first available EC2 instance type offering in the current region from a list of preferred instance types. The data source is named 'available'.
func AvailableEC2InstanceTypeForRegionNamed ¶
AvailableEC2InstanceTypeForRegionNamed returns the configuration for a data source that describes the first available EC2 instance type offering in the current region from a list of preferred instance types. The data source name is configurable.
func CheckACMPCACertificateAuthorityActivateRootCA ¶
func CheckACMPCACertificateAuthorityActivateRootCA(certificateAuthority *acmpca.CertificateAuthority) resource.TestCheckFunc
func CheckACMPCACertificateAuthorityActivateSubordinateCA ¶
func CheckACMPCACertificateAuthorityActivateSubordinateCA(rootCertificateAuthority, certificateAuthority *acmpca.CertificateAuthority) resource.TestCheckFunc
func CheckACMPCACertificateAuthorityDisableCA ¶
func CheckACMPCACertificateAuthorityDisableCA(certificateAuthority *acmpca.CertificateAuthority) resource.TestCheckFunc
func CheckACMPCACertificateAuthorityExists ¶
func CheckACMPCACertificateAuthorityExists(n string, certificateAuthority *acmpca.CertificateAuthority) resource.TestCheckFunc
func CheckCallerIdentityAccountID ¶
func CheckCallerIdentityAccountID(n string) resource.TestCheckFunc
func CheckDestroyNoop ¶
CheckDestroyNoop is a TestCheckFunc to be used as a TestCase's CheckDestroy when no such check can be made.
func CheckResourceAttrAccountID ¶
func CheckResourceAttrAccountID(resourceName, attributeName string) resource.TestCheckFunc
CheckResourceAttrAccountID ensures the Terraform state exactly matches the account ID
func CheckResourceAttrEquivalentJSON ¶
func CheckResourceAttrEquivalentJSON(resourceName, attributeName, expectedJSON string) resource.TestCheckFunc
CheckResourceAttrEquivalentJSON is a TestCheckFunc that compares a JSON value with an expected value. Both JSON values are normalized before being compared.
func CheckResourceAttrGlobalARN ¶
func CheckResourceAttrGlobalARN(resourceName, attributeName, arnService, arnResource string) resource.TestCheckFunc
CheckResourceAttrGlobalARN ensures the Terraform state exactly matches a formatted ARN without region
func CheckResourceAttrGlobalARNAccountID ¶
func CheckResourceAttrGlobalARNAccountID(resourceName, attributeName, accountID, arnService, arnResource string) resource.TestCheckFunc
CheckResourceAttrGlobalARNAccountID ensures the Terraform state exactly matches a formatted ARN without region and with specific account ID
func CheckResourceAttrGlobalARNNoAccount ¶
func CheckResourceAttrGlobalARNNoAccount(resourceName, attributeName, arnService, arnResource string) resource.TestCheckFunc
CheckResourceAttrGlobalARNNoAccount ensures the Terraform state exactly matches a formatted ARN without region or account ID
func CheckResourceAttrGreaterThanValue ¶
func CheckResourceAttrGreaterThanValue(n, key, value string) resource.TestCheckFunc
func CheckResourceAttrRFC3339 ¶
func CheckResourceAttrRFC3339(resourceName, attributeName string) resource.TestCheckFunc
CheckResourceAttrRFC3339 ensures the Terraform state matches a RFC3339 value This TestCheckFunc will likely be moved to the Terraform Plugin SDK in the future.
func CheckResourceAttrRegionalARN ¶
func CheckResourceAttrRegionalARN(resourceName, attributeName, arnService, arnResource string) resource.TestCheckFunc
CheckResourceAttrRegionalARN ensures the Terraform state exactly matches a formatted ARN with region
func CheckResourceAttrRegionalARNAccountID ¶
func CheckResourceAttrRegionalARNAccountID(resourceName, attributeName, arnService, accountID, arnResource string) resource.TestCheckFunc
CheckResourceAttrRegionalARNAccountID ensures the Terraform state exactly matches a formatted ARN with region and specific account ID
func CheckResourceAttrRegionalARNEC2Classic ¶
func CheckResourceAttrRegionalARNEC2Classic(resourceName, attributeName, arnService, arnResource string) resource.TestCheckFunc
CheckResourceAttrRegionalARNEC2Classic ensures the Terraform state exactly matches a formatted ARN with EC2-Classic region
func CheckResourceAttrRegionalARNIgnoreRegionAndAccount ¶
func CheckResourceAttrRegionalARNIgnoreRegionAndAccount(resourceName, attributeName, arnService, arnResource string) resource.TestCheckFunc
CheckResourceAttrRegionalARNIgnoreRegionAndAccount ensures the Terraform state exactly matches a formatted ARN with region without specifying the region or account
func CheckResourceAttrRegionalARNNoAccount ¶
func CheckResourceAttrRegionalARNNoAccount(resourceName, attributeName, arnService, arnResource string) resource.TestCheckFunc
CheckResourceAttrRegionalARNNoAccount ensures the Terraform state exactly matches a formatted ARN with region but without account ID
func CheckResourceAttrRegionalHostnameService ¶
func CheckResourceAttrRegionalHostnameService(resourceName, attributeName, serviceName string) resource.TestCheckFunc
CheckResourceAttrRegionalHostnameService ensures the Terraform state exactly matches a service DNS hostname with region and partition DNS suffix
For example: ec2.us-west-2.amazonaws.com
func CheckResourceDisappears ¶
func CheckVPCExists ¶
func CheckVPCExists(n string, v *ec2.Vpc) resource.TestCheckFunc
func CheckWithProviders ¶
func ConfigAlternateAccountProvider ¶
func ConfigAlternateAccountProvider() string
func ConfigAlternateRegionProvider
deprecated
func ConfigAlternateRegionProvider() string
Deprecated: Use ConfigMultipleRegionProvider instead
func ConfigAssumeRolePolicy ¶
func ConfigAvailableAZsNoOptIn ¶
func ConfigAvailableAZsNoOptIn() string
func ConfigAvailableAZsNoOptInDefaultExclude ¶
func ConfigAvailableAZsNoOptInDefaultExclude() string
func ConfigCompose ¶
ConfigCompose can be called to concatenate multiple strings to build test configurations
func ConfigDefaultTags_Tags0 ¶
func ConfigDefaultTags_Tags0() string
func ConfigDefaultTags_Tags1 ¶
func ConfigDefaultTags_Tags2 ¶
func ConfigEC2ClassicRegionProvider ¶
func ConfigEC2ClassicRegionProvider() string
ConfigEC2ClassicRegionProvider is the Terraform provider configuration for EC2-Classic region testing
Testing EC2-Classic assumes no other provider configurations are necessary and overwrites the "aws" provider configuration.
func ConfigIgnoreTagsKeys ¶
func ConfigLambdaBase ¶
func ConfigLatestAmazonLinux2HVMEBSARM64AMI ¶
func ConfigLatestAmazonLinux2HVMEBSARM64AMI() string
ConfigLatestAmazonLinux2HVMEBSARM64AMI returns the configuration for a data source that describes the latest Amazon Linux 2 arm64 AMI using HVM virtualization and an EBS root device. The data source is named 'amzn2-ami-minimal-hvm-ebs-arm64'.
func ConfigLatestAmazonLinux2HVMEBSX8664AMI ¶
func ConfigLatestAmazonLinux2HVMEBSX8664AMI() string
ConfigLatestAmazonLinux2HVMEBSX8664AMI returns the configuration for a data source that describes the latest Amazon Linux 2 x86_64 AMI using HVM virtualization and an EBS root device. The data source is named 'amzn2-ami-minimal-hvm-ebs-x86_64'.
func ConfigLatestAmazonLinuxHVMEBSAMI ¶
func ConfigLatestAmazonLinuxHVMEBSAMI() string
ConfigLatestAmazonLinuxHVMEBSAMI returns the configuration for a data source that describes the latest Amazon Linux AMI using HVM virtualization and an EBS root device. The data source is named 'amzn-ami-minimal-hvm-ebs'.
func ConfigNamedRegionalProvider ¶
ConfigNamedRegionalProvider creates a new provider named configuration with a region.
This can be used to build multiple provider configuration testing.
func ConfigRegionalProvider ¶
ConfigRegionalProvider creates a new provider configuration with a region.
This can only be used for single provider configuration testing as it overwrites the "aws" provider configuration.
func ConfigVPCWithSubnets ¶
func DeleteResource ¶
func DeleteResource(resource *schema.Resource, d *schema.ResourceData, meta interface{}) error
func EC2ClassicRegion ¶
func EC2ClassicRegion() string
EC2ClassicRegion returns the EC2-Classic region for testing
func ErrorCheck ¶
func ErrorCheck(t *testing.T, endpointIDs ...string) resource.ErrorCheckFunc
func ErrorCheckSkipMessagesContaining ¶
func ErrorCheckSkipMessagesContaining(t *testing.T, messages ...string) resource.ErrorCheckFunc
ErrorCheckSkipMessagesContaining skips tests based on error messages that indicate unsupported features
func FactoriesAlternate ¶
func FactoriesAlternate(t *testing.T, providers *[]*schema.Provider) map[string]func() (*schema.Provider, error)
FactoriesAlternate creates ProviderFactories for cross-account and cross-region configurations
For cross-region testing: Typically paired with PreCheckMultipleRegion and ConfigAlternateRegionProvider.
For cross-account testing: Typically paired with PreCheckAlternateAccount and ConfigAlternateAccountProvider.
func MatchResourceAttrAccountID ¶
func MatchResourceAttrAccountID(resourceName, attributeName string) resource.TestCheckFunc
MatchResourceAttrAccountID ensures the Terraform state regexp matches an account ID
func MatchResourceAttrGlobalARN ¶
func MatchResourceAttrGlobalARN(resourceName, attributeName, arnService string, arnResourceRegexp *regexp.Regexp) resource.TestCheckFunc
MatchResourceAttrGlobalARN ensures the Terraform state regexp matches a formatted ARN without region
func MatchResourceAttrGlobalARNNoAccount ¶
func MatchResourceAttrGlobalARNNoAccount(resourceName, attributeName, arnService string, arnResourceRegexp *regexp.Regexp) resource.TestCheckFunc
MatchResourceAttrGlobalARNNoAccount ensures the Terraform state regexp matches a formatted ARN without region or account ID
func MatchResourceAttrGlobalHostname ¶
func MatchResourceAttrGlobalHostname(resourceName, attributeName, serviceName string, hostnamePrefixRegexp *regexp.Regexp) resource.TestCheckFunc
MatchResourceAttrGlobalHostname ensures the Terraform state regexp matches a formatted DNS hostname with partition DNS suffix and without region
func MatchResourceAttrRegionalARN ¶
func MatchResourceAttrRegionalARN(resourceName, attributeName, arnService string, arnResourceRegexp *regexp.Regexp) resource.TestCheckFunc
MatchResourceAttrRegionalARN ensures the Terraform state regexp matches a formatted ARN with region
func MatchResourceAttrRegionalARNAccountID ¶
func MatchResourceAttrRegionalARNAccountID(resourceName, attributeName, arnService, accountID string, arnResourceRegexp *regexp.Regexp) resource.TestCheckFunc
MatchResourceAttrRegionalARNAccountID ensures the Terraform state regexp matches a formatted ARN with region and specific account ID
func MatchResourceAttrRegionalARNNoAccount ¶
func MatchResourceAttrRegionalARNNoAccount(resourceName, attributeName, arnService string, arnResourceRegexp *regexp.Regexp) resource.TestCheckFunc
MatchResourceAttrRegionalARNNoAccount ensures the Terraform state regexp matches a formatted ARN with region but without account ID
func MatchResourceAttrRegionalHostname ¶
func MatchResourceAttrRegionalHostname(resourceName, attributeName, serviceName string, hostnamePrefixRegexp *regexp.Regexp) resource.TestCheckFunc
MatchResourceAttrRegionalHostname ensures the Terraform state regexp matches a formatted DNS hostname with region and partition DNS suffix
func PartitionDNSSuffix ¶
func PartitionDNSSuffix() string
func PartitionReverseDNSPrefix ¶
func PartitionReverseDNSPrefix() string
func PreCheck ¶
PreCheck verifies and sets required provider testing configuration
This PreCheck function should be present in every acceptance test. It allows test configurations to omit a provider configuration with region and ensures testing functions that attempt to call AWS APIs are previously configured.
These verifications and configuration are preferred at this level to prevent provider developers from experiencing less clear errors for every test.
func PreCheckAPIGatewayTypeEDGE ¶
PreCheckAPIGatewayTypeEDGE checks if endpoint config type EDGE can be used in a test and skips test if not (i.e., not in standard partition).
func PreCheckAssumeRoleARN ¶
func PreCheckDirectoryServiceSimpleDirectory ¶
Certain regions such as AWS GovCloud (US) do not support Simple AD directories and we do not have a good read-only way to determine this situation. Here we opt to perform a creation that will fail so we can determine Simple AD support.
func PreCheckEC2Classic ¶
PreCheckEC2Classic verifies AWS credentials and that EC2-Classic is supported
func PreCheckHasIAMRole ¶
func PreCheckMultipleRegion ¶
func PreCheckPartition ¶
PreCheckPartition checks that the test partition is the specified partition.
func PreCheckPartitionNot ¶
PreCheckPartitionNot checks that the test partition is not one of the specified partitions.
func PreCheckRegion ¶
PreCheckRegion checks that the test region is the specified region.
func PreCheckRegionNot ¶
PreCheckRegionNot checks that the test region is not one of the specified regions.
func PreCheckSkipError ¶
Check service API call error for reasons to skip acceptance testing These include missing API endpoints and unsupported API calls
func PrimaryInstanceState ¶
Copied and inlined from the SDK testing code
func ProtoV5FactoriesAlternateAccountAndAlternateRegion ¶
func ProtoV5FactoriesAlternateAccountAndAlternateRegion(t *testing.T) map[string]func() (tfprotov5.ProviderServer, error)
ProtoV5FactoriesAlternateAccountAndAlternateRegion creates ProtoV5ProviderFactories for cross-account and cross-region configurations
Usage typically paired with PreCheckMultipleRegion, PreCheckAlternateAccount, and ConfigAlternateAccountAndAlternateRegionProvider.
func ProtoV5FactoriesMultipleRegions ¶
func ProtoV5FactoriesMultipleRegions(t *testing.T, n int) map[string]func() (tfprotov5.ProviderServer, error)
ProtoV5FactoriesMultipleRegions creates ProtoV5ProviderFactories for the specified number of region configurations
Usage typically paired with PreCheckMultipleRegion and ConfigMultipleRegionProvider.
func RandomDomain ¶
func RandomDomain() domainName
func RandomDomainName ¶
func RandomDomainName() string
RandomDomainName creates a random two-level domain name in the form "<random>.test" The top level domain ".test" is reserved by IANA for testing purposes: https://datatracker.ietf.org/doc/html/rfc6761
func RandomEmailAddress ¶
RandomEmailAddress generates a random email address in the form "tf-acc-test-<random>@<domain>"
func RandomFQDomainName ¶
func RandomFQDomainName() string
RandomFQDomainName creates a random fully-qualified two-level domain name in the form "<random>.test." The top level domain ".test" is reserved by IANA for testing purposes: https://datatracker.ietf.org/doc/html/rfc6761
func RandomSubdomain ¶
func RandomSubdomain() string
RandomSubdomain creates a random three-level domain name in the form "<random>.<random>.test" The top level domain ".test" is reserved by IANA for testing purposes: https://datatracker.ietf.org/doc/html/rfc6761
func RegionProviderFunc ¶
func RegisterServiceErrorCheckFunc ¶
func RegisterServiceErrorCheckFunc(endpointID string, f ServiceErrorCheckFunc)
func Skip ¶
Skip implements a wrapper for (*testing.T).Skip() to prevent unused linting reports
Reference: https://github.com/dominikh/go-tools/issues/633#issuecomment-606560616
func TLSPEMEscapeNewlines ¶
func TLSRSAPrivateKeyPEM ¶
TLSRSAPrivateKeyPEM generates a RSA private key PEM string. Wrap with TLSPEMEscapeNewlines() to allow simple fmt.Sprintf() configurations such as: private_key_pem = "%[1]s"
func TLSRSAPublicKeyPEM ¶
TLSRSAPublicKeyPEM generates a RSA public key PEM string. Wrap with TLSPEMEscapeNewlines() to allow simple fmt.Sprintf() configurations such as: public_key_pem = "%[1]s"
func TLSRSAX509CertificateRequestPEM ¶
TLSRSAX509CertificateRequestPEM generates a x509 certificate request PEM string and a RSA private key PEM string. Wrap with TLSPEMEscapeNewlines() to allow simple fmt.Sprintf() configurations such as: certificate_signing_request_pem = "%[1]s" private_key_pem = "%[2]s"
func TLSRSAX509LocallySignedCertificatePEM ¶
func TLSRSAX509LocallySignedCertificatePEM(caKeyPem, caCertificatePem, keyPem, commonName string) string
TLSRSAX509LocallySignedCertificatePEM generates a local CA x509 certificate PEM string. Wrap with TLSPEMEscapeNewlines() to allow simple fmt.Sprintf() configurations such as: certificate_pem = "%[1]s"
func TLSRSAX509SelfSignedCACertificateForRolesAnywhereTrustAnchorPEM ¶
TLSRSAX509SelfSignedCACertificateForRolesAnywhereTrustAnchorPEM generates a x509 CA certificate PEM string. The CA certificate is suitable for use as an IAM RolesAnywhere Trust Anchor. See https://docs.aws.amazon.com/rolesanywhere/latest/userguide/trust-model.html#signature-verification. Wrap with TLSPEMEscapeNewlines() to allow simple fmt.Sprintf() configurations such as: root_certificate_pem = "%[1]s"
func TLSRSAX509SelfSignedCACertificatePEM ¶
TLSRSAX509SelfSignedCACertificatePEM generates a x509 CA certificate PEM string. Wrap with TLSPEMEscapeNewlines() to allow simple fmt.Sprintf() configurations such as: root_certificate_pem = "%[1]s"
func TLSRSAX509SelfSignedCertificatePEM ¶
TLSRSAX509SelfSignedCertificatePEM generates a x509 certificate PEM string. Wrap with TLSPEMEscapeNewlines() to allow simple fmt.Sprintf() configurations such as: private_key_pem = "%[1]s"
func ThirdRegion ¶
func ThirdRegion() string
Types ¶
type ServiceErrorCheckFunc ¶
type ServiceErrorCheckFunc func(*testing.T) resource.ErrorCheckFunc