Skip to content
Snippets Groups Projects
Commit 1b98efb5 authored by Nuwan Rajika Kumarasiri's avatar Nuwan Rajika Kumarasiri
Browse files

Update to use an Amazon Linux 2 image - WISCALERTS-2

* In order to increase disk space allocated for Docker container utilize Amazon Linux 2. By default Amazon Linux 2 uses `overlay2` storage driver, which gives the base storage size of the space left on the disk.
* Removed SSM agent as it's shipped with all Amazon Linux 2 AMIs.
* Utilized `SSM` param store for storing `IICS` user credentials.
* Increased `EBS` volume size to allocate more disk space.
parent bf498625
No related branches found
No related tags found
No related merge requests found
locals {
informatica_username = format("arn:aws:ssm:%s:%s:parameter%s", var.aws_region, var.aws_account_id[0], "/iics/cicd_username")
informatica_password = format("arn:aws:ssm:%s:%s:parameter%s", var.aws_region, var.aws_account_id[0], "/iics/cicd_password")
data "aws_ssm_parameter" "informatica-username" {
name = "/iics/cicd_username"
}
data "aws_ssm_parameter" "informatica-password" {
name = "/iics/cicd_password"
}
data "template_file" "container" {
......@@ -13,8 +16,8 @@ data "template_file" "container" {
app_port1 = var.container_app_port[0]
app_port2 = var.container_app_port[1]
app_port3 = var.container_app_port[2]
informatica_username = local.informatica_username
informatica_password = local.informatica_password
informatica_username = data.aws_ssm_parameter.informatica-username.arn
informatica_password = data.aws_ssm_parameter.informatica-password.arn
secure_agent_mount_path = var.secure_agent_mount_path
}
}
......@@ -59,8 +62,8 @@ resource "aws_iam_policy" "iics-ssm-policy" {
"ssm:GetParameters"
],
"Resource": [
"${local.informatica_username}",
"${local.informatica_password}"
"${data.aws_ssm_parameter.informatica-username.arn}",
"${data.aws_ssm_parameter.informatica-password.arn}"
]
}
]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment