Skip to content

Conversation

kandarpdave3
Copy link
Contributor

Instead of repeatedly mentioning global_parameter_path_prefix in secret_environment_variables values, we can pass it only once as a variable and concatenate it with the values of 'secret_environment_variables' in the current module.

Example,

secret_environment_variables = {
    DB_DATABASE_NAME = "${var.global_parameter_path_prefix}/rds/default/db_name"
    DB_USERNAME            = "${var.global_parameter_path_prefix}/rds/default/db_username"
}

In the above example, we have passed var.global_parameter_path_prefix repeatedly, but from now we need to pass the global_parameter_path_prefix as a variable only and it will be concatinated with all the values, as shown in the below example.

global_parameter_path_prefix = var.global_parameter_path_prefix

secret_environment_variables = {
    DB_DATABASE_NAME = "/rds/default/db_name"
    DB_USERNAME            = "/rds/default/db_username"
}

@kandarpdave3 kandarpdave3 force-pushed the feat/avoid-repeatedly-passing-global-prefix branch from 560c0a4 to 38e2c72 Compare July 18, 2024 10:38
@kandarpdave3 kandarpdave3 merged commit aa1e92f into main Jul 18, 2024
@kandarpdave3 kandarpdave3 deleted the feat/avoid-repeatedly-passing-global-prefix branch July 18, 2024 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants