poanetwork/blockscout-terraform

[bin/infra provision] command Error with '"name" cannot be longer than 32 characters'

Closed this issue · 3 comments

I'm using a terraform.tfvars file as follow:

`region = "us-east-1"
bucket = "terraform-state"
dynamodb_table = "terraform-lock"
key_name = "terraform-key"
prefix = "xxxxx"
db_password = "xxxxxdb666"
db_instance_class = "db.m4.large"
db_storage = "100"
root_block_size = 60
pool_size = 30

chains = {
"mychain" = "https://rpc.testnet.xxxxx"
}
chain_trace_endpoint = {
"mychain" = "https://rpc.testnet.xxxxx"
}chain_ws_endpoint = {
"mychain" = "wss://rpc.testnet.xxxxx"
}
chain_jsonrpc_variant = {
"mychain" = "geth"
}
chain_logo = {
"mychain" = "https://..."
}
chain_coin = {
"mychain" = "XXX"
}
chain_network = {
"mychain" = "xxxxxxxx"
}
chain_subnetwork = {
"mychain" = "XXX xxxxxxxx"
}
chain_network_path = {
"mychain" = "/xxxxx/xxx"
}
chain_network_icon = {
"mychain" = "https://..."
}`

It successfully created S3 and DynamoDB resources but stuck at seemingly load balancer targets:

...
Initializing modules...

  • module.backend
  • module.stack

Initializing the backend...

Initializing provider plugins...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
Acquiring state lock. This may take a few moments...
Releasing state lock. This may take a few moments...

Warning: module.stack.aws_route53_zone.main: "vpc_id": [DEPRECATED] use 'vpc' attribute instead

Error: module.stack.aws_lb_target_group.explorer[0]: "name" cannot be longer than 32 characters
...

Your mychain is too long causing the aws load balancer name to be greater than 32 characters.

I usually stick to 5 characters.

@acravenho Thanks! Problem solved

Closed via #94.