provider/aws: Expose zone_id from elb

This commit is contained in:
Radek Simko 2015-04-30 22:58:09 +01:00
parent e3616d391a
commit bafabf17be
2 changed files with 7 additions and 0 deletions

View File

@ -177,6 +177,11 @@ func resourceAwsElb() *schema.Resource {
Computed: true, Computed: true,
}, },
"zone_id": &schema.Schema{
Type: schema.TypeString,
Computed: true,
},
"tags": tagsSchema(), "tags": tagsSchema(),
}, },
} }
@ -281,6 +286,7 @@ func resourceAwsElbRead(d *schema.ResourceData, meta interface{}) error {
d.Set("name", *lb.LoadBalancerName) d.Set("name", *lb.LoadBalancerName)
d.Set("dns_name", *lb.DNSName) d.Set("dns_name", *lb.DNSName)
d.Set("zone_id", *lb.CanonicalHostedZoneNameID)
d.Set("internal", *lb.Scheme == "internal") d.Set("internal", *lb.Scheme == "internal")
d.Set("availability_zones", lb.AvailabilityZones) d.Set("availability_zones", lb.AvailabilityZones)
d.Set("instances", flattenInstances(lb.Instances)) d.Set("instances", flattenInstances(lb.Instances))

View File

@ -96,3 +96,4 @@ The following attributes are exported:
* `source_security_group` - The name of the security group that you can use as * `source_security_group` - The name of the security group that you can use as
part of your inbound rules for your load balancer's back-end application part of your inbound rules for your load balancer's back-end application
instances. instances.
* `zone_id` - The canonical hosted zone ID of the ELB (to be used in a Route 53 Alias record)