How to clear S3 endpoint when moving from GCP bucket to AWS s3?

I’ve got a site with S3 buckets on GCP, so it has an endpoint set. That endpoint is in the sitesettings in the database somehow, so including DISCOURSE_S3_ENDPOINT: "" in the ENV does . . . nothing. Rather than clearing the value so that Discourse will substitute the “right” one, it insists on using the GCP endpoint with the AWS bucket keys and such.

I tried explicitly setting the endpoint to the AWS one, but the one that I guessed wasn’t quite right somehow, so it wouldn’t work (that was weeks ago so I can’t remember the particulars).

My idea now is to remove the ENV variables when I crank up the container, manually change over the settings to the new AWS ones, so THEN I can set the env variables as described here and build a new container. Is there something easier that I’m overlooking?

Is there some way to set a NULL environment variable, maybe?

@pfaffman the last time I had to reset them I changed the site settings, added the ENV variables and then rebuilt.

PS: is the current (incorrect one) set to

1 Like

That’s what I’m working on now. It’s further complicated because it’s a k8s deployment, so I have to jiggle the configmap, then redeploy, then change the settings, and on like that.

Yes, that’s the current endpoint. I found the AWS endpoint for the region once, but there are apparently a couple different permutations of it.

1 Like

A bit unrelated but when I have had issues with ENV variables being taken up (with CORS settings for example) I have had to do several rounds of different combinations to get the variables in.

Hopefully you get it sorted soon!

1 Like