@@ -66,6 +66,9 @@ func TestAccAWSVPCPeeringConnection_plan(t *testing.T) {
66
66
t .Fatal ("AWS_ACCOUNT_ID must be set." )
67
67
}
68
68
},
69
+
70
+ IDRefreshIgnore : []string {"auto_accept" },
71
+
69
72
Providers : testAccProviders ,
70
73
CheckDestroy : testAccCheckAWSVpcPeeringConnectionDestroy ,
71
74
Steps : []resource.TestStep {
@@ -85,13 +88,14 @@ func TestAccAWSVPCPeeringConnection_plan(t *testing.T) {
85
88
86
89
func TestAccAWSVPCPeeringConnection_tags (t * testing.T ) {
87
90
var connection ec2.VpcPeeringConnection
88
- peerId := os .Getenv ("TF_PEER_ID" )
89
- if peerId == "" {
90
- t .Skip ("Error: TestAccAWSVPCPeeringConnection_tags requires a peer ID to be set." )
91
- }
92
91
93
92
resource .Test (t , resource.TestCase {
94
- PreCheck : func () { testAccPreCheck (t ) },
93
+ PreCheck : func () {
94
+ testAccPreCheck (t )
95
+ if os .Getenv ("AWS_ACCOUNT_ID" ) == "" {
96
+ t .Fatal ("AWS_ACCOUNT_ID must be set." )
97
+ }
98
+ },
95
99
96
100
IDRefreshName : "aws_vpc_peering_connection.foo" ,
97
101
IDRefreshIgnore : []string {"auto_accept" },
@@ -100,7 +104,7 @@ func TestAccAWSVPCPeeringConnection_tags(t *testing.T) {
100
104
CheckDestroy : testAccCheckVpcDestroy ,
101
105
Steps : []resource.TestStep {
102
106
resource.TestStep {
103
- Config : fmt . Sprintf ( testAccVpcPeeringConfigTags , peerId ) ,
107
+ Config : testAccVpcPeeringConfigTags ,
104
108
Check : resource .ComposeTestCheckFunc (
105
109
testAccCheckAWSVpcPeeringConnectionExists (
106
110
"aws_vpc_peering_connection.foo" ,
@@ -355,7 +359,7 @@ resource "aws_vpc" "bar" {
355
359
resource "aws_vpc_peering_connection" "foo" {
356
360
vpc_id = "${aws_vpc.foo.id}"
357
361
peer_vpc_id = "${aws_vpc.bar.id}"
358
- peer_owner_id = "%s"
362
+ auto_accept = true
359
363
tags {
360
364
foo = "bar"
361
365
}
@@ -365,6 +369,9 @@ resource "aws_vpc_peering_connection" "foo" {
365
369
const testAccVpcPeeringConfigOptions = `
366
370
resource "aws_vpc" "foo" {
367
371
cidr_block = "10.0.0.0/16"
372
+ tags {
373
+ Name = "TestAccAWSVPCPeeringConnection_options"
374
+ }
368
375
}
369
376
370
377
resource "aws_vpc" "bar" {
0 commit comments