Terraform上的ValidationError在AWS LocalStack中应用命令响应

问题描述

我正在使用 localstack [version 0.11.5]框架,使用 terraform [version 0.13.3]测试/模拟AWS云应用程序。现在我可以初始化terraform(命令: terraform init ),但是当我尝试应用更改(命令: terraform apply )时低于验证错误。

applyResponse :: aws_cloudformation_stack.<stackname>: Creating...

Error: ValidationError: Stack with id arn:aws:cloudformation:us-east-1:000000000000:stack/<stackname>/a931a17c-e4c5-4fe9-8fc7-6fa85a397ade does not exist status code: 400,request id: cf4c737e-5ae2-11e4-a7c9-ad44eEXAMPLE

示例模板

资源“ aws_cloudformation_stack”“堆栈名称” {

name = "stackname"
capabilities = ["CAPABILITY_NAMED_IAM","CAPABILITY_IAM"]
        template_body = <<STACK
    {
    "Resources": {                                                                        
        "IAMtestiamrole2" : {
            "Type": "AWS::IAM::Role","Properties" : {
            "ManagedPolicyArns" : [                                     
                    "arn:aws:iam::aws:policy/ReadOnlyAccess" 
             ],"RoleName": "testiamrole2","Path" : "/","AssumeRolePolicyDocument" : ${file("/data/tmp//assumerolepolicy.json")}
            }
            }
                                                                                                                                    }
    }
    STACK
    }

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...