You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Replace environment variable by prefix (#1858)
We're looking at using this module to deploy multiple sets of runner types (x86_64 and arm architectures) but within the same conceptual "environment".
We use the "Environment" tag throughout our tooling, but the constraints of using the "environment" variable for resource naming mean that we need to essentially supply different environment names (eg "env-amd64" and "env-arm64"), even though they are not in different environments.
We also use the dot character (".") in our environment names, which isn't allowed in some resource names (eg SQS queue name).
This PR replaces the "environmet" variable by "prefix" to prefix resources crated by the module. The prefix is also used to set the tag: "ghr:environment" with the value of prefix for lambda's to orchestrate the instnaces.
You can still set the tag "environment" to all resources via the AWS provider.
Co-authored-by: Niek Palm <[email protected]>
Copy file name to clipboardExpand all lines: modules/runner-binaries-syncer/variables.tf
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,18 @@ variable "tags" {
12
12
variable"environment" {
13
13
description="A name that identifies the environment, used as prefix and for tagging."
14
14
type=string
15
+
default=null
16
+
17
+
validation {
18
+
condition=var.environment==null
19
+
error_message="The \"environment\" variable is no longer used. To migrate, set the \"prefix\" variable to the original value of \"environment\" and optionally, add \"Environment\" to the \"tags\" variable map with the same value."
20
+
}
21
+
}
22
+
23
+
variable"prefix" {
24
+
description="The prefix used for naming resources"
0 commit comments