From 03157610d82fcc96bb1f33351b59e160ae957259 Mon Sep 17 00:00:00 2001 From: David Harris Date: Sat, 16 Jul 2016 07:43:12 -0600 Subject: [PATCH] provider/aws: Read Elastic Beanstalk stack name (#7671) --- .../resource_aws_elastic_beanstalk_environment.go | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/builtin/providers/aws/resource_aws_elastic_beanstalk_environment.go b/builtin/providers/aws/resource_aws_elastic_beanstalk_environment.go index 5e5cb0c06..861722e17 100644 --- a/builtin/providers/aws/resource_aws_elastic_beanstalk_environment.go +++ b/builtin/providers/aws/resource_aws_elastic_beanstalk_environment.go @@ -108,13 +108,14 @@ func resourceAwsElasticBeanstalkEnvironment() *schema.Resource { Set: optionSettingValueHash, }, "solution_stack_name": &schema.Schema{ - Type: schema.TypeString, - Optional: true, - }, - "template_name": &schema.Schema{ Type: schema.TypeString, Optional: true, - ConflictsWith: []string{"solution_stack_name"}, + Computed: true, + ConflictsWith: []string{"template_name"}, + }, + "template_name": &schema.Schema{ + Type: schema.TypeString, + Optional: true, }, "wait_for_ready_timeout": &schema.Schema{ Type: schema.TypeString, @@ -420,6 +421,10 @@ func resourceAwsElasticBeanstalkEnvironmentRead(d *schema.ResourceData, meta int } } + if err := d.Set("solution_stack_name", env.SolutionStackName); err != nil { + return err + } + if err := d.Set("autoscaling_groups", flattenBeanstalkAsg(resources.EnvironmentResources.AutoScalingGroups)); err != nil { return err }