README
context
Computes standardized, governed tags for consumption across all HCA IaC modules and stacks.
Provides a single source of truth for resource tagging, including required stack-identifying tags and the AWS Migration Acceleration Program (MAP) tag. Every module or stack that needs to tag an AWS resource consumes context rather than reimplementing tagging logic independently, keeping tagging policy centralized and consistent platform-wide. This module has no provider block and creates no AWS resources or data sources — it is pure computation and can be safely consumed by any stack regardless of account or region.
Usage
module "context" {
source = "hcassc.jfrog.io/iac-tf-modules-virtual__shared/context/aws"
version = "~> 1.0"
stack_name = "bitbucket-dev-runners"
application_name = "Bitbucket"
project = "DC-Migration-Project"
environment = "dev"
cost_center_opex = "271"
cost_center_capex = "000"
data_classification = "Internal"
availability_tier = "Tier 1"
app_owner = "Director IT Infrastructure and Platform Engineering"
team = "devops"
assignment_group = "hca-aws-support"
owner = "[email protected]"
business_unit = "Infrastructure and Planning"
additional_tags = {
Purpose = "shared-services-hub"
}
}
resource "aws_vpc" "this" {
cidr_block = "10.0.0.0/16"
tags = module.context.tags
}
Inputs
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| app_owner | Application owner role/title (tag: app-owner) | string |
n/a | yes |
| application_name | Application name (tag: application-name) | string |
n/a | yes |
| assignment_group | Support assignment group (tag: assignment-group) | string |
n/a | yes |
| availability_tier | Availability tier (tag: availability-tier) | string |
n/a | yes |
| business_unit | Business unit (tag: business-unit) | string |
n/a | yes |
| cost_center_capex | CAPEX cost center code (tag: cost-center-capex) | string |
n/a | yes |
| cost_center_opex | OPEX cost center code (tag: cost-center-opex) | string |
n/a | yes |
| data_classification | Data classification level (tag: data-classification) | string |
n/a | yes |
| environment | Deployment environment (tag: environment) | string |
n/a | yes |
| owner | Owner contact email (tag: owner) | string |
n/a | yes |
| project | Project name (tag: project) | string |
n/a | yes |
| stack_name | Name of the stack (tag: stack-name) | string |
n/a | yes |
| team | Owning team (tag: team) | string |
n/a | yes |
| additional_tags | Additional tags to merge with the module's baseline tags.Baseline tags always take precedence. If a key here collideswith a baseline tag, the baseline value wins and this valueis silently dropped. | map(string) |
{} |
no |
| enable_map_tag | Enable the AWS Migration Accelerated Program (MAP) tag | bool |
false |
no |
Outputs
| Name | Description |
|---|---|
| application_name | Application name |
| environment | Deployment environment |
| stack_name | Stack name |
| tags | Tags map derived from baselines, AWS MAP configuration & additional tags |