Skip to content

Proposal: --secret-prefix and key transformation support for infisical run #113

@SujithThirumalaisamy

Description

@SujithThirumalaisamy

Just wanted to start a discussion around improving infisical run for Terraform workflows

Terraform expects variables to be passed as env vars with the TF_VAR_ prefix and snake_case lowercase keys(common pattern).
Mostly to store secrets we use UPPER_SNAKE_CASE which leads to

  • Renaming secrets just for Terraform
  • Wrapper scripts to transform env vars
  • Extra workarounds for similar workflows
  1. Opt-in --secret-prefix flag
    infisical run --secret-prefix=TF_VAR_ terraform apply
    
  2. Optional key transformation
    Add a transformation flag to handle naming conventions:
    --transform-secret-key=lowercase|snakecase|kebabcase
    
    DB_PASSWORD → TF_VAR_db_password

Why this helps?

  • Seamless Terraform usage or other usecases
  • No secret renaming
  • No wrapper scripts

Aligns with common IaC + secret management patterns

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions