Commit 1bde40a4 authored by Anton Babenko's avatar Anton Babenko

Added aws_eip to example and pre-commit hooks

parent ed1ab2cd
# EditorConfig is awesome: http://EditorConfig.org
# Uses editorconfig to maintain consistent coding styles
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 80
trim_trailing_whitespace = true
[*.{tf,tfvars}]
indent_size = 2
indent_style = space
[*.md]
max_line_length = 0
trim_trailing_whitespace = false
[Makefile]
tab_width = 2
indent_style = tab
[COMMIT_EDITMSG]
max_line_length = 0
\ No newline at end of file
repos:
- repo: git://github.com/antonbabenko/pre-commit-terraform
sha: v1.4.0
hooks:
- id: terraform_fmt
- repo: git://github.com/pre-commit/pre-commit-hooks
sha: v1.2.0
hooks:
- id: check-merge-conflict
Basic EC2 instance
==================
Configuration in this directory creates single EC2 instance with minimum set of arguments: AMI ID and instance type.
Configuration in this directory creates single EC2 instance with minimum set of arguments: AMI ID and instance type. It will also assign Elastic IP (EIP) to an instance.
Unspecified arguments for security group id and subnet are inherited from the default VPC.
......
......@@ -45,6 +45,11 @@ module "security_group" {
egress_rules = ["all-all"]
}
resource "aws_eip" "openvnp_eip" {
vpc = true
instance = "${module.ec2.id[0]}"
}
module "ec2" {
source = "../../"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment