mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
provider/aws: Err on failure to attach elb in OpsWorks layer update
This commit is contained in:
parent
923f7dca37
commit
320dc3ddf4
@ -414,10 +414,13 @@ func (lt *opsworksLayerType) Update(d *schema.ResourceData, client *opsworks.Ops
|
||||
|
||||
if loadBalancerNew != nil && *loadBalancerNew != "" {
|
||||
log.Printf("[DEBUG] Attaching load balancer: %s", *loadBalancerNew)
|
||||
client.AttachElasticLoadBalancer(&opsworks.AttachElasticLoadBalancerInput{
|
||||
_, err := client.AttachElasticLoadBalancer(&opsworks.AttachElasticLoadBalancerInput{
|
||||
ElasticLoadBalancerName: loadBalancerNew,
|
||||
LayerId: aws.String(d.Id()),
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user