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

Renamed count to instance_count (fixes #23)

parent 674be84a
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
......
......@@ -14,8 +14,8 @@ Usage
module "ec2_cluster" {
source = "terraform-aws-modules/ec2-instance/aws"
name = "my-cluster"
count = 5
name = "my-cluster"
instance_count = 5
ami = "ami-ebd02392"
instance_type = "t2.micro"
......@@ -50,4 +50,4 @@ Module managed by [Anton Babenko](https://github.com/antonbabenko).
License
-------
Apache 2 Licensed. See LICENSE for full details.
\ No newline at end of file
Apache 2 Licensed. See LICENSE for full details.
......@@ -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