Skip to content

Add Git credential volume mount to apply container#399

Open
Afsalmc wants to merge 6 commits into
kubevela:masterfrom
Afsalmc:patch-1
Open

Add Git credential volume mount to apply container#399
Afsalmc wants to merge 6 commits into
kubevela:masterfrom
Afsalmc:patch-1

Conversation

@Afsalmc

@Afsalmc Afsalmc commented Jun 5, 2026

Copy link
Copy Markdown

If the cloned Terraform module has remote references that need Git credentials, Git credential volume mount to apply container is necessary.


Summary by cubic

Mounts the Git credential volume and switches Terraform init to a dynamic command (getInitCommand) that starts an SSH agent and adds the mounted key when Git auth is required. This lets Terraform init pull modules from private Git remotes without failing.

  • Dependencies
    • Reverted openssh installation; image installs git only.

Written for commit 3d348df. Summary will update on new commits.

Review in cubic

If the cloned Terraform module has remote references that need Git credentials, Git credential volume mount to apply container is necessary.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

@Afsalmc

Afsalmc commented Jun 5, 2026

Copy link
Copy Markdown
Author

A cloned Terraform module can still have remote Terraform module references. They will fail if the remote modules are in a private repo without a mounted git-auth-configuration.

Afsalmc added 5 commits June 7, 2026 13:52
If the remote module is a private ssh git module, ssh is needed.
Refactor command for Terraform init to use a dynamic method that includes SSH agent setup if Git credentials are present.
Added import for 'fmt' package in init.go
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