Refactor: optionally randomize resource names #73
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a
randomize_resource_names
variable that allows random resource names to be generated.This is less critical than its GCP counterpart due to the fact that AWS already generates random IDs, but for organizing resources it is still valuable to set resource names.
Due to a bug in the AWS provider running
terraform apply
twice would be needed to set the calculated tags. To circumvent this, thedefault_tags
block in the provider config setsnull
for these tags:Test plan
Tested on scaletesting instance.
The following plan is produced when planning these changes on an existing deployment using v4.5.0 of the module with
randomize_resource_names = false
. There are some tags that are added because they have defaults added now, but those don't have functional impacts. Thename
tag foraws_autoscaling_group.autoscaler
is updated fromsourcegraph_executor
tosourcegraph_executors
to align with other naming conventions.