简体   繁体   English

使用 terraform 和 localstack 创建 aws_dynamodb_table 需要很长时间

[英]Creating aws_dynamodb_table with terraform and localstack takes forever

I was testing how to setup terraform+localstack with the following configuration filehttps://github.com/wentao-daommo/aws-local/blob/master/local.tf我正在测试如何使用以下配置文件https://github.com/wentao-daommo/aws-local/blob/master/local.tf设置 terraform+localstack

When I run command当我运行命令

terraform apply --auto-approve

The log shows something like this forever!日志永远显示这样的事情!

aws_dynamodb_table.table_1: Still creating... [26m51s elapsed]

I think something is wrong that causes table creation taking so long, and it never completed.我认为某些问题导致表创建需要很长时间,并且从未完成。

Anyone know this?有人知道吗?

By default DynamoDB as well as all other services on localstack are exposed on port 4566 .默认情况下,DynamoDB 以及localstack上的所有其他服务都暴露在端口4566上。 However your script uses different port dynamodb = "http://localhost:4569" .但是,您的脚本使用不同的端口dynamodb = "http://localhost:4569" Please change it to:请将其更改为:

dynamodb       = "http://localhost:4566"

Similarly all other services are set to non-default port in your terraform script.同样,所有其他服务在 terraform 脚本中设置为非默认端口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM