【问题标题】:task cat throwing "no suitible partition" error任务猫抛出“没有合适的分区”错误
【发布时间】:2021-11-16 03:28:20
【问题描述】:

当尝试在本地运行 taskcat 时,我得到:

[WARN   ] : No stacks were created... skipping cleanup.
[ERROR  ] : ValueError cannot find suitable AWS partition

从控制台。我使用的是 0.9.25 版。主模板 yaml 是我的云形成模板。我的 .taskcat.yml 在下面。

project:
  name:  automation
  parameters:
    "ParameterKey": "VPCId"
    "ParameterValue": "123"

  regions:
    ["us-east-2", "us-east-1"]

  template: ./ci/templates/master.template.yaml
tests:
  my-test:
      template: ./ci/templates/master.template.yaml

我不确定错误发生在哪里,我的 .taskcat.yml 中是否缺少某些内容?

【问题讨论】:

    标签: python amazon-web-services automation amazon-cloudformation


    【解决方案1】:

    对我来说,问题是权限问题。 我编写了 CI 的 taskcat 部分,它在 codebuild 平台内同时在多个帐户上运行。未正确设置配置文件时出现此错误。我在这里添加了一个模板,说明如何以正确的方式做到这一点。

    我的 .taskcat.yml:

    general:
      auth:
        default: default
        {region}: { profile name of account a }
    
    project:
      name: ...
      regions:
        ....
      s3_bucket : ...
     
    tests:
      name of test one:
        template: ...
        regions:
          ...
    

    ~/.aws/config

    [default]
    region=...
    output=json
    [profile { profile name of account a }]
    region=...
    output=json
    

    ~/.aws/凭据

    [default]
    aws_access_key_id=...
    aws_secret_access_key=...
    aws_session_token=...
    [{ profile name of account a }]
    aws_access_key_id=...
    aws_secret_access_key=...
    aws_session_token=...
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-02-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-06-10
      • 2018-09-07
      相关资源
      最近更新 更多