func resourceAwsElasticBeanstalkEnvironmentOptionSettingsUpdate(conn *elasticbeanstalk.ElasticBeanstalk, d *schema.ResourceData) error { name := d.Get("name").(string) envId := d.Id() log.Printf("[DEBUG] Elastic Beanstalk application: %s, update options", name) req := &elasticbeanstalk.UpdateEnvironmentInput{ EnvironmentId: aws.String(envId), } if d.HasChange("setting") { o, n := d.GetChange("setting") if o == nil { o = &schema.Set{F: optionSettingValueHash} } if n == nil { n = &schema.Set{F: optionSettingValueHash} } os := o.(*schema.Set) ns := n.(*schema.Set) req.OptionSettings = extractOptionSettings(ns.Difference(os)) } if _, err := conn.UpdateEnvironment(req); err != nil { return err } return nil }
func resourceAwsElasticBeanstalkEnvironmentSolutionStackUpdate(conn *elasticbeanstalk.ElasticBeanstalk, d *schema.ResourceData) error { name := d.Get("name").(string) solutionStack := d.Get("solution_stack_name").(string) envId := d.Id() log.Printf("[DEBUG] Elastic Beanstalk application: %s, update solution_stack_name: %s", name, solutionStack) _, err := conn.UpdateEnvironment(&elasticbeanstalk.UpdateEnvironmentInput{ EnvironmentId: aws.String(envId), SolutionStackName: aws.String(solutionStack), }) return err }
func resourceAwsElasticBeanstalkEnvironmentDescriptionUpdate(conn *elasticbeanstalk.ElasticBeanstalk, d *schema.ResourceData) error { name := d.Get("name").(string) desc := d.Get("description").(string) envId := d.Id() log.Printf("[DEBUG] Elastic Beanstalk application: %s, update description: %s", name, desc) _, err := conn.UpdateEnvironment(&elasticbeanstalk.UpdateEnvironmentInput{ EnvironmentId: aws.String(envId), Description: aws.String(desc), }) return err }