-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add SSM to AWS network setup deployment
migrate aws-alb to terragrunt/opentofu
- Loading branch information
Showing
21 changed files
with
480 additions
and
160 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 was deleted.
Oops, something went wrong.
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,53 @@ | ||
|
||
data "aws_caller_identity" "current" {} | ||
|
||
locals { | ||
# tflint-ignore: terraform_unused_declarations | ||
account_id = data.aws_caller_identity.current.account_id | ||
|
||
prefix = var.env | ||
} | ||
|
||
variable "env" { | ||
type = string | ||
description = "Environment name" | ||
} | ||
|
||
# tflint-ignore: terraform_unused_declarations | ||
variable "external_access_ip" { | ||
type = string | ||
description = "The public IP which is allowed to access instance" | ||
} | ||
|
||
|
||
variable "ec2_instance_type" { | ||
type = string | ||
description = "Instance type for EC2 deployments" | ||
default = "t3.micro" | ||
} | ||
|
||
variable "ec2_architecture" { | ||
type = string | ||
description = "Instance type for EC2 deployments" | ||
default = "x86_64" | ||
} | ||
|
||
variable "zone" { | ||
default = "us-east-1a" | ||
type = string | ||
description = "Preffered AWS AZ where resources need to placed, has to be compatible with region variable" | ||
} | ||
|
||
# tflint-ignore: terraform_unused_declarations | ||
variable "region" { | ||
default = "us-east-1" | ||
type = string | ||
description = "Preffered AWS region where resource need to be placed" | ||
} | ||
|
||
|
||
variable "instance_profile" { | ||
default = "" | ||
type = string | ||
description = "The name of instance_profile (dynamically provisioning access to role)" | ||
} |
File renamed without changes.
File renamed without changes.
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,22 @@ | ||
locals { | ||
current_ip = "${run_cmd("--terragrunt-quiet", "dig", "+short", "myip.opendns.com", "@resolver1.opendns.com")}" | ||
} | ||
|
||
include { | ||
path = find_in_parent_folders() | ||
} | ||
|
||
terraform { | ||
# https://github.com/gruntwork-io/terragrunt/issues/1675 | ||
source = "${find_in_parent_folders("module")}///" | ||
} | ||
|
||
|
||
inputs = { | ||
env = "dev" | ||
external_access_ip = local.current_ip | ||
instance_profile = "SSM-EC2" | ||
ec2_instance_type = "t4g.small" # or t3.micro | ||
ec2_architecture = "arm64" # or x86_64 | ||
aws_tags = { Env = "dev" } | ||
} |
Oops, something went wrong.