Skip to content

Feat/rum#153

Merged
straubt1 merged 2 commits intostraubt1:mainfrom
benjamin-lykins:feat/rum
Sep 6, 2025
Merged

Feat/rum#153
straubt1 merged 2 commits intostraubt1:mainfrom
benjamin-lykins:feat/rum

Conversation

@benjamin-lykins
Copy link
Contributor

@benjamin-lykins benjamin-lykins commented May 12, 2025

Proposed Changes

  • Updates output to show the resource count when listing workspaces or running workspace show
  • Adds option to filter by project id on workspaces

Probably not the best examples since I don't have any resources under management 😄.

Uses https://pkg.go.dev/github.com/hashicorp/go-tfe@v1.70.0#Workspace with the ResouceCount attribute.

List Output

List workspaces (including project-id filter)

➜  tfx git:(feat/rum) ✗ ./tfx workspace list --project-id prj-cEhSny77d8aY4bcG
List Workspaces for Organization: default
Found 8 Workspaces
╭────────────────────────────────────┬─────────────────────┬────────────────┬─────────────────────┬────────┬────────────┬────────╮
│ NAME                               │ ID                  │ RESOURCE COUNT │ CURRENT RUN CREATED │ STATUS │ REPOSITORY │ LOCKED │
├────────────────────────────────────┼─────────────────────┼────────────────┼─────────────────────┼────────┼────────────┼────────┤
│ only-in-src                        │ ws-7uyDmvrRhTpqXVxn │              0 │                     │        │            │ false  │
│ demo                               │ ws-6SxYMRck5nXWEpx9 │              0 │                     │        │            │ false  │
│ empty-but-remotestatewsenabled     │ ws-JPUauDmshgD4SjxJ │              0 │                     │        │            │ false  │
│ empty-but-remotestateenabledglobal │ ws-21wZujAA9aD8HVdi │              0 │                     │        │            │ false  │
│ test-tfm-prereq-0-2                │ ws-NHvZmmtk9QVgrZvC │              0 │                     │        │            │ false  │
│ test-tfm-prereq-0-0                │ ws-VRRKfAuwNuhMiVkC │              0 │                     │        │            │ false  │
│ test-tfm-prereq-0-3                │ ws-EiBXJQmCxLDT31Pr │              0 │                     │        │            │ false  │
│ test-tfm-prereq-0-1                │ ws-bsGnrMrEgPzGKCvV │              0 │                     │        │            │ false  │
╰────────────────────────────────────┴─────────────────────┴────────────────┴─────────────────────┴────────┴────────────┴────────╯

Workspace Show

➜  tfx git:(feat/rum) ./tfx workspace show --name test-tfm-prereq-0-2       
Show Workspace: test-tfm-prereq-0-2
ID:                   ws-NHvZmmtk9QVgrZvC
Resource Count:       0
Terraform Version:    1.10.5
Execution Mode:       remote
Auto Apply:           false
Working Directory:    
Locked:               false
Global State Sharing: true
Current Run:          none

@benjamin-lykins benjamin-lykins requested a review from straubt1 as a code owner May 12, 2025 23:50
Copy link
Owner

@straubt1 straubt1 left a comment

Choose a reason for hiding this comment

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

LGTM

@straubt1 straubt1 closed this Sep 6, 2025
@straubt1 straubt1 reopened this Sep 6, 2025
@straubt1 straubt1 merged commit 7b16e86 into straubt1:main Sep 6, 2025
1 of 2 checks passed
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.

2 participants