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 · 0 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
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

1 participant