Skip to content

Commit

Permalink
Merge pull request #12 from eabdelmaqsod/master
Browse files Browse the repository at this point in the history
ami variables
  • Loading branch information
eabdelmaqsod authored Oct 12, 2020
2 parents a81cfb9 + 6ad8364 commit 00e032d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
## 1.1.0
* Add instance_ami variable V12

## 1.0.0
ENHANCEMENTS:
* Version 12 upgrade

## 0.2.0
NEW FEATURES:
* Add instance_ami variable

## 0.1.0
NEW FEATURES:
* Add custom volume size for concourse instance
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module "concourse" {
private_sn_a = "subnet-bc123456"
vpc_id = "vpc-98ad1234"
instance_volume_size = "200" #default 60
instance_ami = "ami-fo33w5t"
```
To enable access logs for the load balancer, set the parameter "enable_alb_access_logs = true". When set to true, the following parameters should also be configured as shown below:
```hcl
Expand Down
3 changes: 1 addition & 2 deletions ec2_instance.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@ data "aws_ami" "coreos" {
}

resource "aws_instance" "ec2_docker_instance" {
ami = data.aws_ami.coreos.id
ami = var.instance_ami
instance_type = var.instance_size
vpc_security_group_ids = flatten([aws_security_group.RuleGroupLBHttpIn[*].id, var.instance_sg_id, aws_security_group.GroupWS[*].id])
subnet_id = element(var.private_sn, 0)
key_name = var.instance_key_name
user_data = replace(data.template_file.userdata.rendered, "/\\r/", "")
iam_instance_profile = aws_iam_role.ec2_role.name


root_block_device {
volume_size = var.instance_volume_size
}
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ variable "instance_volume_size" {
default = "60"
}

variable "instance_ami" {
description = "ami"
}


variable "instance_sg_id" {
type = list(string)
description = "The Security Group ID/s which should be attached to the Instance."
Expand Down

0 comments on commit 00e032d

Please sign in to comment.