terraform refactor - update EC2 key
This commit is contained in:
@@ -87,8 +87,8 @@ resource "aws_instance" "streamlit_server" {
|
||||
vpc_security_group_ids = data.aws_security_groups.security_groups.ids
|
||||
iam_instance_profile = aws_iam_instance_profile.ec2_instance_profile.name
|
||||
associate_public_ip_address = false
|
||||
key_name = "tf-uat-key" # Created using TF and uploaded to S3. Prerequisite
|
||||
|
||||
key_name = var.key_name
|
||||
|
||||
root_block_device {
|
||||
volume_size = 30 # Variable
|
||||
encrypted = true # Mandatory
|
||||
|
||||
@@ -69,16 +69,5 @@ variable "acm_arns" {
|
||||
}
|
||||
}
|
||||
|
||||
#variable "secret_key" {
|
||||
# type = string
|
||||
#}
|
||||
#
|
||||
## required
|
||||
#variable "access_key" {
|
||||
# type = string
|
||||
#}
|
||||
#
|
||||
## required
|
||||
#variable "token" {
|
||||
# type = string
|
||||
#}
|
||||
variable "key_name" {
|
||||
}
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
vpc_id = "vpc-0f9d7c913f6522079"
|
||||
vpc_id = "vpc-0f9d7c913f6522079"
|
||||
key_name = "tf-test-key"
|
||||
@@ -1 +1,2 @@
|
||||
vpc_id = "vpc-0392396d0e7bdd77f"
|
||||
vpc_id = "vpc-0392396d0e7bdd77f"
|
||||
key_name = "tf-uat-key"
|
||||
@@ -54,7 +54,7 @@ locals {
|
||||
|
||||
# global prefix
|
||||
global_prefix = "${var.project_name}-${local.region_short_name}-${local.environment_short_name}-infra"
|
||||
|
||||
|
||||
# Resource prefix
|
||||
iam_role_prefix = "${local.global_prefix}-rol"
|
||||
|
||||
@@ -68,7 +68,6 @@ locals {
|
||||
}
|
||||
}
|
||||
provider "aws" {
|
||||
# profile = var.aws_profile
|
||||
|
||||
default_tags {
|
||||
tags = local.common_tags
|
||||
|
||||
Reference in New Issue
Block a user