# Naming conventions

When you set up your infrastructure, the templates generate files. These files follow the naming rules below.

<!-- "underscore" is the name of the `_` character these filenames begin with, not jargon. -->
<!-- vale NeedsRewrite.CorporateJargon = NO -->

- Files managed by templates always start with an underscore. The number of underscores depends on the layer. All template files also include `gp`.
- `gp` stands for Golden Path.

<!-- vale NeedsRewrite.CorporateJargon = YES -->

## Configuration layer

<!-- "underscores" is the name of the `_` characters this prefix uses, not jargon. -->
<!-- vale NeedsRewrite.CorporateJargon = NO -->

- Prefix: Two underscores followed by `gp` (`__gp`)
- Example: `__gp_config.tf`

<!-- vale NeedsRewrite.CorporateJargon = YES -->

The `app` template generates these:

<!-- Refresh this list with:
     gh api repos/oslokommune/golden-path-boilerplate/contents/boilerplate/terraform/app \
       --jq '.[].name | select(startswith("__gp"))' -->

<div class="file-tree" markdown>

- `__gp_config.tf`
- `__gp_config_app_image.auto.tfvars.json`
- `__gp_dependencies.tf`
- `__gp_variables.tf`

</div>

## Resource and module layer

- Prefix: Single underscore followed by `gp` (`_gp`)
- Example: `_gp_iam.tf`

The same template generates these alongside them:

<!-- Refresh this list with:
     gh api repos/oslokommune/golden-path-boilerplate/contents/boilerplate/terraform/app \
       --jq '.[].name | select(startswith("_gp"))' -->

<div class="file-tree" markdown>

- `_gp_alb_tg_host_routing_apex_domain.tf`
- `_gp_alb_tg_host_routing_subdomain.tf`
- `_gp_deployment.tf`
- `_gp_ecs_container_definition_main.tf`
- `_gp_ecs_otel_collector_sidecar.tf`
- `_gp_ecs_service.tf`
- `_gp_iam_cd_assumable_role.tf`
- `_gp_iam_cicd_policies.tf`
- `_gp_iam_cicd_roles.tf`
- `_gp_security_groups.tf`
- `_gp_telemetry_collection.tf`

</div>

## Adding your own files

You can create two types of files in addition to the files you get from the Golden Path templates

- Override files that override Golden Path files. [Terraform overrides (guide)](overrides.md) are used when you need to change behavior from the Golden Path templates. The guide explains how to name these files.
- Normal Terraform files, that you create yourself. Typically to create features that Golden Path does not support yet. You do not need to use a prefix when creating these files.
