GoogleCloudPlatform / terraform-google-cloud-run

Deploys apps to Cloud Run, along with option to map custom domain
https://registry.terraform.io/modules/GoogleCloudPlatform/cloud-run/google
Apache License 2.0
130 stars 82 forks source link

Env vars as a map #197

Open bharathkkb opened 2 months ago

bharathkkb commented 2 months ago

Support providing env vars as map(string) of k/v rather than list of objects. @prabhu34 any concerns with this for a future breaking change?

prabhu34 commented 2 months ago

Hi @bharathkkb,

Environment variable can be of any type as in the below screenshot. Here map(string) or list(objects) cannot be the right types, as the values can be string, list or map.

If we are restricting to only string then it is good to go and use map(string) instead of list(objects). It wont break the existing application as the key name is considered as the indexed.

To include other types, I tried using any type of variable, but I am skeptical about the encoding being done for string env variable as well.

Screenshot Env Variables

bharathkkb commented 2 months ago

Thanks @prabhu34, where is the screenshot from? IIUC the provider restricts us to only string type? https://github.com/hashicorp/terraform-provider-google/blob/c3f2efe0b182293c781e8630e46bc86fa6433112/google/services/cloudrun/resource_cloud_run_service.go#L1132

github-actions[bot] commented 1 day ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days