Skip to main content
Version: 0.0.25

Table: registered_instance

Table to track the EC2 instances that are registered into load balancers

Example

INSERT INTO registered_instance (instance, target_group_id) SELECT (SELECT id FROM instance WHERE tags ->> 'name' = 'test-vm'), (SELECT id FROM target_group WHERE target_group_name = 'test-target-group');

UPDATE registered_instance SET port = '80' FROM instance WHERE instance.id = registered_instance.instance AND target_group_id = (SELECT id FROM target_group WHERE target_group_name = 'test-target-group')
AND instance.tags ->> 'name' = 'test-vm';

DELETE FROM registered_instance USING instance WHERE instance.tags ->> 'name' = 'test-vm' AND instance.id = registered_instance.instance;

See

Columns

instance: instance

Reference to the instance to associate with the specific load balancer

Optional port: number

Port to expose in that association

region: string

Region for the VM association

target_group: target_group

Reference to the target group for the association