aws_elastic_lb & aws_elastic_ip

aws_elastic_lb

elastic_lb handles registering and removing nodes from ELBs. The resource also adds basic support for creating and deleting ELBs. Note that currently this resource is not fully idempotent so it will not update the existing configuration of an ELB.

  • register - Add a node to the ELB
  • deregister - Remove a node from the ELB
  • create - Create a new ELB
  • delete - Delete an existing ELB
  • aws_secret_access_key, aws_access_key and optionally aws_session_token - required, unless using IAM roles for authentication.
  • name - the name of the ELB, required.
  • region, The region of the ELB. Defaults to the region of the node.
  • listeners, Array or hashes. The ports/protocols the ELB will listen on. See the example for a sample.
  • security_groups, Array. Security groups to apply to the ELB. Only needed when creating ELBs.
  • subnets, Array. The subnets the ELB will listen in. Only needed when creating ELBs and when using VPCs.
  • availability_zones: Array. The availability zones the ELB will listen in. Only needed when creating ELBs and when using classic networking.
  • tags: Array.
  • scheme: Array.

ELB running in classic networking listening on port 80.

aws_elastic_lb 'Setup the ELB' do
name 'example-elb'
action :create
availability_zones ['us-west-2a']
listeners [
{
instance_port: 80,
instance_protocol: 'HTTP',
load_balancer_port: 80,
protocol: 'HTTP',
},
]
end

To register the node in the ‘QA’ ELB:

aws_elastic_lb 'elb_qa' do
name 'QA'
action :register
end

aws_elastic_ip

The elastic_ip resource provider does not support allocating new IPs. This must be done before running a recipe that uses the resource. After allocating a new Elastic IP, we recommend storing it in a databag and loading the item in the recipe.

  • associate - Associate an allocated IP to the node
  • disassociate - Disassociate an allocated IP from the node
  • aws_secret_access_key, aws_access_key and optionally aws_session_token - required, unless using IAM roles for authentication.
  • ip: String. The IP address to associate or disassociate.
  • timeout: Integer. Default: 180. Time in seconds to wait. 0 for unlimited.
aws_elastic_ip '34.15.30.10' do
action :associate
end
aws_elastic_ip 'Server public IP' do
ip '34.15.30.11'
action :associate
end

--

--

--

Research Intern at ISRO.

Love podcasts or audiobooks? Learn on the go with our new app.

Mule4 Custom Configuration Properties using Azure Key Vault

Developing a Sports Betting Platform: Buy vs Build

鬼滅之刃劇場版 無限列車篇線上看|| 【宝贝老板2–2021】||完整版小鴨影音||HD

My Interview Experience of Deutsche Bank (Technology Analyst)

“Full Stack Development using Java Spring Framework” -under the guidance of DLithe

How and for What Purpose I created My First NEAR Project

Introduction to Golang

What the CRUD?!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Prishita Kapoor

Prishita Kapoor

Research Intern at ISRO.

More from Medium

AWS Lambda is a responsive cloud service that inspects actions within the application and responds…

Creating tables in DynamoDB

Setting Up AWS Environment

Getting started with AWS lambda and serverless framework