Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit 4727260

Browse files
committed
aws: fix VPN connection acceptance test.
This corrects syntactical errors and uses distinct IP addresses for each configuration.
1 parent 47305c9 commit 4727260

2 files changed

Lines changed: 13 additions & 23 deletions

File tree

builtin/providers/aws/resource_aws_vpn_connection_test.go

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func TestAccAwsVpnConnection(t *testing.T) {
3535
"aws_vpc.vpc",
3636
"aws_vpn_gateway.vpn_gateway",
3737
"aws_customer_gateway.customer_gateway",
38-
"aws_vpn_connection.bar",
38+
"aws_vpn_connection.foo",
3939
),
4040
),
4141
},
@@ -85,18 +85,16 @@ func testAccAwsVpnConnection(
8585
}
8686

8787
const testAccAwsVpnConnectionConfig = `
88-
resource "aws_vpc" "vpc" {
89-
cidr_block = "10.0.0.0/16"
90-
}
91-
9288
resource "aws_vpn_gateway" "vpn_gateway" {
93-
vpc_id = "${aws_vpc.vpc.id}"
89+
tags {
90+
Name = "vpn_gateway"
91+
}
9492
}
9593
9694
resource "aws_customer_gateway" "customer_gateway" {
9795
bgp_asn = 60000
98-
ip_address = "172.0.0.1"
99-
type = ipsec.1
96+
ip_address = "178.0.0.1"
97+
type = "ipsec.1"
10098
}
10199
102100
resource "aws_vpn_connection" "foo" {
@@ -107,29 +105,21 @@ resource "aws_vpn_connection" "foo" {
107105
}
108106
`
109107

108+
// Change static_routes_only to be false, forcing a refresh.
110109
const testAccAwsVpnConnectionConfigUpdate = `
111-
resource "aws_vpc" "vpc" {
112-
cidr_block = "10.0.0.0/16"
113-
}
114-
115110
resource "aws_vpn_gateway" "vpn_gateway" {
116-
vpc_id = "${aws_vpc.vpc.id}"
111+
tags {
112+
Name = "vpn_gateway"
113+
}
117114
}
118115
119116
resource "aws_customer_gateway" "customer_gateway" {
120117
bgp_asn = 60000
121-
ip_address = "172.0.0.1"
122-
type = ipsec.1
123-
}
124-
125-
resource "aws_vpn_connection" "foo" {
126-
vpn_gateway_id = "${aws_vpn_gateway.vpn_gateway.id}"
127-
customer_gateway_id = "${aws_customer_gateway.customer_gateway.id}"
118+
ip_address = "178.0.0.1"
128119
type = "ipsec.1"
129-
static_routes_only = true
130120
}
131121
132-
resource "aws_vpn_connection" "bar" {
122+
resource "aws_vpn_connection" "foo" {
133123
vpn_gateway_id = "${aws_vpn_gateway.vpn_gateway.id}"
134124
customer_gateway_id = "${aws_customer_gateway.customer_gateway.id}"
135125
type = "ipsec.1"

website/source/docs/providers/aws/r/vpn_connection.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: "aws"
33
page_title: "AWS: aws_vpn_connection"
4-
sidebar_current: "docs-aws-vpn-connection"
4+
sidebar_current: "docs-aws-resource-vpn-connection"
55
description: |-
66
Provides a VPN connection connected to a VPC. These objects can be connected to customer gateways, and allow you to establish tunnels between your network and the VPC.
77
---

0 commit comments

Comments
 (0)