Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor label fixes and highlighting new features available since 0.6.7 #11

Merged
merged 1 commit into from
Apr 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
## Unreleased

#### Consider Implementing:
* Added support for Autoscaling "StepScaling" policy.
* Expose `metrics_granularity`, `placement_group`?
* Auto-scaling schedule examples/modules.
* De-duplicate similarities between basic and standard modules.
* Consider coding `ebs_optimized` against list of [ebs-optimized instances](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html).

## 0.1.2 (Apr, 27, 2016)

#### BACKWARDS INCOMPATIBILITIES / NOTES:
* Changed the default value for `ebs_optimized` from `true` -> `false`. This setting is more compatible with the majority of instance types.

#### IMPROVEMENTS:
* Name for `aws_launch_configuration`.
* Fixed name label for `aws_autoscaling_group`.
* Fixed name label for auto-scaling group's security group.

## 0.1.1 (Dec 1, 2015)

#### IMPROVEMENTS:
Expand Down
5 changes: 4 additions & 1 deletion circle.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
machine:
environment:
TF_VERSION: 0.6.7
TF_VERSION: 0.6.15
TF_URL: https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_linux_amd64.zip
dependencies:
pre:
- "[[ -f \"${HOME}/bin/terraform\" ]] || (wget -O \"/tmp/tf.zip\" \"${TF_URL}\" && unzip -o -d \"${HOME}/bin\" \"/tmp/tf.zip\")"
- terraform version
test:
override:
# Style check
- "[ $(terraform fmt | wc -l) -eq 0 ]"
# Verify plan
- bundle exec rake
46 changes: 24 additions & 22 deletions examples/basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
provider "aws" {
region = "${var.region}"
}
provider "atlas" {}

provider "atlas" {
}

## Sources inputs from VPC remote state
resource "terraform_remote_state" "vpc" {
Expand Down Expand Up @@ -45,7 +47,7 @@ EOF
}

resource "aws_iam_instance_profile" "instance_profile" {
name = "${var.stack_item_label}-${var.region}-example"
name = "${var.stack_item_label}-${var.region}-example"
roles = ["${aws_iam_role.role.name}"]

lifecycle {
Expand All @@ -54,14 +56,14 @@ resource "aws_iam_instance_profile" "instance_profile" {
}

resource "aws_iam_role_policy" "logs" {
name = "monitoring"
role = "${aws_iam_role.role.id}"
name = "monitoring"
role = "${aws_iam_role.role.id}"

lifecycle {
create_before_destroy = true
}
lifecycle {
create_before_destroy = true
}

policy = <<EOF
policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
Expand All @@ -79,11 +81,11 @@ EOF

## Adds security group rules
resource "aws_security_group_rule" "ssh" {
type = "ingress"
from_port = 22
to_port = 22
protocol = "tcp"
cidr_blocks = ["${terraform_remote_state.vpc.output.lan_access_cidr}"]
type = "ingress"
from_port = 22
to_port = 22
protocol = "tcp"
cidr_blocks = ["${terraform_remote_state.vpc.output.lan_access_cidr}"]
security_group_id = "${module.example.sg_id}"

lifecycle {
Expand All @@ -97,8 +99,8 @@ resource "template_file" "user_data" {

vars {
hostname = "${var.stack_item_label}-example"
domain = "example.org"
region = "${var.region}"
domain = "example.org"
region = "${var.region}"
}

lifecycle {
Expand All @@ -111,20 +113,20 @@ module "example" {
source = "github.com/unifio/terraform-aws-asg//group/basic"

# Resource tags
stack_item_label = "${var.stack_item_label}"
stack_item_label = "${var.stack_item_label}"
stack_item_fullname = "${var.stack_item_fullname}"

# VPC parameters
vpc_id = "${terraform_remote_state.vpc.output.vpc_id}"
vpc_id = "${terraform_remote_state.vpc.output.vpc_id}"
subnets = "${terraform_remote_state.vpc.output.lan_subnet_ids}"
region = "${var.region}"
region = "${var.region}"

# LC parameters
ami = "${var.ami}"
instance_type = "${var.instance_type}"
ami = "${var.ami}"
instance_type = "${var.instance_type}"
instance_profile = "${aws_iam_instance_profile.instance_profile.id}"
user_data = "${template_file.user_data.rendered}"
key_name = "${var.key_name}"
user_data = "${template_file.user_data.rendered}"
key_name = "${var.key_name}"

# ASG parameters
max_size = "${var.cluster_max_size}"
Expand Down
40 changes: 29 additions & 11 deletions examples/basic/variables.tf
Original file line number Diff line number Diff line change
@@ -1,20 +1,38 @@
# Input Variables

## Resource tags
variable "stack_item_label" {}
variable "stack_item_fullname" {}
variable "stack_item_label" {
}

variable "stack_item_fullname" {
}

## VPC parameters
variable "organization" {}
variable "vpc_stack_name" {}
variable "region" {}
variable "organization" {
}

variable "vpc_stack_name" {
}

variable "region" {
}

## LC parameters
variable "ami" {}
variable "instance_type" {}
variable "instance_profile" {}
variable "key_name" {}
variable "ami" {
}

variable "instance_type" {
}

variable "instance_profile" {
}

variable "key_name" {
}

## ASG parameters
variable "cluster_max_size" {}
variable "cluster_min_size" {}
variable "cluster_max_size" {
}

variable "cluster_min_size" {
}
Loading