aws_eip domain
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eip
Warning: Argument is deprecated
use domain attribute instead
vpc = true を domain = "vpc" に書き換え
Can't configure a value for "domain": its value will be decided automatically based on the result of applying this configuration.
この状態で再度initを-upgradeオプションを付与して実行。
$ terraform init -upgrade...
[Terraform] EC2のEIP設定とdomain="vpc"定義とAWSプロバイダーのアップグレード - zaki work log 2024
AWSプロバイダを 4.45.0 → 5.83.1 に更新して解消
aws_ecs_cluster capacity_providers (default_capacity_provider_strategy)
Error: Unsupported argument
An argument named "capacity_providers" is not expected here.
Error: Unsupported block type
Blocks of type "default_capacity_provider_strategy" are not expected here.
resource "aws_ecs_cluster" "this" {
name = "my-cluster"
capacity_providers = [
...
}を
resource "aws_ecs_cluster" "this" {
name = "my-cluster"
}
resource "aws_ecs_cluster_capacity_providers" "this" {
cluster_name = aws_ecs_cluster.this.name
capacity_providers = [
...
}に書き換えて
terraform import aws_ecs_cluster_capacity_providers.this my-cluster