Terraform Version
Terraform Configuration Files
Was missing the workspaces{} field.
terraform {
cloud {
organization = "lykins"
}
}
Debug Output
Not necessary
Expected Behavior
In this error message, tags and name should be bold in the output. Apologies for the formatting in this section since I couldn't use a code block to format.
│ Error: Invalid workspaces configuration
│
│ on terraform.tf line 2, in terraform:
│ 2: cloud {
│
│ Missing workspace mapping strategy. Either workspace "tags" or "name" is required.
│
│ The 'workspaces' block configures how Terraform CLI maps its workspaces for this single
│ configuration to workspaces within an HCP Terraform or Terraform Enterprise organization. Two strategies are available:
│
│ tags- A set of tags used to select remote HCP Terraform or Terraform Enterprise workspaces to be used for this single
│ configuration. New workspaces will automatically be tagged with these tag values. Generally, this
│ is the primary and recommended strategy to use. This option conflicts with "name".
│
│ name - The name of a single HCP Terraform or Terraform Enterprise workspace to be used with this configuration.
│ When configured, only the specified workspace can be used. This option conflicts with "tags"
│ and with the TF_WORKSPACE environment variable.
Actual Behavior
Instead, it is outputting like this: [bold]attribute[reset]
│ Error: Invalid workspaces configuration
│
│ on terraform.tf line 2, in terraform:
│ 2: cloud {
│
│ Missing workspace mapping strategy. Either workspace "tags" or "name" is required.
│
│ The 'workspaces' block configures how Terraform CLI maps its workspaces for this single
│ configuration to workspaces within an HCP Terraform or Terraform Enterprise organization. Two strategies are available:
│
│ [bold]tags[reset] - A set of tags used to select remote HCP Terraform or Terraform Enterprise workspaces to be used for this single
│ configuration. New workspaces will automatically be tagged with these tag values. Generally, this
│ is the primary and recommended strategy to use. This option conflicts with "name".
│
│ [bold]name[reset] - The name of a single HCP Terraform or Terraform Enterprise workspace to be used with this configuration.
│ When configured, only the specified workspace can be used. This option conflicts with "tags"
│ and with the TF_WORKSPACE environment variable.
Steps to Reproduce
- terraform init
Additional Context
No response
References
None that i could find existing
Generative AI / LLM assisted development?
None
Terraform Version
Terraform Configuration Files
Was missing the workspaces{} field.
Debug Output
Not necessary
Expected Behavior
In this error message, tags and name should be bold in the output. Apologies for the formatting in this section since I couldn't use a code block to format.
│ Error: Invalid workspaces configuration
│
│ on terraform.tf line 2, in terraform:
│ 2: cloud {
│
│ Missing workspace mapping strategy. Either workspace "tags" or "name" is required.
│
│ The 'workspaces' block configures how Terraform CLI maps its workspaces for this single
│ configuration to workspaces within an HCP Terraform or Terraform Enterprise organization. Two strategies are available:
│
│ tags- A set of tags used to select remote HCP Terraform or Terraform Enterprise workspaces to be used for this single
│ configuration. New workspaces will automatically be tagged with these tag values. Generally, this
│ is the primary and recommended strategy to use. This option conflicts with "name".
│
│ name - The name of a single HCP Terraform or Terraform Enterprise workspace to be used with this configuration.
│ When configured, only the specified workspace can be used. This option conflicts with "tags"
│ and with the TF_WORKSPACE environment variable.
Actual Behavior
Instead, it is outputting like this: [bold]attribute[reset]
Steps to Reproduce
Additional Context
No response
References
None that i could find existing
Generative AI / LLM assisted development?
None