Skip to content

Commit

Permalink
- 0.1.0 -- 2025-04-14
Browse files Browse the repository at this point in the history
  - add map tag section for AWS Migration Acceleration Program (automatic, but need to select them from output)
  • Loading branch information
badra001 committed Apr 14, 2025
1 parent 92542d1 commit 20202ca
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion common/version.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
locals {
_module_version = "0.0.7"
_module_version = "0.1.0"
_module_name = "boc-nts"
}
40 changes: 40 additions & 0 deletions tags/tags.map.tf
Original file line number Diff line number Diff line change
@@ -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 }
}

0 comments on commit 20202ca

Please sign in to comment.