Skip to content

Commit

Permalink
Remove unnecessary zone data source in the test configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
adelamarre committed Oct 17, 2018
1 parent 24d32fb commit 2bc2b08
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions aws/resource_aws_cognito_user_pool_domain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func TestAccAWSCognitoUserPoolDomain_custom(t *testing.T) {
CheckDestroy: testAccCheckAWSCognitoUserPoolDomainDestroy,
Steps: []resource.TestStep{
{
Config: testAccAWSCognitoUserPoolDomainConfig_custom(customDomainName, poolName, certificateArn, customSubDomainName),
Config: testAccAWSCognitoUserPoolDomainConfig_custom(customSubDomainName, poolName, certificateArn),
Check: resource.ComposeAggregateTestCheckFunc(
testAccCheckAWSCognitoUserPoolDomainExists("aws_cognito_user_pool_domain.main"),
resource.TestCheckResourceAttr("aws_cognito_user_pool_domain.main", "domain", customSubDomainName),
Expand Down Expand Up @@ -168,13 +168,8 @@ resource "aws_cognito_user_pool" "main" {
`, domainName, poolName)
}

func testAccAWSCognitoUserPoolDomainConfig_custom(customDomainName, poolName, certificateArn, customSubDomainName string) string {
func testAccAWSCognitoUserPoolDomainConfig_custom(customSubDomainName, poolName, certificateArn string) string {
return fmt.Sprintf(`
data "aws_route53_zone" "tf-zone" {
name = "%s"
}
resource "aws_cognito_user_pool_domain" "main" {
domain = "%s"
user_pool_id = "${aws_cognito_user_pool.main.id}"
Expand All @@ -184,5 +179,5 @@ resource "aws_cognito_user_pool_domain" "main" {
resource "aws_cognito_user_pool" "main" {
name = "%s"
}
`, customDomainName, customSubDomainName, certificateArn, poolName)
`, customSubDomainName, certificateArn, poolName)
}

0 comments on commit 2bc2b08

Please sign in to comment.