Commit 9b003307 authored by Anton Babenko's avatar Anton Babenko

Renamed count to instance_count (fixes #23)

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