![](/img/trans.png)
[英]How to optionally configure root_block_device in EC2 instance using terraform
[英]Terraform: aws default_tag not supported in root_block_device?
我正在嘗試使用 aws terraform 提供商可用的default_tag
。
文檔:
從文檔中,它說:
This functionality is supported in all resources that implement tags, with the exception of the aws_autoscaling_group resource.
因此,對於我擁有的所有資源,它工作得很好,除了aws_instance.root_block_device
。
例如,我有:
provider "aws" {
[...]
default_tags {
tags = {
Env = prod
}
}
}
resource "aws_instance" "instance" {
ami = xxx
instance_type = xxx
root_block_device {
volume_size = xxx
volume_type = xxx
}
}
默認標記Env = prod
已正確添加到實例本身,但不是用於root_device_block
塊。
所以我想知道是否支持default_tag
。 的確,文檔說supported in all **resources**
但root_block_device
只是該資源的一個參數,所以也許這就是問題所在?
我只是在尋找一種確認,因為文檔在這一點上不是很清楚。
謝謝
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.