-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Removed removal of Mongo scripts to check they're correct * Removing the deleting of the remvoing of the files * Creation of Prod AMI and Staging/Prod using it * Triggering CICD * Removing SELinux module after it gets loaded * Moved rm for Mongo scripts which resolved that specific issue * Addressed the errors/warnings in AMI build, moved the metrics/system CloudWatch configuration to user-data * Trigger CI with new AMIs
- Loading branch information
1 parent
a1e0ca1
commit 4219479
Showing
6 changed files
with
407 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
variable "vpc_id" {} | ||
variable "subnet_id" {} | ||
variable "ami_name" {} | ||
variable "gold_owner" {} | ||
variable "environment" {} | ||
|
||
locals { timestamp = regex_replace(timestamp(), "[- TZ:]", "") } | ||
|
||
source "amazon-ebs" "Golden_Image" { | ||
ami_name = "eAPD Production AMI - ${local.timestamp}" | ||
instance_type = "t3.medium" | ||
access_key = "" | ||
secret_key = "" | ||
region = "" | ||
source_ami_filter { | ||
filters = { | ||
name = "EAST-RH 7-9 Gold Image V.*" | ||
root-device-type = "ebs" | ||
virtualization-type = "hvm" | ||
} | ||
most_recent = true | ||
owners = [var.gold_owner] | ||
} | ||
ssh_username = "ec2-user" | ||
associate_public_ip_address = true | ||
vpc_id = var.vpc_id | ||
subnet_id = var.subnet_id | ||
} | ||
|
||
build { | ||
sources = ["source.amazon-ebs.Golden_Image"] | ||
|
||
provisioner "shell" { | ||
environment_vars = [ | ||
"ENVIRONMENT=${var.environment}" | ||
] | ||
script = "./prodlogging.sh" | ||
} | ||
} |
Oops, something went wrong.