Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TFC workspace tags have outdated validation #934

Open
mkam opened this issue Jun 6, 2022 · 0 comments
Open

TFC workspace tags have outdated validation #934

mkam opened this issue Jun 6, 2022 · 0 comments
Labels
bug Something isn't working enterprise Feature will be delivered as a part of Enterprise binary

Comments

@mkam
Copy link
Contributor

mkam commented Jun 6, 2022

Describe the bug

CTS does not support creating Terraform Cloud workspace tags with hyphens or underscores. This is because when the tag feature was implemented, only letters, numbers, or colons were allowed. This restriction has since been changed in v202202-1.

CTS checks the tag syntax as part of validating the configuration so that it fails faster and provides feedback to the users sooner than at workspace creation. Since it has an outdated regex for checking the tag syntax, it won't allow tags that are now considered valid by TFC.

Versions

Consul-Terraform-Sync
CTS v0.4.2+ent and later.

Terraform Version
Terraform Cloud; Terraform Enterprise running TFE v202202-1 or later.

Configuration File(s)

driver "terraform-cloud" {
  workspaces {
    tags = ["cts-test", "cts_test"]
  }
}

Expected Behavior

CTS allows tags with hyphens and underscores to be created and added to the workspace.

Actual Behavior

CTS errors if tags with hyphens or underscores are configured.

2022-06-06T10:59:36.108-0500 [ERROR] cli: error validating configuration: error="workspace tag in 'tags' can only have letters, numbers, or colon: cts-test"

Additional Context

We need to at least update the tag validation to accept hyphens and underscores, but we should also consider removing this check altogether, as we may run into this same issue in the future if TFC tag restrictions change again.

@mkam mkam added bug Something isn't working enterprise Feature will be delivered as a part of Enterprise binary labels Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enterprise Feature will be delivered as a part of Enterprise binary
Projects
None yet
Development

No branches or pull requests

1 participant