Skip to content

Commit

Permalink
changed region usage
Browse files Browse the repository at this point in the history
  • Loading branch information
AgusPk committed Oct 12, 2023
1 parent 2bd772a commit 8ffd97f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
1 change: 0 additions & 1 deletion live/core/vpc.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ module "vpc" {
tags = module.label.tags
enable_nat_gateway = true
single_nat_gateway = true
region = var.region
}

output "ssm_parameter_vpc_id" {
Expand Down
4 changes: 3 additions & 1 deletion modules/vpc/endpoints.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
data "aws_region" "current" {}

resource "aws_vpc_endpoint" "secrets_manager" {
vpc_id = module.vpc.vpc_id

service_name = "com.amazonaws.${var.region}.secretsmanager"
service_name = "com.amazonaws.${data.aws_region.current.name}.secretsmanager"

security_group_ids = [module.app_security_group.security_group_id] # You can specify security groups if needed
subnet_ids = module.vpc.private_subnets # Associate with private subnets
Expand Down
6 changes: 0 additions & 6 deletions modules/vpc/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,3 @@ variable "tags" {
type = map(any)
default = {}
}

variable "region" {
description = "AWS region"
type = string
default = "us-west-2"
}

0 comments on commit 8ffd97f

Please sign in to comment.