Skip to content
This repository has been archived by the owner on Apr 4, 2018. It is now read-only.

Commit

Permalink
Handle Autoscaling Group Launch configuration updates
Browse files Browse the repository at this point in the history
Up until now we were not able to update a launch configuration (i.e.: AMI, user-data, instance type)
due to this bug: hashicorp/terraform#532
By removing the launch configuration name, we let Terraform generate a random one for us.
This will help when updating the launch configurations (this involves create a new resource and delete the old one).
  • Loading branch information
Mikko Caldara committed Apr 29, 2015
1 parent 27b38cc commit e18c7f6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion aws/api-servers.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
/* API servers Launch configuration */
resource "aws_launch_configuration" "api" {
name = "tsuru_api_config"
image_id = "${lookup(var.amis, var.region)}"
instance_type = "t2.medium"
security_groups = ["${aws_security_group.default.id}"]
key_name = "${aws_key_pair.deployer.key_name}"
user_data = "${file(\"cloud-config/app.yml\")}"
lifecycle {
create_before_destroy = true
}
}
/* API servers Autoscaling Group */
Expand Down
4 changes: 3 additions & 1 deletion aws/routers.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
/* Router Launch configuration */
resource "aws_launch_configuration" "router" {
name = "tsuru_router_config"
image_id = "${lookup(var.amis, var.region)}"
instance_type = "t2.medium"
security_groups = ["${aws_security_group.default.id}"]
key_name = "${aws_key_pair.deployer.key_name}"
user_data = "${file(\"cloud-config/router.yml\")}"
lifecycle {
create_before_destroy = true
}
}
/* Router Autoscaling Group */
Expand Down
4 changes: 3 additions & 1 deletion aws/ssl-proxies.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
/* SSL proxy Launch configuration */
resource "aws_launch_configuration" "tsuru-sslproxy" {
name = "tsuru_sslproxy_config"
image_id = "${lookup(var.amis, var.region)}"
instance_type = "t2.medium"
security_groups = ["${aws_security_group.default.id}","${aws_security_group.sslproxy.id}"]
key_name = "${aws_key_pair.deployer.key_name}"
user_data = "${file(\"cloud-config/sslproxy.yml\")}"
lifecycle {
create_before_destroy = true
}
}
/* SSL proxy Autoscaling Group */
Expand Down

0 comments on commit e18c7f6

Please sign in to comment.