Merge pull request #1173 from hashicorp/fix-vpc-peering

provider/aws: Add env default for AWS_ACCOUNT_ID in VPC Peering connection
This commit is contained in:
Clint 2015-03-10 15:21:11 -05:00
commit 652f3dc3d7
2 changed files with 5 additions and 5 deletions

View File

@ -19,9 +19,10 @@ func resourceAwsVpcPeeringConnection() *schema.Resource {
Schema: map[string]*schema.Schema{
"peer_owner_id": &schema.Schema{
Type: schema.TypeString,
Required: true,
ForceNew: true,
Type: schema.TypeString,
Required: true,
ForceNew: true,
DefaultFunc: schema.EnvDefaultFunc("AWS_ACCOUNT_ID", nil),
},
"peer_vpc_id": &schema.Schema{
Type: schema.TypeString,

View File

@ -68,11 +68,10 @@ resource "aws_vpc" "foo" {
}
resource "aws_vpc" "bar" {
cidr_block = "10.0.1.0/16"
cidr_block = "10.1.0.0/16"
}
resource "aws_vpc_peering_connection" "foo" {
peer_owner_id = "12345"
vpc_id = "${aws_vpc.foo.id}"
peer_vpc_id = "${aws_vpc.bar.id}"
}