Skip to content

Commit

Permalink
Merge pull request #2 from RaftechNL/adds-name-override
Browse files Browse the repository at this point in the history
adds: service name override
  • Loading branch information
RafPe authored Aug 30, 2024
2 parents 1825f4e + ca64827 commit 1568515
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Repository containing code for terraform-aws-proxy
| <a name="input_create_instance_profile"></a> [create\_instance\_profile](#input\_create\_instance\_profile) | Controls if the instance profile is created or not | `bool` | `true` | no |
| <a name="input_create_role"></a> [create\_role](#input\_create\_role) | Controls if the role is created or not | `bool` | `true` | no |
| <a name="input_environment"></a> [environment](#input\_environment) | Name of the environment (i.e.: prd, acc, dev, test) | `string` | n/a | yes |
| <a name="input_full_service_name"></a> [full\_service\_name](#input\_full\_service\_name) | Full service name | `string` | `""` | no |
| <a name="input_instance_type"></a> [instance\_type](#input\_instance\_type) | The type of instance to start | `string` | `"t3.micro"` | no |
| <a name="input_project"></a> [project](#input\_project) | Name of the project | `string` | n/a | yes |
| <a name="input_role_requires_mfa"></a> [role\_requires\_mfa](#input\_role\_requires\_mfa) | Controls if the role requires MFA or not | `bool` | `false` | no |
Expand Down
4 changes: 2 additions & 2 deletions locals.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
locals {
resource_prefix = "${var.project}-${var.environment}" # computed naming standard convention for all resources
resource_prefix = "${var.environment}-${var.project}"

full_service_name = "${local.resource_prefix}-${var.app_name}" # abc-prod-ssm-proxy
full_service_name = var.full_service_name != "" ? var.full_service_name : "${local.resource_prefix}-${var.app_name}"
tags_app_module = merge(
var.tags, # Tags coming from calling TF
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ variable "environment" {
error_message = "The environment needs to be in prod, acc, dev, test, preview."
}
}
variable "full_service_name" {
type = string
description = "Full service name"
default = ""
}

variable "tags" {
type = map(string)
Expand Down

0 comments on commit 1568515

Please sign in to comment.