Skip to content

Commit

Permalink
resource/aws_route53_zone_association: Fix tests, update docs/test co…
Browse files Browse the repository at this point in the history
…nfig to Terraform 0.12 format
  • Loading branch information
gazoakley committed Aug 1, 2020
1 parent e360dfc commit 65c823f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
15 changes: 10 additions & 5 deletions aws/resource_aws_route53_vpc_association_authorization_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,24 @@ import (

func TestAccAWSRoute53VpcAssociationAuthorization_basic(t *testing.T) {
var providers []*schema.Provider
resourceName := "aws_route53_vpc_association_authorization.test"

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
PreCheck: func() {
testAccPreCheck(t)
testAccAlternateAccountPreCheck(t)
},
ProviderFactories: testAccProviderFactories(&providers),
CheckDestroy: testAccCheckRoute53VPCAssociationAuthorizationDestroy,
Steps: []resource.TestStep{
{
Config: testAccRoute53VPCAssociationAuthorizationConfig(),
Check: resource.ComposeTestCheckFunc(
testAccCheckRoute53VPCAssociationAuthorizationExists("aws_route53_vpc_association_authorization.test"),
testAccCheckRoute53VPCAssociationAuthorizationExists(resourceName),
),
},
{
Config: testAccRoute53VPCAssociationAuthorizationConfig(),
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
Expand Down Expand Up @@ -117,7 +122,7 @@ resource "aws_vpc" "test" {
resource "aws_route53_zone" "test" {
name = "example.com"
vpc {
vpc_id = "${aws_vpc.test.id}"
vpc_id = aws_vpc.test.id
}
}
Expand All @@ -129,8 +134,8 @@ resource "aws_vpc" "alternate" {
}
resource "aws_route53_vpc_association_authorization" "test" {
zone_id = "${aws_route53_zone.test.id}"
vpc_id = "${aws_vpc.alternate.id}"
zone_id = aws_route53_zone.test.id
vpc_id = aws_vpc.alternate.id
}
`
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ resource "aws_vpc" "example" {
resource "aws_route53_zone" "example" {
name = "example.com"
vpc {
vpc_id = "${aws_vpc.example.id}"
vpc_id = aws_vpc.example.id
}
}
Expand All @@ -41,14 +41,14 @@ resource "aws_vpc" "alternate" {
}
resource "aws_route53_vpc_association_authorization" "example" {
zone_id = "${aws_route53_zone.example.id}"
vpc_id = "${aws_vpc.alternate.id}"
zone_id = aws_route53_zone.example.id
vpc_id = aws_vpc.alternate.id
}
resource "aws_route53_zone_association" "alternate" {
provider = "aws.alternate"
zone_id = "${aws_route53_zone.example.zone_id}"
vpc_id = "${aws_vpc.alternate.id}"
zone_id = aws_route53_zone.example.zone_id
vpc_id = aws_vpc.alternate.id
}
```

Expand Down

0 comments on commit 65c823f

Please sign in to comment.