Provides a static IP address attachment - relationship between a Lightsail static IP & Lightsail instance.
resource "aws_lightsail_static_ip_attachment" "test" {
static_ip_name = aws_lightsail_static_ip.test.id
instance_name = aws_lightsail_instance.test.id
}
resource "aws_lightsail_static_ip" "test" {
name = "example"
}
resource "aws_lightsail_instance" "test" {
name = "example"
availability_zone = "us-east-1b"
blueprint_id = "string"
bundle_id = "string"
key_pair_name = "some_key_name"
}
This resource supports the following arguments:
static_ip_name
- (Required) The name of the allocated static IPinstance_name
- (Required) The name of the Lightsail instance to attach the IP toThis resource exports the following attributes in addition to the arguments above:
ip_address
- The allocated static IP address