News for hackers. Stuff that matters.
Re:Infrastructure Manager: Provision Google Cloud Resources ... by mkl95 on Sunday September 17, 2023 @05:23PM (#37549482)
Is there anything particularly painful about working with the Google Cloud Terraform provider? If there isn't, I would rather use OpenTF with that provider and manage state myself.
Re:Infrastructure Manager: Provision Google Cloud Resources ... by cassianoleal on Sunday September 17, 2023 @07:03PM (#37550219)
No, it's fine. It works about as well as any other Terraform provider out there.

Every tool I've seen that wraps Terraform in any way is just a solution looking for a problem.

Re:Infrastructure Manager: Provision Google Cloud Resources ... by abatilo on Sunday September 17, 2023 @07:07PM (#37550245)
In my experience, running a plan is much less likely to catch a bad value than the AWS provider.

Subjectively, the AWS provider will at least validate that fields have valid values during the plan step. The Google provider doesn't seem to validate actual values until apply, and then you get a failure

Re:Infrastructure Manager: Provision Google Cloud Resources ... by diarrhea on Sunday September 17, 2023 @07:50PM (#37550576)
I can’t help but feel… sad about this. I only recently picked up Terraform and am astounded that this is what goes as coding in the infrastructure world. I was coming from Ansible so there was only improvement to be had, but man did Terraform let me down so far.

It (well, the provider) doesn’t validate fields until apply. That’s just so… sad. How is that acceptable? It’s like a car without a steering wheel, and people just go along with it.

Re:Infrastructure Manager: Provision Google Cloud Resources ... by candiddevmike on Sunday September 17, 2023 @08:55PM (#37550973)
Do you know how hard/tedious/pointless it is to write client side evaluations for everything you do on the server? The documentation for the Google Cloud provider is shit though and absolutely should.be improved.
Re:Infrastructure Manager: Provision Google Cloud Resources ... by cachvico on Sunday September 17, 2023 @11:02PM (#37551733)
You do a dry run first
Re:Infrastructure Manager: Provision Google Cloud Resources ... by reacharavindh on Monday September 18, 2023 @02:53AM (#37553095)
How is a terraform plan different from a dry run? I always mentally mapped terraform plan == dry run to validate what changes will be made. Your comment throws a gauntlet into that understanding..
Re:Infrastructure Manager: Provision Google Cloud Resources ... by solatic on Monday September 18, 2023 @05:06AM (#37553898)
It's not really Terraform's fault. Terraform provides the capability to do all kinds of validations before running an apply, but it's up to the providers to implement the validations. If the provider doesn't implement the validation, then it's not there.

It gets hairier when you delve into the details. The provider is typically an official provider that wraps some company's API, so that company ought to have a good set of validations, since it's their own API, right? Wrong. The team that writes the Terraform provider is typically different from the team that creates API methods, and the API methods themselves don't typically expose "dry-run" style functionality, so there's little for the team writing the Terraform provider to check. Meanwhile, the business doesn't care - the Terraform provider checkbox is already checked and validations/dry-running isn't a feature that affects revenue.

Re:Infrastructure Manager: Provision Google Cloud Resources ... by dimgl on Monday September 18, 2023 @12:00AM (#37552080)
I just recently used it and found it significantly more verbose than the AWS provider. Which is unfortunate, because I've actually grown quite fond of GCP.