terraform/internal/cloud/e2e
Nick Fagerlund 02e62c9851
Cloud: Init without erroring when no workspaces match the `tags` (#29835)
Previously, `terraform init` was throwing an error if you configured the cloud
block with `tags` and there weren't any tagged workspaces yet. Confusing and
alienating, since that that's a fairly normal situation! Basically TFC was
handling an empty list of workspaces worse than other backends, because it
doesn't support an unnamed default workspace.

This commit catches that condition during `Meta.selectBackend()` and asks the
user to pick a name for their first tagged workspace. If they cancel out, we
still error, but if we know what name they want, we can handle it the same way
as a nonexistent workspace specified in `name` -- just pass it to
`Meta.SetWorkspace()`, and let the workspace get implicitly created when
`InitCommand.Run()` eventually calls `StateMgr()`.
2021-11-01 10:20:15 -07:00
..
apply_auto_approve_test.go cloud: Skip E2E tests without an exact version 2021-10-28 19:29:20 -05:00
backend_apply_before_init_test.go cloud/e2e: Misc test fixes 2021-10-28 19:29:20 -05:00
helper_test.go cloud: Skip E2E tests without an exact version 2021-10-28 19:29:20 -05:00
init_with_empty_tags_test.go Cloud: Init without erroring when no workspaces match the `tags` (#29835) 2021-11-01 10:20:15 -07:00
main_test.go cloud: Skip E2E tests without an exact version 2021-10-28 19:29:20 -05:00
migrate_state_multi_to_tfc_test.go Adjust default workspace naming prompt 2021-10-28 19:29:21 -05:00
migrate_state_remote_backend_to_tfc_test.go Adjust default workspace naming prompt 2021-10-28 19:29:21 -05:00
migrate_state_single_to_tfc_test.go Adjust default workspace naming prompt 2021-10-28 19:29:21 -05:00
migrate_state_tfc_to_other_test.go Cloud UX test fixes 2021-10-28 19:29:15 -05:00
migrate_state_tfc_to_tfc_test.go Adjust default workspace naming prompt 2021-10-28 19:29:21 -05:00
run_variables_test.go cloud: Skip E2E tests without an exact version 2021-10-28 19:29:20 -05:00