From 030211751f5d714646d357b3e2b6a5838ddd9047 Mon Sep 17 00:00:00 2001 From: Matthew Casperson Date: Tue, 23 Jul 2024 07:41:06 +1000 Subject: [PATCH] Linked all library variable sets --- .github/workflows/go.yml | 15 --------------- .../steps/modules/space_management/terraform.tf | 7 ++++++- internal/steps/spread_variables.go | 2 +- 3 files changed, 7 insertions(+), 17 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 7408fff..421baf6 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -249,21 +249,6 @@ jobs: GOOS: linux GOARCH: amd64 CGO_ENABLED: 1 -# - run: go build -ldflags="-X 'main.Version=${{ steps.determine_version.outputs.semVer }}'" -o octoterrawiza_windows_amd64.exe octoterrawiz.go -# env: -# GOOS: windows -# GOARCH: amd64 -# CGO_ENABLED: 1 -# - run: go build -ldflags="-X 'main.Version=${{ steps.determine_version.outputs.semVer }}'" -o octoterrawiz_macos_amd64 octoterrawiz.go -# env: -# GOOS: darwin -# GOARCH: amd64 -# CGO_ENABLED: 1 -# - run: go build -ldflags="-X 'main.Version=${{ steps.determine_version.outputs.semVer }}'" -o octoterrawiz_macos_arm64 octoterrawiz.go -# env: -# GOOS: darwin -# GOARCH: arm64 -# CGO_ENABLED: 1 - name: Upload Release Assets uses: softprops/action-gh-release@v1 continue-on-error: true diff --git a/internal/steps/modules/space_management/terraform.tf b/internal/steps/modules/space_management/terraform.tf index 3bfd66e..646f24c 100644 --- a/internal/steps/modules/space_management/terraform.tf +++ b/internal/steps/modules/space_management/terraform.tf @@ -207,6 +207,10 @@ resource "octopusdeploy_docker_container_registry" "feed_docker" { package_acquisition_location_options = ["ExecutionTarget", "NotAcquired"] } +data "octopusdeploy_library_variable_sets" "all_variable_sets" { + skip = 0 + take = 10000 +} resource "octopusdeploy_project" "space_management_project" { auto_create_release = false @@ -221,7 +225,8 @@ resource "octopusdeploy_project" "space_management_project" { name = "Octoterra Space Management" project_group_id = octopusdeploy_project_group.octoterra.id tenanted_deployment_participation = "Untenanted" - included_library_variable_sets = [length(data.octopusdeploy_library_variable_sets.octoterra.library_variable_sets) == 0 ? octopusdeploy_library_variable_set.octopus_library_variable_set[0].id : data.octopusdeploy_library_variable_sets.octoterra.library_variable_sets[0].id] + included_library_variable_sets = concat(data.octopusdeploy_library_variable_sets.all_variable_sets.library_variable_sets[*].id, [length(data.octopusdeploy_library_variable_sets.octoterra.library_variable_sets) == 0 ? octopusdeploy_library_variable_set.octopus_library_variable_set[0].id : data.octopusdeploy_library_variable_sets.octoterra.library_variable_sets[0].id]) + versioning_strategy { template = "#{Octopus.Version.LastMajor}.#{Octopus.Version.LastMinor}.#{Octopus.Version.LastPatch}.#{Octopus.Version.NextRevision}" } diff --git a/internal/steps/spread_variables.go b/internal/steps/spread_variables.go index 3cbb0f1..9cb327f 100644 --- a/internal/steps/spread_variables.go +++ b/internal/steps/spread_variables.go @@ -38,7 +38,7 @@ func (s SpreadVariablesStep) GetContainer(parent fyne.Window) *fyne.Container { intro3.Wrapping = fyne.TextWrapWord intro4 := widget.NewLabel(strutil.TrimMultilineWhitespace(`Modifying variables in this way means steps can continue to refer to the original sensitive variable name, so no changes are required to the deployment process. However, removing the scopes from the sensitive variables does have security implications. In particular, all sensitive variables are exposed to all deployments and runbook runs.`)) intro4.Wrapping = fyne.TextWrapWord - s.confirmChanges = widget.NewCheck("I understand the security risks associated with spreading sensitive variables", func(value bool) { + s.confirmChanges = widget.NewCheck("I understand and accept the security risks associated with spreading sensitive variables", func(value bool) { if value { s.spreadVariables.Enable() } else {