amazon-web-services - Terraform quickest way to import multiple resources
问题描述
My Terraform state file is messedup. Resources are already available on AWS. When I run terraform apply command I am getting multiple "Already Exists" error same as below.
aws_autoscaling_group.mysql-asg: Error creating AutoScaling Group: AlreadyExists: AutoScalingGroup by this name already exists - A group with the name int-mysql-asg already exists
When I do terraform import then it goes away. but I have hundreds of resources which is giving error. What is the best way to sync terraform state and make terraform apply successful?
解决方案
你可能想看看Terraforming
这是一个 Ruby 项目,声明“将现有 AWS 资源导出为 Terraform 样式 (tf, tfstate)”
推荐阅读
- javascript - Google Apps 脚本 - 自动链接工作表
- tensorflow - Tensorflow“条件[1,20,1],然后[10,1,10,1],否则[10,20,1]必须是可广播的”
- java - 在 Spring Boot 中使用 PDFBOX 依赖生成 PDF
- unreal-engine4 - 为什么每当我在项目中包含游戏静态属性时都会出现此错误
- jekyll - 将来自 YML 的帖子、集合和数据组合到页面上显示
- java - 用 Spock 模拟对象
- wordpress - Apache 2.4.46 (Ubuntu) mod_cache_disk Safari 问题
- authentication - 是否有与通过电子邮件向新用户发送身份验证令牌相关的 NIST 标准?
- python - 如何在 csv 导入时使用 python pandas 删除控制字符?
- neo4j - 如何查询所有公司下的员工限额?