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

Reload via name change #45

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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Only SSH access is allowed to the bastion host.
* `allowed_ipv6_cidr` - A list of IPv6 CIDR Networks to allow ssh access to. Defaults to "::/0"
* `allowed_security_groups` - A list of Security Group ID's to allow access to the bastion host (useful if bastion is deployed internally) Defaults to empty list
* `extra_tags` - Optional a list of Key/Values Tags to be associated to the bastion host (see [Interpolated Tags](https://www.terraform.io/docs/providers/aws/r/autoscaling_group.html))
* `apply_changes_immediately` - Whether to apply `aws_launch_configuration` and update instances in autoscaling group (by default - `false`)

## Outputs:

Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ resource "aws_launch_configuration" "bastion" {
}

resource "aws_autoscaling_group" "bastion" {
name = "${var.name}"
name = "${var.apply_changes_immediately ? aws_launch_configuration.bastion.name : var.name}"

vpc_zone_identifier = [
"${var.subnet_ids}",
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,8 @@ variable "associate_public_ip_address" {
variable "key_name" {
default = ""
}

variable "apply_changes_immediately" {
description = "Whether to apply the changes at once and recreate auto-scaling group"
default = false
}