Skip to main content

Elastic Ip Address

Provides an Elastic Ip Address to be associated to an EC2 instance

exports.createResources = () => [
{
type: "ElasticIpAddress",
group: "EC2",
name: "eip",
properties: ({}) => ({
Tags: [
{
Key: "mykey",
Value: "myvalue",
},
],
}),
},
];

Properties

Examples

Used By

Listing

List only the elastic IP address with the ElasticIpAddress filter:

gc l -t ElasticIpAddress
Listing resources on 1 provider: aws
✓ aws
✓ Initialising
✓ Listing 2/2
┌─────────────────────────────────────────────────────────────────────────┐
│ 1 EC2::ElasticIpAddress from aws │
├─────────────────────────────────────────────────────────────────────────┤
│ name: eip │
│ managedByUs: Yes │
│ live: │
│ InstanceId: i-079dbd606096303f2 │
│ PublicIp: 3.228.154.164 │
│ AllocationId: eipalloc-0993474ac0c7bf743 │
│ AssociationId: eipassoc-0faab88f5a5103704 │
│ Domain: vpc │
│ NetworkInterfaceId: eni-092b69907be24f463 │
│ NetworkInterfaceOwnerId: 840541460064 │
│ PrivateIpAddress: 172.31.92.153 │
│ Tags: │
│ - Key: gc-created-by-provider │
│ Value: aws │
│ - Key: gc-managed-by │
│ Value: grucloud │
│ - Key: gc-project-name │
│ Value: @grucloud/example-aws-ec2 │
│ - Key: gc-stage │
│ Value: dev │
│ - Key: Name │
│ Value: eip │
│ PublicIpv4Pool: amazon │
│ NetworkBorderGroup: us-east-1 │
│ │
└─────────────────────────────────────────────────────────────────────────┘


List Summary:
Provider: aws
┌────────────────────────────────────────────────────────────────────────┐
│ aws │
├───────────────────────┬────────────────────────────────────────────────┤
│ EC2::ElasticIpAddress │ eip │
└───────────────────────┴────────────────────────────────────────────────┘
1 resource, 1 type, 1 provider
Command "gc list -t ElasticIpAddress" executed in 6s, 164 MB