我想知道如何列出所有尺寸的比特纳米Kafkaami id?
1rhkuytd1#
你可以试试这个 aws_ami_ids 数据源https://www.terraform.io/docs/providers/aws/d/ami_ids.html:
aws_ami_ids
provider "aws" { region = "us-east-1" } data "aws_ami_ids" "bitnami_kafka" { owners = ["979382823631"] # bitnami filter { name = "name" values = ["bitnami-kafka-*"] } } output "bitnami_kafka_ids" { value = "${data.aws_ami_ids.bitnami_kafka.ids}" }
这与执行以下操作大致相同: aws ec2 describe-images --owners 979382823631 --filters "Name=name,Values=bitnami-kafka-*" ,但对于terraform,它只返回ami id。
aws ec2 describe-images --owners 979382823631 --filters "Name=name,Values=bitnami-kafka-*"
1条答案
按热度按时间1rhkuytd1#
你可以试试这个
aws_ami_ids
数据源https://www.terraform.io/docs/providers/aws/d/ami_ids.html:这与执行以下操作大致相同:
aws ec2 describe-images --owners 979382823631 --filters "Name=name,Values=bitnami-kafka-*"
,但对于terraform,它只返回ami id。