Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cloudfront/module/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ resource "aws_acm_certificate" "cloudfront_cert" {

resource "aws_cloudfront_cache_policy" "default_cache_policy" {
count = var.default_cache_policy_id == null ? 1 : 0
name = "SugaDefaultCachePolicy"
name = "${var.suga.stack_id}-SugaDefaultCachePolicy"
comment = "Default cache policy for CloudFront distribution for Suga Applications"

# Set TTL defaults to respect cache control headers
Expand Down
2 changes: 1 addition & 1 deletion fargate/module/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Create an ECR repository
resource "aws_ecr_repository" "repo" {
name = var.suga.name
name = "${var.suga.stack_id}-${var.suga.name}"
}

data "aws_ecr_authorization_token" "ecr_auth" {
Expand Down
2 changes: 1 addition & 1 deletion lambda/module/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ locals {

# Create an ECR repository
resource "aws_ecr_repository" "repo" {
name = var.suga.name
name = "${var.suga.stack_id}-${var.suga.name}"
image_scanning_configuration {
scan_on_push = var.image_scan_on_push
}
Expand Down
2 changes: 1 addition & 1 deletion loadbalancer/module/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "aws_lb" "lb" {
name = var.name
name = "${var.suga.stack_id}-${var.name}"
internal = var.internal
load_balancer_type = var.load_balancer_type
security_groups = var.security_groups
Expand Down
12 changes: 9 additions & 3 deletions loadbalancer/module/variables.tf
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
variable "load_balancer_type" {
type = string
default = "application"
variable "suga" {
type = object({
stack_id = string
})
}

variable "name" {
type = string
}

variable "load_balancer_type" {
type = string
default = "application"
}

variable "listener_port" {
type = number
default = 80
Expand Down
6 changes: 6 additions & 0 deletions sgrule/module/variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
variable "suga" {
type = object({
stack_id = string
})
}

variable "security_group_ids" {
type = list(string)
description = "List of security group IDs to which the rule will be applied"
Expand Down
2 changes: 1 addition & 1 deletion vpc/module/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ locals {
module "vpc" {
source = "terraform-aws-modules/vpc/aws"

name = var.name
name = "${var.suga.stack_id}-${var.name}"
cidr = var.networking.cidr_block

azs = local.azs
Expand Down
7 changes: 7 additions & 0 deletions vpc/module/variables.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
variable "suga" {
type = object({
stack_id = string
})
}

variable "name" {
type = string
description = "The name of the VPC"
}

variable "networking" {
type = object({
cidr_block = string
Expand Down
Loading