diff options
| author | Paul Buetow <paul@buetow.org> | 2023-12-31 17:59:33 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2023-12-31 17:59:33 +0200 |
| commit | 5ed8237764ed81b583f59146a902c759642e83b8 (patch) | |
| tree | 8b044db132537d0433faa080e1631c2ebb1cda73 | |
| parent | d46ca8f6149771c4e9b4e53f880d9e6dfe0735e8 (diff) | |
add more tags
| -rw-r--r-- | org-buetow-bastion/main.tf | 19 | ||||
| -rw-r--r-- | org-buetow-elb/alb.tf | 16 |
2 files changed, 20 insertions, 15 deletions
diff --git a/org-buetow-bastion/main.tf b/org-buetow-bastion/main.tf index f2bd9ae..4adb49d 100644 --- a/org-buetow-bastion/main.tf +++ b/org-buetow-bastion/main.tf @@ -14,6 +14,10 @@ provider "aws" { resource "aws_key_pair" "id_rsa_pub" { key_name = "bastion-id-rsa-pub" public_key = file("${path.module}/id_rsa.pub") + + tags = { + Name = "bastion" + } } resource "aws_instance" "bastion" { @@ -55,18 +59,3 @@ resource "aws_route53_record" "aaaa_record" { ttl = "300" records = aws_instance.bastion.ipv6_addresses } - -# For elastic IP - -#resource "aws_eip" "bastion" { -# instance = aws_instance.bastion.id -#} - -#resource "aws_route53_record" "bastion_ec2_buetow_cloud" { -# zone_id = data.terraform_remote_state.base.outputs.buetow_cloud_zone_id -# name = "bastion-ec2.buetow.cloud" -# type = "A" -# ttl = "300" -# records = [aws_instance.bastion.public_ip] -#} - diff --git a/org-buetow-elb/alb.tf b/org-buetow-elb/alb.tf index 00d4246..ed21f42 100644 --- a/org-buetow-elb/alb.tf +++ b/org-buetow-elb/alb.tf @@ -12,6 +12,10 @@ resource "aws_lb" "alb" { data.terraform_remote_state.base.outputs.public_subnet_b_id, data.terraform_remote_state.base.outputs.public_subnet_c_id, ] + + tags = { + Name = "alb" + } } resource "aws_lb_listener" "http_listener" { @@ -19,6 +23,10 @@ resource "aws_lb_listener" "http_listener" { port = "80" protocol = "HTTP" + tags = { + Name = "alb" + } + default_action { type = "redirect" @@ -39,6 +47,10 @@ resource "aws_lb_listener" "https_listener" { ssl_policy = "ELBSecurityPolicy-2016-08" certificate_arn = data.terraform_remote_state.base.outputs.buetow_cloud_certificate_arn + tags = { + Name = "alb" + } + default_action { type = "forward" target_group_arn = aws_lb_target_group.default_tg.arn @@ -51,5 +63,9 @@ resource "aws_lb_target_group" "default_tg" { protocol = "HTTP" vpc_id = data.terraform_remote_state.base.outputs.vpc_id target_type = "ip" + + tags = { + Name = "alb" + } } |
