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

Resource Name Exceeds 32-Character Limit in aws_codestarconnections_connection #508

Open
putsuka opened this issue Nov 17, 2024 · 4 comments
Labels
bug Something isn't working pending investigation Issue needs further investigation

Comments

@putsuka
Copy link

putsuka commented Nov 17, 2024

Terraform Version & Prov:

AFT Version:
1.13.2

Terraform Version & Provider Versions
terraform version

Terraform v1.4.0

Bug Description
In Release 1.13.2, the resource aws_codestarconnections_connection fails to be created due to the name exceeding the 32-character limit.

To Reproduce
Apply the following example configuration using the affected version:

module "aft" {
  source = "github.com/aws-ia/terraform-aws-control_tower_account_factory?ref=1.13.2"
  # Required Vars
  ct_management_account_id    = "111122223333"
  log_archive_account_id      = "444455556666"
  audit_account_id            = "123456789012"
  aft_management_account_id   = "777788889999"
  ct_home_region              = "us-east-1"
  tf_backend_secondary_region = "us-west-2"
  # VCS Vars
  vcs_provider                                  = "gitlabselfmanaged"
  gitlab_selfmanaged_url                        = "https://gitlab.example.com"
  account_request_repo_name                     = "ExampleProject/example-repo-1"
  global_customizations_repo_name               = "ExampleProject/example-repo-2"
  account_customizations_repo_name              = "ExampleProject/example-repo-3"
  account_provisioning_customizations_repo_name = "ExampleProject/example-repo-4"
}

Expected behavior
The resource should be created successfully when the name attribute adheres to the 32-character limit.

Related Logs

Error: creating CodeStar Connections Connection (ct-aft-gitlab-selfmanaged-connection): operation error CodeStar connections: CreateConnection, https response error StatusCode: 400, RequestID: ****, api error ValidationException: 1 validation error detected: Value 'ct-aft-gitlab-selfmanaged-connection' at 'connectionName' failed to satisfy constraint: Member must have length less than or equal to 32

Additional context
The name attribute should be updated to a value that is 32 characters or fewer. For example:

resource "aws_codestarconnections_connection" "gitlabselfmanaged" {
  count    = local.vcs.is_gitlab_selfmanaged ? 1 : 0
  name     = "ct-aft-gitlab-selfmanaged"
  host_arn = aws_codestarconnections_host.gitlabselfmanaged[0].arn
}
@putsuka putsuka added bug Something isn't working pending investigation Issue needs further investigation labels Nov 17, 2024
@shawnl-kb4
Copy link

+1

Same issue here. As stated above, the name must be < 32 characters. Reducing the length of the name will allow us to use gitlab self-managed with AFT. Any update as to when this can be addressed? Forced to fork it for now, as a workaround.

@matthewbarreiro
Copy link

Permalink to the line in question:

@sthristov
Copy link

Hello,

Any update on this? This is basically making it impossible to use the official module with self managed GitLab. We have to fork the repo and modify the connection name to be shorter than the 32 limit.

1 similar comment
@paulovianna1983
Copy link

Hello,

Any update on this? This is basically making it impossible to use the official module with self managed GitLab. We have to fork the repo and modify the connection name to be shorter than the 32 limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pending investigation Issue needs further investigation
Projects
None yet
Development

No branches or pull requests

5 participants