diff --git a/CHANGELOG.md b/CHANGELOG.md index 48400e0..5a1641e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,3 +9,5 @@ - 0.0.7 -- 2025-02-05 - add legacy_remaining options to remove the finops tags from the legacy tags and preserve the remaining values +- 0.1.0 -- 2025-04-14 + - add map tag section (automatic, but need to select them from output) diff --git a/common/version.tf b/common/version.tf index 2e6ed2a..635c239 100644 --- a/common/version.tf +++ b/common/version.tf @@ -1,4 +1,4 @@ locals { - _module_version = "0.0.7" + _module_version = "0.1.0" _module_name = "boc-nts" } diff --git a/tags/tags.map.tf b/tags/tags.map.tf new file mode 100644 index 0000000..c547b07 --- /dev/null +++ b/tags/tags.map.tf @@ -0,0 +1,40 @@ +# The value includes a prefix and a 10 digit ID. Prefixes are: +# * mig +# * for most things +# * vm to ec2 +# * open source database +# * comm +# * for commercial databases -> RDS +# * oracle +# * for oracle things +# * oracle db +# * oracle pplications +# * not sure what other oracle things +# * mig_ec2_ +# * not sure, this looks like non-commercial other cloud (or maybe aws too) isntance to aws ec2 +# * comm_ec2_ +# * like comm, but but commercial db from ec2 instance to rds + +locals { +# _map_present = try(local.tags_in.map, false) + map_id = "MSDNVLIJDZ" + map_tag = "map-migrated" + map_values = { + "standard" = format("mig%v",local.map_id) + "ec2_standard" = format("mig_ec2_%v",local.map_id) + "commercial_db" = format("comm%v",local.map_id) + "ec2_commercial_db" = format("comm_ec2_%v",local.map_id) + "oracle" = format("oracle%v",local.map_id) + } +} + +# access these as module.tags.map_tags["commercial_db"] +output "map_tags" { + description = "Map of AWS Migration Acceleration Program (MAP) tags by usage. See https://s3.us-west-2.amazonaws.com/map-2.0-customer-documentation/html/AWSMapDocs/Examples.html for more information." + value = { for k,v in local.map_values: k => { (local.map_tag) = v } } +} + +ouptut "map" { + description = "Standard AWS Migration Acceleration Program (MAP) tag" + value = { (local.map_tag) = local.map_values.standard } +}