Skip to content
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
8 changes: 4 additions & 4 deletions struct_module/contribs/configs/kubectl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ files:
default: "true"

variables:
- name: namespace
description: The name of the namespace to create.
type: string
default: default
- namespace:
description: The name of the namespace to create.
type: string
default: default
24 changes: 12 additions & 12 deletions struct_module/contribs/github/workflows/execute-tf-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ files:
gh-token: {{@ github_token @}}

variables:
- name: app_name
description: "The name of the app."
default: "environments-dev"
type: string
- name: app_path
description: "The working directory for the terraform workflow."
default: "environments/dev"
type: string
- name: github_token
description: "The GitHub token for authentication."
default: "${{ secrets.GITHUB_TOKEN }}"
type: string
- app_name:
description: "The name of the app."
default: "environments-dev"
type: string
- app_path:
description: "The working directory for the terraform workflow."
default: "environments/dev"
type: string
- github_token:
description: "The GitHub token for authentication."
default: "${{ secrets.GITHUB_TOKEN }}"
type: string
5 changes: 5 additions & 0 deletions struct_module/file_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,16 @@ def apply_template_variables(self, template_vars):
missing_vars = self.template_renderer.prompt_for_missing_vars(self.content, vars)
vars.update(missing_vars)

self.vars = vars
self.logger.debug(f"Final template variables: {self.vars}")

self.content = self.template_renderer.render_template(self.content, vars)

def create(self, base_path, dry_run=False, backup_path=None, file_strategy='overwrite'):
file_path = os.path.join(base_path, self.name)

file_path = self.template_renderer.render_template(file_path, self.vars)

if self.skip:
self.logger.info(f"skip is set to true. skipping creation.")
return
Expand Down
Loading