Skip to content

Commit

Permalink
Add ip_address attribute to aws_lightsail_static_ip_attachment resource
Browse files Browse the repository at this point in the history
  • Loading branch information
RulerOf committed Sep 13, 2019
1 parent aa7fc99 commit 10efd9a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions aws/resource_aws_lightsail_static_ip_attachment.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ func resourceAwsLightsailStaticIpAttachment() *schema.Resource {
Required: true,
ForceNew: true,
},
"ip_address": {
Type: schema.TypeString,
Computed: true,
},
},
}
}
Expand Down Expand Up @@ -76,6 +80,7 @@ func resourceAwsLightsailStaticIpAttachmentRead(d *schema.ResourceData, meta int
log.Printf("[INFO] Received Lightsail Static IP: %s", *out)

d.Set("instance_name", out.StaticIp.AttachedTo)
d.Set("ip_address", out.StaticIp.IpAddress)

return nil
}
Expand Down

0 comments on commit 10efd9a

Please sign in to comment.