Skip to content

Capital case in workspaces-map source workspaces results in error #276

@Josh-Tracy

Description

@Josh-Tracy

Describe the bug
Defining a workspaces-map with capital lettering casing in the source workspaces results in the tfm copy workspaces command erroring and not reading the destination workspace to be created.

The Error

Using config file: /Users/joshuatracy/.tfm.hcl
Using map  workspaces-map
Found 2 mappings in the map.
Source Workspaces found in `workspaces-map`: [Tfc-Mig-vcs-0 tfc-mig-vcs-1]
Getting list of Workspaces from:  app.terraform.io
Getting list of workspaces from:  app.terraform.io
Source Workspace: tfc-mig-vcs-0 
Destination Workspace: 
Could not create Workspace.

 Error: name is required
2025/01/30 11:47:14 name is required

My TFM Config

"workspaces-map" = [
   "Tfc-Mig-vcs-0=new-ws-3",
   "tfc-mig-vcs-1=new-ws-4"
    ]

To Reproduce

Create a workspaces-map configuration with a source workspace that exists containing capital letter casing and attempt to run tfm copy workspaces

Expected behavior

TFM should inform the destination workspaces to be created and then attempt to create it in the destination.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions