Skip to content

Commit

Permalink
Merge pull request #25 from terraform-aws-modules/renamed-count
Browse files Browse the repository at this point in the history
Renamed count to instance_count (fixes #23)
  • Loading branch information
antonbabenko authored Mar 6, 2018
2 parents 674be84 + 9b00330 commit 43b413b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -50,4 +50,4 @@ Module managed by [Anton Babenko](https://github.com/antonbabenko).
License
-------

Apache 2 Licensed. See LICENSE for full details.
Apache 2 Licensed. See LICENSE for full details.
2 changes: 1 addition & 1 deletion examples/basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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]}"
}
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 43b413b

Please sign in to comment.