Skip to content

Commit 2cd331b

Browse files
author
P4T12ICK
committed
aws terraform instance naming changes
1 parent dfeb109 commit 2cd331b

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

terraform/aws/modules/generic-server/resources.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
resource "aws_security_group" "this" {
3-
name = "${var.attack_range_id}-${var.server_name}-sg"
3+
name = "ar-${var.server_name}-${var.attack_range_id}-sg"
44
description = "Security group allowing all ingress and egress traffic"
55
vpc_id = var.vpc_id
66

@@ -21,7 +21,7 @@ resource "aws_security_group" "this" {
2121
}
2222

2323
tags = {
24-
Name = "${var.attack_range_id}-${var.server_name}-sg"
24+
Name = "ar-${var.server_name}-${var.attack_range_id}-sg"
2525
}
2626
}
2727

@@ -42,7 +42,7 @@ resource "aws_instance" "this" {
4242
}
4343

4444
tags = {
45-
Name = "${var.attack_range_id}-${var.server_name}"
45+
Name = "ar-${var.server_name}-${var.attack_range_id}"
4646
}
4747
}
4848

terraform/aws/modules/network/resources.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
data "aws_availability_zones" "available" {}
33

44
locals {
5-
cluster_name = "cluster_${var.attack_range_id}"
5+
cluster_name = "ar_cluster_${var.attack_range_id}"
66
}
77

88
module "vpc" {
99
source = "terraform-aws-modules/vpc/aws"
1010

11-
name = "vpc_${var.attack_range_id}"
11+
name = "ar_vpc_${var.attack_range_id}"
1212
cidr = "10.0.0.0/16"
1313
azs = data.aws_availability_zones.available.names
1414

terraform/aws/modules/router/resources.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
resource "aws_security_group" "default" {
3-
name = "sg_router_${var.attack_range_id}"
3+
name = "ar_sg_router_${var.attack_range_id}"
44
vpc_id = var.vpc_id
55

66
ingress {

terraform/aws/modules/zeek-server/resources.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
resource "aws_security_group" "zeek_server" {
22
count = var.zeek_server ? 1 : 0
3-
name = "${var.attack_range_id}-${var.server_name}-sg"
3+
name = "ar-${var.server_name}-${var.attack_range_id}-sg"
44
description = "Security group allowing all ingress and egress traffic"
55
vpc_id = var.vpc_id
66

@@ -21,7 +21,7 @@ resource "aws_security_group" "zeek_server" {
2121
}
2222

2323
tags = {
24-
Name = "${var.attack_range_id}-${var.server_name}-sg"
24+
Name = "ar-${var.server_name}-${var.attack_range_id}-sg"
2525
}
2626
}
2727

@@ -35,7 +35,7 @@ resource "aws_instance" "zeek_sensor" {
3535
private_ip = var.private_ip
3636

3737
tags = {
38-
Name = "${var.attack_range_id}-${var.server_name}"
38+
Name = "ar-${var.server_name}-${var.attack_range_id}"
3939
}
4040

4141
root_block_device {

0 commit comments

Comments
 (0)