provider/aws: Get and export ASG ARN value (#8503)
This commit is contained in:
parent
32f990b415
commit
daac877c82
|
@ -176,6 +176,11 @@ func resourceAwsAutoscalingGroup() *schema.Resource {
|
||||||
Set: schema.HashString,
|
Set: schema.HashString,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"arn": &schema.Schema{
|
||||||
|
Type: schema.TypeString,
|
||||||
|
Computed: true,
|
||||||
|
},
|
||||||
|
|
||||||
"tag": autoscalingTagsSchema(),
|
"tag": autoscalingTagsSchema(),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -285,6 +290,7 @@ func resourceAwsAutoscalingGroupRead(d *schema.ResourceData, meta interface{}) e
|
||||||
|
|
||||||
d.Set("availability_zones", flattenStringList(g.AvailabilityZones))
|
d.Set("availability_zones", flattenStringList(g.AvailabilityZones))
|
||||||
d.Set("default_cooldown", g.DefaultCooldown)
|
d.Set("default_cooldown", g.DefaultCooldown)
|
||||||
|
d.Set("arn", g.AutoScalingGroupARN)
|
||||||
d.Set("desired_capacity", g.DesiredCapacity)
|
d.Set("desired_capacity", g.DesiredCapacity)
|
||||||
d.Set("health_check_grace_period", g.HealthCheckGracePeriod)
|
d.Set("health_check_grace_period", g.HealthCheckGracePeriod)
|
||||||
d.Set("health_check_type", g.HealthCheckType)
|
d.Set("health_check_type", g.HealthCheckType)
|
||||||
|
|
|
@ -96,6 +96,8 @@ func TestAccAWSAutoScalingGroup_autoGeneratedName(t *testing.T) {
|
||||||
Check: resource.ComposeTestCheckFunc(
|
Check: resource.ComposeTestCheckFunc(
|
||||||
resource.TestMatchResourceAttr(
|
resource.TestMatchResourceAttr(
|
||||||
"aws_autoscaling_group.bar", "name", asgNameRegexp),
|
"aws_autoscaling_group.bar", "name", asgNameRegexp),
|
||||||
|
resource.TestCheckResourceAttrSet(
|
||||||
|
"aws_autoscaling_group.bar", "arn"),
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -104,6 +104,7 @@ Tags support the following:
|
||||||
The following attributes are exported:
|
The following attributes are exported:
|
||||||
|
|
||||||
* `id` - The autoscaling group name.
|
* `id` - The autoscaling group name.
|
||||||
|
* `arn` - The ARN for this AutoScaling Group
|
||||||
* `availability_zones` - The availability zones of the autoscale group.
|
* `availability_zones` - The availability zones of the autoscale group.
|
||||||
* `min_size` - The minimum size of the autoscale group
|
* `min_size` - The minimum size of the autoscale group
|
||||||
* `max_size` - The maximum size of the autoscale group
|
* `max_size` - The maximum size of the autoscale group
|
||||||
|
|
Loading…
Reference in New Issue