[arvados] updated: 2.6.0-146-gaa22d3f08
git repository hosting
git at public.arvados.org
Wed May 10 19:32:05 UTC 2023
Summary of changes:
tools/salt-install/terraform/aws/data-storage/locals.tf | 1 +
tools/salt-install/terraform/aws/data-storage/main.tf | 5 +++--
tools/salt-install/terraform/aws/services/locals.tf | 1 +
tools/salt-install/terraform/aws/services/main.tf | 5 +++--
tools/salt-install/terraform/aws/vpc/main.tf | 5 +++--
tools/salt-install/terraform/aws/vpc/outputs.tf | 4 ++++
tools/salt-install/terraform/aws/vpc/terraform.tfvars | 9 ++++++++-
tools/salt-install/terraform/aws/vpc/variables.tf | 6 ++++++
8 files changed, 29 insertions(+), 7 deletions(-)
via aa22d3f08b5eae6c81a730a94825eea4ad1a191a (commit)
from a751c4867db205101be07c357f1b7fec3b3332d8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit aa22d3f08b5eae6c81a730a94825eea4ad1a191a
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date: Wed May 10 16:29:10 2023 -0300
20482: Allows the site admin to customize tags applied to every resource.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>
diff --git a/tools/salt-install/terraform/aws/data-storage/locals.tf b/tools/salt-install/terraform/aws/data-storage/locals.tf
index 5b9f68969..f8d611400 100644
--- a/tools/salt-install/terraform/aws/data-storage/locals.tf
+++ b/tools/salt-install/terraform/aws/data-storage/locals.tf
@@ -5,4 +5,5 @@
locals {
region_name = data.terraform_remote_state.vpc.outputs.region_name
cluster_name = data.terraform_remote_state.vpc.outputs.cluster_name
+ custom_tags = data.terraform_remote_state.vpc.outputs.custom_tags
}
diff --git a/tools/salt-install/terraform/aws/data-storage/main.tf b/tools/salt-install/terraform/aws/data-storage/main.tf
index 6f7e233fd..a3ef8f010 100644
--- a/tools/salt-install/terraform/aws/data-storage/main.tf
+++ b/tools/salt-install/terraform/aws/data-storage/main.tf
@@ -13,9 +13,10 @@ terraform {
provider "aws" {
region = local.region_name
default_tags {
- tags = {
+ tags = merge(local.custom_tags, {
Arvados = local.cluster_name
- }
+ Terraform = true
+ })
}
}
diff --git a/tools/salt-install/terraform/aws/services/locals.tf b/tools/salt-install/terraform/aws/services/locals.tf
index 73de27780..abba4aab7 100644
--- a/tools/salt-install/terraform/aws/services/locals.tf
+++ b/tools/salt-install/terraform/aws/services/locals.tf
@@ -16,4 +16,5 @@ locals {
internal_service_hosts = data.terraform_remote_state.vpc.outputs.internal_service_hosts
ssl_password_secret_name = "${local.cluster_name}-${var.ssl_password_secret_name_suffix}"
instance_ami_id = var.instance_ami != "" ? var.instance_ami : data.aws_ami.debian-11.image_id
+ custom_tags = data.terraform_remote_state.vpc.outputs.custom_tags
}
diff --git a/tools/salt-install/terraform/aws/services/main.tf b/tools/salt-install/terraform/aws/services/main.tf
index c528a1239..f7a2527c2 100644
--- a/tools/salt-install/terraform/aws/services/main.tf
+++ b/tools/salt-install/terraform/aws/services/main.tf
@@ -13,9 +13,10 @@ terraform {
provider "aws" {
region = local.region_name
default_tags {
- tags = {
+ tags = merge(local.custom_tags, {
Arvados = local.cluster_name
- }
+ Terraform = true
+ })
}
}
diff --git a/tools/salt-install/terraform/aws/vpc/main.tf b/tools/salt-install/terraform/aws/vpc/main.tf
index be5e57490..5ac836b68 100644
--- a/tools/salt-install/terraform/aws/vpc/main.tf
+++ b/tools/salt-install/terraform/aws/vpc/main.tf
@@ -13,9 +13,10 @@ terraform {
provider "aws" {
region = var.region_name
default_tags {
- tags = {
+ tags = merge(var.custom_tags, {
Arvados = var.cluster_name
- }
+ Terraform = true
+ })
}
}
diff --git a/tools/salt-install/terraform/aws/vpc/outputs.tf b/tools/salt-install/terraform/aws/vpc/outputs.tf
index ca11f5d0d..b7974bd15 100644
--- a/tools/salt-install/terraform/aws/vpc/outputs.tf
+++ b/tools/salt-install/terraform/aws/vpc/outputs.tf
@@ -77,3 +77,7 @@ output "cluster_name" {
output "domain_name" {
value = var.domain_name
}
+
+output "custom_tags" {
+ value = var.custom_tags
+}
diff --git a/tools/salt-install/terraform/aws/vpc/terraform.tfvars b/tools/salt-install/terraform/aws/vpc/terraform.tfvars
index 32480f879..573825696 100644
--- a/tools/salt-install/terraform/aws/vpc/terraform.tfvars
+++ b/tools/salt-install/terraform/aws/vpc/terraform.tfvars
@@ -15,4 +15,11 @@ region_name = "us-east-1"
# vpc_id = "vpc-"
# sg_id = "sg-"
# public_subnet_id = "subnet-"
-# private_subnet_id = "subnet-"
\ No newline at end of file
+# private_subnet_id = "subnet-"
+
+# Optional custom tags to add to every resource. Default: {}
+# custom_tags = {
+# environment = "production"
+# project = "Phoenix"
+# owner = "jdoe"
+# }
\ No newline at end of file
diff --git a/tools/salt-install/terraform/aws/vpc/variables.tf b/tools/salt-install/terraform/aws/vpc/variables.tf
index e14c59808..ec6f5711b 100644
--- a/tools/salt-install/terraform/aws/vpc/variables.tf
+++ b/tools/salt-install/terraform/aws/vpc/variables.tf
@@ -61,4 +61,10 @@ variable "public_subnet_id" {
description = "Use existing public subnet instead of creating one for the cluster"
type = string
default = ""
+}
+
+variable "custom_tags" {
+ description = "Apply customized tags to every resource on the cluster"
+ type = map(string)
+ default = {}
}
\ No newline at end of file
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list