0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[terraform] aws_lakeformation_data_lake_settingsのインポート方法

Last updated at Posted at 2025-05-21

TerraformでAWS Lakeformationをimportする機会があったのですが、
リソースの指定方法が特殊で躓いたため、共有します

インポート方法

次の要領でインポートできます!

tfファイル

resource "aws_lakeformation_data_lake_settings" "example_name" {
    admins = [
        "arn:aws:iam::${var.account_id}:role/examplerole",
        "arn:aws:iam::${var.account_id}:role/examplerole",
        "arn:aws:iam::${var.account_id}:role/examplerole"
    ]
}

ポイントはadminsを記載した状態でimportすることです!

importコマンド

tfファイルが作成できたら、importコマンドの実行です
importブロックでもできると思います

terraform import aws_lakeformation_data_lake_settings.example_name "DataLakeSettings"

ポイントは、リソースID(っていうんですかね? ””で囲まれている部分)を 'DataLakeSettings' で統一することです

結び

リソースによってimport方法変えるのやめちくれ〜

以上になります。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?