Skip to content

[Bug] infra-shell.sh doesn't pass BWS secrets to container environment #145

@noahwhite

Description

@noahwhite

Bug Summary

The docker/scripts/infra-shell.sh script fetches secrets from Bitwarden Secrets Manager but doesn't pass TF_VAR_admin_ip as an environment variable into the Docker container. This prevents running tofu.sh commands locally.


🐛 Observed Behavior

  • Script outputs "Successfully retrieved secrets from Bitwarden Secrets Manager"
  • Script shows "Restricting SSH to your IP: 173.48.235.97/32" (proving it knows the value)
  • Inside container, $TF_VAR_admin_ip is not set
  • Running tofu plan prompts for var.admin_ip

✅ Expected Behavior

  • TF_VAR_admin_ip should be passed to the container
  • tofu.sh commands should work without manual variable entry

📝 Acceptance Criteria

  • TF_VAR_admin_ip is passed into the container
  • ./opentofu/scripts/tofu.sh dev plan works without prompts inside the container

🔧 Fix

Added -e TF_VAR_admin_ip to the docker run command in infra-shell.sh.

PR: #160

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions