Skip to content

Commit 523474c

Browse files
committed
Merge branch 'release/1.0.0'
2 parents f99d63e + 292a5be commit 523474c

File tree

4 files changed

+18
-13
lines changed

4 files changed

+18
-13
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 1.0.0
2+
3+
- Renames `cloud_config` to `cloud_config_content`.
4+
- Adds `cloud_config_content_type` to supply the content type for the `cloud-config` content.
5+
16
## 0.8.1
27

38
- Use `owners` argument for `aws_ami` instead of owner-alias filter.

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ A Terraform module to create an Amazon Web Services (AWS) EC2 Container Service
77
```hcl
88
data "template_file" "container_instance_cloud_config" {
99
template = "${file("cloud-config/container-instance.yml.tpl")}"
10-
10+
1111
vars {
1212
environment = "${var.environment}"
1313
}
@@ -58,7 +58,8 @@ module "container_service_cluster" {
5858
- `root_block_device_size` - Instance root block device size in gigabytes (default: `8`)
5959
- `instance_type` - Instance type for cluster instances (default: `t2.micro`)
6060
- `key_name` - EC2 Key pair name
61-
- `cloud_config` - `cloud-config` user data supplied to launch configuration for cluster nodes
61+
- `cloud_config_content` - user data supplied to launch configuration for cluster nodes
62+
- `cloud_config_content_type` - the type of configuration being passed in as user data, see [EC2 user guide](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonLinuxAMIBasics.html#CloudInit) for a list of possible types (default: `text/cloud-config`)
6263
- `health_check_grace_period` - Time in seconds after container instance comes into service before checking health (default: `600`)
6364
- `desired_capacity` - Number of EC2 instances that should be running in cluster (default: `1`)
6465
- `min_size` - Minimum number of EC2 instances in cluster (default: `0`)
@@ -92,4 +93,4 @@ module "container_service_cluster" {
9293
- `ecs_autoscale_role_name` - Name of IAM role for use with ECS service autoscaling
9394
- `ecs_service_role_arn` - ARN of IAM role for use with ECS services
9495
- `ecs_autoscale_role_arn` - ARN of IAM role for use with ECS service autoscaling
95-
- `container_instance_ecs_for_ec2_service_role_arn` - ARN of IAM role associated with EC2 container instances
96+
- `container_instance_ecs_for_ec2_service_role_arn` - ARN of IAM role associated with EC2 container instances

main.tf

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ data "template_cloudinit_config" "container_instance_cloud_config" {
113113
}
114114

115115
part {
116-
content_type = "text/cloud-config"
117-
content = "${var.cloud_config}"
116+
content_type = "${var.cloud_config_content_type}"
117+
content = "${var.cloud_config_content}"
118118
}
119119
}
120120

@@ -144,13 +144,8 @@ data "aws_ami" "ecs_ami" {
144144
}
145145

146146
data "aws_ami" "user_ami" {
147-
count = "${var.lookup_latest_ami ? 0 : 1}"
148-
most_recent = true
149-
150-
filter {
151-
name = "owner-alias"
152-
values = ["${var.ami_owners}"]
153-
}
147+
count = "${var.lookup_latest_ami ? 0 : 1}"
148+
owners = ["${var.ami_owners}"]
154149

155150
filter {
156151
name = "image-id"

variables.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ variable "instance_type" {
3434

3535
variable "key_name" {}
3636

37-
variable "cloud_config" {}
37+
variable "cloud_config_content" {}
38+
39+
variable "cloud_config_content_type" {
40+
default = "text/cloud-config"
41+
}
3842

3943
variable "health_check_grace_period" {
4044
default = "600"

0 commit comments

Comments
 (0)