Skip to content

Conversation

@xaviermanachwebedia2
Copy link

The gcs_source variable is declared as string but needs to be converted to a list/set when passed to the uris attribute of google_memorystore_instance.

Without this fix, terraform plan fails with:
Error: Incorrect attribute value type - set of string required.

This change splits the comma-separated string into a list and trims whitespace around each URI.

The gcs_source variable is declared as string but needs to be converted
to a list/set when passed to the uris attribute of google_memorystore_instance.

Without this fix, terraform plan fails with:
Error: Incorrect attribute value type - set of string required.

This change splits the comma-separated string into a list and trims
whitespace around each URI.
@imrannayer
Copy link
Collaborator

/gcbrun

@imrannayer
Copy link
Collaborator

@xaviermanachwebedia2 can u also add in the description of gcs_source variable that multiple sources can be passed as comma separated values.

@xaviermanachwebedia2
Copy link
Author

xaviermanachwebedia2 commented Dec 5, 2025

It's not my idea to split it with "," . This it already in the description of the variable ;)

variable "gcs_source" {
  type        = string
  description = "GCS source for the instance. Format gs://bucket1/object1, gs://bucket2/folder2/object2"
  default     = null
}

@imrannayer
Copy link
Collaborator

/gcbrun

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