Skip to content

fix: add secret survey variable on opentofu task issue #2322 #3083

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

bdoubrovine
Copy link

@bdoubrovine bdoubrovine commented Jun 7, 2025

This pull request introduces enhancements to the getEnvironmentExtraVars method in services/tasks/LocalJob.go to improve the handling of secret variables. The most important change involves merging secret variables into the existing environment variables while ensuring the secret is reset after processing.

Enhancements to secret variable handling:

  • Added a new map, extraSecretVars, to handle secret variables separately and parse them from the t.Secret JSON string. If parsing fails, the method returns an error.
  • Reset the t.Secret field to an empty JSON object ("{}") after processing to ensure that secrets are not retained in memory.
  • Merged the parsed extraSecretVars into the extraVars map using maps.Copy, consolidating all variables into a single map for further use.

#2322 and #2287

@bdoubrovine bdoubrovine changed the title fix: add secret survey variable on opentofu task issue #2554 fix: add secret survey variable on opentofu task issue #2322 Jun 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant