Commit 43b413b4 authored by Anton Babenko's avatar Anton Babenko Committed by GitHub

Merge pull request #25 from terraform-aws-modules/renamed-count

Renamed count to instance_count (fixes #23)
parents 674be84a 9b003307
repos:
- repo: git://github.com/antonbabenko/pre-commit-terraform
sha: v1.4.0
sha: v1.5.0
hooks:
- id: terraform_fmt
- repo: git://github.com/pre-commit/pre-commit-hooks
......
......@@ -15,7 +15,7 @@ module "ec2_cluster" {
source = "terraform-aws-modules/ec2-instance/aws"
name = "my-cluster"
count = 5
instance_count = 5
ami = "ami-ebd02392"
instance_type = "t2.micro"
......
......@@ -45,7 +45,7 @@ module "security_group" {
egress_rules = ["all-all"]
}
resource "aws_eip" "openvnp_eip" {
resource "aws_eip" "this" {
vpc = true
instance = "${module.ec2.id[0]}"
}
......
......@@ -2,7 +2,7 @@
# EC2 instance
######
resource "aws_instance" "this" {
count = "${var.count}"
count = "${var.instance_count}"
ami = "${var.ami}"
instance_type = "${var.instance_type}"
......
......@@ -2,7 +2,7 @@ variable "name" {
description = "Name to be used on all resources as prefix"
}
variable "count" {
variable "instance_count" {
description = "Number of instances to launch"
default = 1
}
......
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