acctest

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2022 License: MPL-2.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const DefaultEmailAddress = "no-reply@hashicorp.com"

DefaultEmailAddress is the default email address to set as a resource or data source parameter for acceptance tests.

View Source
const RFC3339RegexPattern = `` /* 148-byte string literal not displayed */

Variables

View Source
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.

View Source
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.

View Source
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 ACMCertificateDomainFromEnv

func ACMCertificateDomainFromEnv(t *testing.T) string

func ACMCertificateRandomSubDomain

func ACMCertificateRandomSubDomain(rootDomain string) string

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

func AvailableEC2InstanceTypeForRegion(preferredInstanceTypes ...string) string

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

func AvailableEC2InstanceTypeForRegionNamed(name string, preferredInstanceTypes ...string) string

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

func CheckDestroyNoop(_ *terraform.State) error

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 CheckResourceAttrNameFromPrefix

func CheckResourceAttrNameFromPrefix(resourceName string, attributeName string, prefix string) resource.TestCheckFunc

CheckResourceAttrNameFromPrefix verifies that the state attribute value matches name generated from given prefix

func CheckResourceAttrNameGenerated

func CheckResourceAttrNameGenerated(resourceName string, attributeName string) resource.TestCheckFunc

CheckResourceAttrNameGenerated verifies that the state attribute value matches name automatically generated without prefix

func CheckResourceAttrNameWithSuffixFromPrefix

func CheckResourceAttrNameWithSuffixFromPrefix(resourceName string, attributeName string, prefix string, suffix string) resource.TestCheckFunc

CheckResourceAttrNameWithSuffixFromPrefix verifies that the state attribute value matches name with suffix generated from given prefix

func CheckResourceAttrNameWithSuffixGenerated

func CheckResourceAttrNameWithSuffixGenerated(resourceName string, attributeName string, suffix string) resource.TestCheckFunc

CheckResourceAttrNameWithSuffixGenerated verifies that the state attribute value matches name with suffix automatically generated without prefix

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 CheckResourceDisappears(provo *schema.Provider, resource *schema.Resource, resourceName string) resource.TestCheckFunc

func CheckWithProviders

func CheckWithProviders(f func(*terraform.State, *schema.Provider) error, providers *[]*schema.Provider) resource.TestCheckFunc

func ConfigAlternateAccountProvider

func ConfigAlternateAccountProvider() string

func ConfigAlternateRegionProvider deprecated

func ConfigAlternateRegionProvider() string

Deprecated: Use ConfigMultipleRegionProvider instead

func ConfigAssumeRolePolicy

func ConfigAssumeRolePolicy(policy string) string

func ConfigAvailableAZsNoOptIn

func ConfigAvailableAZsNoOptIn() string

func ConfigAvailableAZsNoOptInDefaultExclude

func ConfigAvailableAZsNoOptInDefaultExclude() string

func ConfigAvailableAZsNoOptInExclude

func ConfigAvailableAZsNoOptInExclude(excludeZoneIds ...string) string

func ConfigCompose

func ConfigCompose(config ...string) string

ConfigCompose can be called to concatenate multiple strings to build test configurations

func ConfigDefaultAndIgnoreTagsKeyPrefixes1

func ConfigDefaultAndIgnoreTagsKeyPrefixes1(key1, value1, keyPrefix1 string) string

func ConfigDefaultAndIgnoreTagsKeys1

func ConfigDefaultAndIgnoreTagsKeys1(key1, value1 string) string

func ConfigDefaultTags_Tags0

func ConfigDefaultTags_Tags0() string

func ConfigDefaultTags_Tags1

func ConfigDefaultTags_Tags1(tag1, value1 string) string

func ConfigDefaultTags_Tags2

func ConfigDefaultTags_Tags2(tag1, value1, tag2, value2 string) string

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 ConfigIgnoreTagsKeyPrefixes1

func ConfigIgnoreTagsKeyPrefixes1(keyPrefix1 string) string

func ConfigIgnoreTagsKeys

func ConfigIgnoreTagsKeys(key1 string) string

func ConfigLambdaBase

func ConfigLambdaBase(policyName, roleName, sgName string) string

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 ConfigMultipleRegionProvider

func ConfigMultipleRegionProvider(regions int) string

func ConfigNamedRegionalProvider

func ConfigNamedRegionalProvider(providerName string, region string) string

ConfigNamedRegionalProvider creates a new provider named configuration with a region.

This can be used to build multiple provider configuration testing.

func ConfigRegionalProvider

func ConfigRegionalProvider(region string) string

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 ConfigVPCWithSubnets(rName string, subnetCount int) string

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 Partition

func Partition() string

func PartitionDNSSuffix

func PartitionDNSSuffix() string

func PartitionReverseDNSPrefix

func PartitionReverseDNSPrefix() string

func PreCheck

func PreCheck(t *testing.T)

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

func PreCheckAPIGatewayTypeEDGE(t *testing.T)

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 PreCheckAlternateAccount

func PreCheckAlternateAccount(t *testing.T)

func PreCheckAssumeRoleARN

func PreCheckAssumeRoleARN(t *testing.T)

func PreCheckDirectoryService

func PreCheckDirectoryService(t *testing.T)

func PreCheckDirectoryServiceSimpleDirectory

func PreCheckDirectoryServiceSimpleDirectory(t *testing.T)

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

func PreCheckEC2Classic(t *testing.T)

PreCheckEC2Classic verifies AWS credentials and that EC2-Classic is supported

func PreCheckHasIAMRole

func PreCheckHasIAMRole(t *testing.T, roleName string)

func PreCheckIAMServiceLinkedRole

func PreCheckIAMServiceLinkedRole(t *testing.T, pathPrefix string)

func PreCheckMultipleRegion

func PreCheckMultipleRegion(t *testing.T, regions int)

func PreCheckOrganizationManagementAccount

func PreCheckOrganizationManagementAccount(t *testing.T)

func PreCheckOrganizationsAccount

func PreCheckOrganizationsAccount(t *testing.T)

func PreCheckOrganizationsEnabled

func PreCheckOrganizationsEnabled(t *testing.T)

func PreCheckOutpostsOutposts

func PreCheckOutpostsOutposts(t *testing.T)

func PreCheckPartition

func PreCheckPartition(t *testing.T, partition string)

PreCheckPartition checks that the test partition is the specified partition.

func PreCheckPartitionHasService

func PreCheckPartitionHasService(serviceId string, t *testing.T)

func PreCheckPartitionNot

func PreCheckPartitionNot(t *testing.T, partitions ...string)

PreCheckPartitionNot checks that the test partition is not one of the specified partitions.

func PreCheckRegion

func PreCheckRegion(t *testing.T, region string)

PreCheckRegion checks that the test region is the specified region.

func PreCheckRegionNot

func PreCheckRegionNot(t *testing.T, regions ...string)

PreCheckRegionNot checks that the test region is not one of the specified regions.

func PreCheckSSOAdminInstances

func PreCheckSSOAdminInstances(t *testing.T)

func PreCheckSkipError

func PreCheckSkipError(err error) bool

Check service API call error for reasons to skip acceptance testing These include missing API endpoints and unsupported API calls

func PrimaryInstanceState

func PrimaryInstanceState(s *terraform.State, name string) (*terraform.InstanceState, error)

Copied and inlined from the SDK testing code

func ProtoV5FactoriesAlternate

func ProtoV5FactoriesAlternate(t *testing.T) map[string]func() (tfprotov5.ProviderServer, error)

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

func RandomEmailAddress(domainName string) string

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 Region

func Region() string

func RegionProviderFunc

func RegionProviderFunc(region string, providers *[]*schema.Provider) func() *schema.Provider

func RegisterServiceErrorCheckFunc

func RegisterServiceErrorCheckFunc(endpointID string, f ServiceErrorCheckFunc)

func Skip

func Skip(t *testing.T, message string)

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 TLSPEMEscapeNewlines(pem string) string

func TLSRSAPrivateKeyPEM

func TLSRSAPrivateKeyPEM(bits int) string

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

func TLSRSAPublicKeyPEM(keyPem string) string

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

func TLSRSAX509CertificateRequestPEM(keyBits int, commonName string) (string, string)

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

func TLSRSAX509SelfSignedCACertificateForRolesAnywhereTrustAnchorPEM(keyPem string) string

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

func TLSRSAX509SelfSignedCACertificatePEM(keyPem string) string

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

func TLSRSAX509SelfSignedCertificatePEM(keyPem, commonName string) string

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL