This repository was archived by the owner on Jul 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 415
This repository was archived by the owner on Jul 3, 2023. It is now read-only.
stack//web-service crash with big image string when name is not defined #123
Copy link
Copy link
Open
Description
When the image name is more than 32 characters we get the following error:
2017/04/25 10:40:18 [ERROR] root.accounts.elb: eval: *terraform.EvalValidateResource, err: Warnings: []. Errors: [only alphanumeric characters and hyphens allowed in "name": "554136634080.dkr.ecr.us-east-2.ama
zonaws.com-olist-dex:latest" "name" cannot be longer than 32 characters: "554136634080.dkr.ecr.us-east-2.amazonaws.com-olist-dex:latest"]
2017/04/25 10:40:18 [ERROR] root.accounts.elb: eval: *terraform.EvalSequence, err: Warnings: []. Errors: [only alphanumeric characters and hyphens allowed in "name": "554136634080.dkr.ecr.us-east-2.amazonaws.c
om-olist-dex:latest" "name" cannot be longer than 32 characters: "554136634080.dkr.ecr.us-east-2.amazonaws.com-olist-dex:latest"]
how to reproduce.
module "accounts" {
source = "github.com/segmentio/stack//web-service"
image = "554136634080.dkr.ecr.us-east-2.amazonaws.com/olist/dex:latest"
port = 5556
environment = "${module.stack.environment}"
cluster = "${module.stack.cluster}"
iam_role = "${module.stack.iam_role}"
security_groups = "${module.stack.external_elb}"
subnet_ids = "${module.stack.external_subnets}"
log_bucket = "${module.stack.log_bucket_id}"
internal_zone_id = "${module.stack.zone_id}"
external_zone_id = "${module.domain.zone_id}"
env_vars = <<EOF
[
{ "name": "AWS_REGION", "value": "${module.stack.region}" },
{ "name": "AWS_ACCESS_KEY_ID", "value": "${module.ses_user.access_key}" },
{ "name": "AWS_SECRET_ACCESS_KEY", "value": "${module.ses_user.secret_key}" }
]
EOF
}
Workaround add small name.
module "accounts" {
name = "smalname"
source = "github.com/segmentio/stack//web-service"
image = "554136634080.dkr.ecr.us-east-2.amazonaws.com/olist/dex:latest"
...
Metadata
Metadata
Assignees
Labels
No labels