provider/aws: Add env default for AWS_ACCOUNT_ID in VPC Peering connection

This commit is contained in:
Clint Shryock 2015-03-10 14:44:07 -05:00
parent d2c6ae0741
commit fe293f909e
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}"
}