Parcourir la source

Removes tags from threatq backup drive

To be tagged v5.3.5
Fred Damstra [afs macbook] il y a 3 ans
Parent
commit
8962d07fbf
2 fichiers modifiés avec 7 ajouts et 5 suppressions
  1. 3 1
      base/threatquotient/backup_ebs.tf
  2. 4 4
      base/threatquotient/main.tf

+ 3 - 1
base/threatquotient/backup_ebs.tf

@@ -7,7 +7,9 @@ resource "aws_ebs_volume" "tqbackup" {
   encrypted         = true
   kms_key_id        = data.aws_kms_key.ebs-key.arn
 
-  tags = merge(local.standard_tags, var.tags, { Name = "${local.server_name_stem}-${count.index}", Path = "/opt/tqbackup", Device = "/dev/xvdf" })
+  # Can't have extra tags here, or terraform will flipflop between these and the instance's volume_tags
+  #tags = merge(local.standard_tags, var.tags, { Name = "${local.server_name_stem}-${count.index}", Path = "/opt/tqbackup", Device = "/dev/xvdf" })
+  tags = merge(local.standard_tags, var.tags, { Name = "${local.server_name_stem}-${count.index}" })
 }
 
 resource "aws_volume_attachment" "tqbackup" {

+ 4 - 4
base/threatquotient/main.tf

@@ -87,7 +87,7 @@ resource "aws_instance" "instance" {
     # /var/tmp
     device_name = "/dev/xvdp"
     volume_type = local.ebs_volume_type
-    # volume_size = xx
+    #volume_size           = xx
     delete_on_termination = true
     encrypted             = true
     kms_key_id            = data.aws_kms_key.ebs-key.arn
@@ -115,9 +115,9 @@ resource "aws_instance" "instance" {
   }
   ebs_block_device {
     # /tmp
-    device_name = "/dev/xvds"
-    volume_type = local.ebs_volume_type
-    volume_size = 20
+    device_name           = "/dev/xvds"
+    volume_type           = local.ebs_volume_type
+    volume_size           = 20
     delete_on_termination = true
     encrypted             = true
     kms_key_id            = data.aws_kms_key.ebs-key.arn