Merge pull request #3943 from hashicorp/b-aws-ecs-service-hotfix
Fix issue with undefined var
This commit is contained in:
commit
6cb5ce2a7c
|
@ -156,7 +156,7 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(out.Services) < 1 {
|
if len(out.Services) < 1 {
|
||||||
log.Printf("[DEBUG] Removing ECS service %q because it's gone", service.ServiceArn)
|
log.Printf("[DEBUG] Removing ECS service %s (%s) because it's gone", d.Get("name").(string), d.Id())
|
||||||
d.SetId("")
|
d.SetId("")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -165,7 +165,7 @@ func resourceAwsEcsServiceRead(d *schema.ResourceData, meta interface{}) error {
|
||||||
|
|
||||||
// Status==INACTIVE means deleted service
|
// Status==INACTIVE means deleted service
|
||||||
if *service.Status == "INACTIVE" {
|
if *service.Status == "INACTIVE" {
|
||||||
log.Printf("[DEBUG] Removing ECS service %q because it's INACTIVE", service.ServiceArn)
|
log.Printf("[DEBUG] Removing ECS service %s because it's INACTIVE", service.ServiceArn)
|
||||||
d.SetId("")
|
d.SetId("")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue