jackall3n / terraform-provider-render

A terraform provider for render.com
https://registry.terraform.io/providers/jackall3n/render
Mozilla Public License 2.0
22 stars 9 forks source link

Could not update service variables illegal base64 data #11

Open hectorj-thetreep opened 6 months ago

hectorj-thetreep commented 6 months ago

Hi!

I am having some trouble with render_service_environment

Could not update service variables illegal base64 data at input byte 8, unexpected error: illegal base64 data at input byte 8

I'm not sure what causes this

hectorj-thetreep commented 6 months ago

OK, the problem is in https://github.com/jackall3n/render-go/blob/8ec34eec6f494dd7abc09b1ee58117b829321d48/render.go#L7376

some cursor fails to unmarshal in []byte

it works if I switch it to string

hectorj-thetreep commented 6 months ago

It happens when the cursor contains an underscore.

dmiric commented 4 months ago

It happens when the cursor contains an underscore.

Can you please explain this a bit more? I have the same problem I don't understand where is underscore a problem? Can you just paste your working code or something? Thanks

hectorj-thetreep commented 4 months ago

Cursors are generated (randomly?) by Render, we do not control them.

Sometimes they contain an underscore and it makes this library fail.

My fix for the client library is here https://github.com/jackall3n/render-go/pull/5

But then you need to recompile the terraform provider with it.

dmiric commented 4 months ago

I'm quite new to teraform community. Is that pr going to be applied soon or could you point me in the right direction how I should update that package on my end?

On Fri, 19 Jul 2024, 10:47 Hector Jusforgues, @.***> wrote:

Cursors are generated (randomly?) by Render, we do not control them.

Sometimes they contain an underscore and it makes this library fail.

My fix for the client library is here jackall3n/render-go#5 https://github.com/jackall3n/render-go/pull/5

But then you need to recompile the terraform provider with it.

— Reply to this email directly, view it on GitHub https://github.com/jackall3n/terraform-provider-render/issues/11#issuecomment-2238683676, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIS56F73JRO2DSNS7GIGELZNDHDNAVCNFSM6AAAAABIWAGVKWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZYGY4DGNRXGY . You are receiving this because you commented.Message ID: @.***>

hectorj-thetreep commented 4 months ago

Last commit on this repo was 4 months ago, I don't think the fix will be applied soon (I'm not blaming anyone, I totally understand and I am not willing to maintain a fork myself so I really can't complain).

dmiric commented 4 months ago

There is no official render plugin? I thought such a service has to have an official implementation for teraform. Am I missing something?

hectorj-thetreep commented 4 months ago

Oh, they just published one in early-access : https://feedback.render.com/features/p/create-a-terraform-provider-for-renders-iac

https://registry.terraform.io/providers/render-oss/render/latest

I haven't tried it though, I just discovered it ^^

dmiric commented 4 months ago

I also just found it. It didn't even occur to me there was another one. Thanks for your help.

On Fri, 19 Jul 2024, 15:17 Hector Jusforgues, @.***> wrote:

Oh, they just published one in early-access : https://feedback.render.com/features/p/create-a-terraform-provider-for-renders-iac

https://registry.terraform.io/providers/render-oss/render/latest

I haven't tried it though, I just discovered it ^^

— Reply to this email directly, view it on GitHub https://github.com/jackall3n/terraform-provider-render/issues/11#issuecomment-2239142539, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIS56FNS2NTMYAX7CX3RG3ZNEGVDAVCNFSM6AAAAABIWAGVKWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZZGE2DENJTHE . You are receiving this because you commented.Message ID: @.***>