2276: Cas-Ciip Remove dependency on Terraform Cloud and cas-shelf #2277
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue - Project link
Adds Terraform scripts and Helm charts to run them. Resource states migrated from Terraform Cloud to a Google Cloud Storage bucket.
Changes 🚧
Added Terraform module, imported from cas-shelf
Added Helm templates to handle:
Terraform module loading to configMaps
OpenShift service account for use by Terraform
Terraform apply job
To test 🔬
The Helm charts are built into the automation around deploys via ShipIt. Once a deploy has been run, you can check the job Terraform-apply in OpenShift to see if the run was successful.
Notes📝
🔒 Terraform Cloud state has been locked to enable migration of state to state buckets
The script has been run and resources have been transitioned from Terraform Cloud to GCP buckets holding state for each namespace (ciip-dev, ciip-test, ciip-prod).
Resources have been migrated rather than recreated, only the state "owning" the resource changes.
The resources kubernetes_secret.secret_sa have had Terraform changes, but only the addition of a default value (consistent with our use of them) due to a new provider version.
The script used for migration (/chart/cas-ciip-portal/terraform/tf-migration.sh) is kept here for history. It will be removed by bcgov/cas-pipeline#83