Skip to content
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

INFRA-35342: Fix handling of workspaceNameOverride when migrate mode set #336

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions charts/terraform-cloud/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v1.8.2] - 2024-06-17
### Fixed
- Fix handling of `workspaceNameOverride` when `operatorVersion: "migrate"` used

## [v1.8.1] - 2024-06-10
### Fixed
- Fix handling of `workspaceNameOverride` - was being unset prior to rendering of Module
Expand Down
2 changes: 1 addition & 1 deletion charts/terraform-cloud/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.8.1
version: 1.8.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
2 changes: 1 addition & 1 deletion charts/terraform-cloud/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# terraform-cloud

![Version: 1.8.1](https://img.shields.io/badge/Version-1.8.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.0.0](https://img.shields.io/badge/AppVersion-2.0.0-informational?style=flat-square)
![Version: 1.8.2](https://img.shields.io/badge/Version-1.8.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.0.0](https://img.shields.io/badge/AppVersion-2.0.0-informational?style=flat-square)

A Helm chart for provisioning resources using Terraform Cloud

Expand Down
20 changes: 10 additions & 10 deletions charts/terraform-cloud/templates/helpers/_workspace-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ spec:
{{ include "mintel_common.terraform_cloud.irsaRunTriggers" $| indent 4 }}
{{- end }}
variables:
{{- $_ := unset $instanceCfg "workspaceNameOverride" }}
{{- $_ := unset $instanceCfg "workspaceAllowDestroy" }}
{{- $_ := unset $instanceCfg "workspaceOwner" }}
{{- $_ := unset $instanceCfg "workspaceTags" }}
{{- $_ := unset $instanceCfg "outputSecretMap" }}
{{- $_ := unset $instanceCfg "syncWave" }}
{{- $_ := unset $instanceCfg "workspaceAllowDestroyPlan" }}
{{- $_ := unset $instanceCfg "workspaceApplyMethod" }}
{{- $_ := unset $instanceCfg "moduleDestroyOnDeletion" }}
{{- range $varKey, $varVal := $instanceCfg }}
{{- $instanceCfgCopyV1 := omit $instanceCfg "workspaceNameOverride" }}
{{- $instanceCfgCopyV1 = omit $instanceCfgCopyV1 "workspaceAllowDestroy" }}
{{- $instanceCfgCopyV1 = omit $instanceCfgCopyV1 "workspaceOwner" }}
{{- $instanceCfgCopyV1 = omit $instanceCfgCopyV1 "workspaceTags" }}
{{- $instanceCfgCopyV1 = omit $instanceCfgCopyV1 "outputSecretMap" }}
{{- $instanceCfgCopyV1 = omit $instanceCfgCopyV1 "syncWave" }}
{{- $instanceCfgCopyV1 = omit $instanceCfgCopyV1 "workspaceAllowDestroyPlan" }}
{{- $instanceCfgCopyV1 = omit $instanceCfgCopyV1 "workspaceApplyMethod" }}
{{- $instanceCfgCopyV1 = omit $instanceCfgCopyV1 "moduleDestroyOnDeletion" }}
{{- range $varKey, $varVal := $instanceCfgCopyV1 }}
{{- if kindIs "map" $varVal }}
{{- include "mintel_common.terraform_cloud.tfVar" (merge (dict "key" $varKey) $varVal) | indent 2 }}
{{- else }}
Expand Down
Loading