Matt
Matt

Reputation: 21

Does Terraform allow to import all buckets from aws s3 account at once?

I would like to ask if Terraform allows to somehow import all existing buckets from my aws s3 account. I know I can import every single one, but I would appreciate to import them all.

I’ve read about Terraforming s3 feature from http://terraforming.dtan4.net, but it will just rewrite all buckets as new resources so applying the Terraform will just duplicate them all, without content.

In addition, is Terraform able to check whether all buckets on my s3 account match to all buckets in configuration code?

Upvotes: 2

Views: 476

Answers (1)

mootpt
mootpt

Reputation: 298

It seems you can export state as well: https://github.com/dtan4/terraforming#export-tfstate

This will prevent recreation of the resources as they will exist in state.

Upvotes: 1

Related Questions