-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terraform 1.3.7 removes experimental optional() variable - breaking tf apply on shell container but not cloud build container running 1.0.10 - without preset optional values for "Error: Optional object type attributes are experimental" - cloudbuild dockerfile move to 1.5.2 and remove experimental code #224
Comments
Triage older system for tf version
|
Fix is only required for bootstrap (which runs outside the CB container directly on the gcloud shell (which runs 1.3.7), for all other common/non-prod/prod we can continue to use terraform 1.0.10 and experimental optional attributes |
#224 - workaround TF 1.3.7 from 1.0.10
Reran clean install - the TF check on 1.3.7 needs all experiments sections commented to initially run in the shell Changes not staged for commit: Untracked files: |
Plan: 98 to add, 0 to change, 0 to destroy. Changes to Outputs:
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Saved the plan to: launchpad.2023-01-31.1501.plan To perform exactly these actions, run the following command to apply: |
delete existing org level services like
|
add IAM role get ID from asset inventory under identity.AccessPolicy
enable role, delete vpc sc
|
prod - need to rename project - as deleted 30 day project still up after billing quota error earlier
prod ok |
20240406: Closing issue during retrofit/rebase of this TEF V1 based/modified repo to TEF V4 standards |
20231014: see 1.0 specific issue that needs a 1.5 upgrade as a first step
hashicorp/terraform-provider-google#16217
and
#264
We will need to look at upgrading from 1.0 to 1.5.7 or the new 1.6.0 https://releases.hashicorp.com/terraform/1.6.0/ as a first step in the https://github.com/GoogleCloudPlatform/pbmm-on-gcp-onboarding codebase
20230724: Some private forks of this repo are working around the 1.3.7 issue by downgrading the client.
While this is an ok fix and allows the initial bootstrap.sh to proceed - it does not fix the underlying issue that the code is only 1.0.10 compliant.
The full fix is to upgrade the tf files to terraform 1.5.x
This is in progress.
As part of working out perimeter/peering work in #220
Reproduction:
run any of the bootstrap, common, nprod, prod builds and you will fail on a currently built TF container.
An older one from July 2022 will still work
Getting last working terraform version - currently default to 1.0.10 in https://github.com/GoogleCloudPlatform/pbmm-on-gcp-onboarding/blob/main/modules/cloudbuild/cloudbuild_builder/Dockerfile#L20
see
Fix hashicorp/terraform#31692 and hashicorp/terraform#31355 first
In prep of the Terraform 1.4.0 release - on 5 Jan 2023 TF 1.3.7 introduced the breaking change on experimental use of optional(). This only breaks our bootstrap step in the PBMM LZ V1 LZ and the GR. The fix is to remove the experimental declaration for bootstrap so we can run in gcloud/shell again. For the gitops cloud build jobs - I'll keep these hardcoded to TF 1.0.10 for now until I refactor the defaults - so CB jobs are unaffected.
Fix is only required for bootstrap (which runs outside the CB container directly on the gcloud shell (which runs 1.3.7), for all other common/non-prod/prod we can continue to use terraform 1.0.10 and experimental optional attributes
Fix terraform version in the GitOps docker container
ARG TERRAFORM_VERSION=1.0.10
https://github.com/GoogleCloudPlatform/pbmm-on-gcp-onboarding/blob/main/modules/cloudbuild/cloudbuild_builder/Dockerfile#L20
all terraform.tf
on new install to terraform.landing.systems
on existing install on cloudnuage.dev (last update was Nov 2023
The text was updated successfully, but these errors were encountered: