【问题标题】:Cloudformation - ECRImageURI failed to satisfy constraintCloudformation - ECRImageURI 未能满足约束
【发布时间】:2021-10-26 03:45:43
【问题描述】:

我有一个 ECRImage URI 的参数。当我尝试使用 taskcat 进行空运行测试时,出现以下错误

[ERROR ] : ClientError An error occurred (ValidationError) when calling the CreateStack operation: Parameter ECRImageURI failed to satisfy constraint: Allow all characters

但是我对模式的正则表达式已经很宽松了。想法?

  ECRImageURI:
    AllowedPattern: ".*"
    ConstraintDescription: "Allow all characters"
    Default: 'http://464139160630.dkr.ecr.us-east-2.amazonaws.com/www.pulliam.sh:latest'
    Description: ECR Docker image to use in ECS Task definition.
    MaxLength: '64'
    MinLength: '1'
    Type: String

编辑: 基于文档here,Cloudformation 使用Java regular expressions。所以我只能得出结论,taskcat 有问题,或者发生了其他事情。

【问题讨论】:

    标签: amazon-cloudformation amazon-ecr


    【解决方案1】:

    满足正则表达式模式,尽管^.*$ 可能更具表现力。但实际问题似乎出在MaxLength 参数上。例如,您的默认值已经违反了长度限制。

    【讨论】:

    • 哇,我不敢相信我错过了。谢谢
    猜你喜欢
    • 2020-07-24
    • 1970-01-01
    • 2016-09-10
    • 1970-01-01
    • 2015-08-24
    • 2022-07-07
    • 1970-01-01
    • 2022-11-10
    • 2021-12-01
    相关资源
    最近更新 更多