一种解决方法是将 AWS Elasticsearch-Jaeger 资源导出为一个 tfstate 文件,并在新账户中手动导入该文件。
另一种解决方法是在新账户中重新部署 Elasticsearch-Jaeger 资源,使用以下的 terraform 代码作为基础模板:
provider "aws" {
region = ""
}
resource "aws_elasticsearch_domain" "example" {
domain_name = ""
elasticsearch_version = "7.1"
elasticsearch_cluster_config {
instance_type = ""
}
ebs_options {
ebs_enabled = true
volume_size =
volume_type = "gp2"
}
access_policies = <"
]
}
}
}
]
}
POLICY
}
resource "aws_security_group" "example" {
name_prefix = ""
ingress {
from_port = 80
to_port = 80
protocol = "tcp"
cidr_blocks = [
""
]
}
}
resource "aws_ecs_task_definition" "example" {
family = ""
container_definitions = "${file("")}"
requires_compatibilities = ["FARGATE"]
memory =
cpu =
network_mode = "awsvpc"
execution_role_arn = ""
task_role_arn = ""
volume {
name = ""