provider/aws: Add env default for AWS_ACCOUNT_ID in VPC Peering connection
This commit is contained in:
parent
d2c6ae0741
commit
fe293f909e
|
@ -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,
|
||||
|
|
|
@ -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}"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue