Skip to content

Latest commit

 

History

History
143 lines (88 loc) · 3.13 KB

README.md

File metadata and controls

143 lines (88 loc) · 3.13 KB

Terraform Module: terraform-module-aws-eip

Terraform module for AWS Elastic IP


Code : Stable

This is a stable example. It should successfully build out of the box


General

This module can be used to deploy a Elastic IP on AWS Cloud Provider......


Prerequisites

This module needs Terraform 0.12.23 or newer. You can download the latest Terraform version from here.


Features Branches

Below we are able to check the resources that are being created as part of this module call:

  • Elastic IP

Usage

Using this repo

To use this module, add the following call to your code:

  • Sample Code:
module "eip" {
  source = "git::https://github.com/nitinda/terraform-module-aws-eip.git?ref=master"

  vpc                       = true
  network_interface         = "${aws_network_interface.multi-ip.id}"
  associate_with_private_ip = "10.0.0.10"
  tags                      = {
    Environment = "prod"
    Project     = "POC"
  }
}
module "eip" {
  source = "git::https://github.com/nitinda/terraform-module-aws-eip.git?ref=master"

  vpc  = true
  tags = {
    Environment = "prod"
    Project     = "POC"
  }
}
module "eip" {
  source = "git::https://github.com/nitinda/terraform-module-aws-eip.git?ref=master"

  instance = aws_instance.web.id
  vpc      = true
  tags     = {
    Environment = "prod"
    Project     = "POC"
  }
}

Inputs

The variables required in order for the module to be successfully called from the deployment repository are the following:

Variable Description Type Argument Status Default Value
vpc Boolean if the EIP is in a VPC or not bool Optional true
instance EC2 instance ID string Optional null
network_interface Network interface ID to associate with string Optional null
associate_with_private_ip A user specified primary or secondary private
IP address to associate with the Elastic IP address
string Optional null
public_ipv4_pool EC2 IPv4 address pool identifier or amazon string Optional amazon
tags A mapping of tags to assign to the resource map(string) Optional {}

Outputs

General

This module has the following outputs:

  • id
  • public_ip
  • public_dns

Usage

In order for the variables to be accessed at module level please use the syntax below:

module.<module_name>.<output_variable_name>

The output variable is able to be accessed through terraform state file using the syntax below:

data.terraform_remote_state.<layer_name>.<output_variable_name>

Authors

Module maintained by Module maintained by the - Nitin Das