[英]Terraform: aws default_tag not supported in root_block_device?
I am trying to use the default_tag
available for the aws terraform provider.我正在尝试使用 aws terraform 提供商可用的
default_tag
。
Documentation:文档:
From the doc, it says:从文档中,它说:
This functionality is supported in all resources that implement tags, with the exception of the aws_autoscaling_group resource.
So, for all resources I have it works very well, except for aws_instance.root_block_device
.因此,对于我拥有的所有资源,它工作得很好,除了
aws_instance.root_block_device
。
For example, I have:例如,我有:
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
}
}
The default tag Env = prod
is correctly added to the instance itself, but not for the root_device_block
block.默认标记
Env = prod
已正确添加到实例本身,但不是用于root_device_block
块。
So I'm wondering if default_tag
is supported for this.所以我想知道是否支持
default_tag
。 It's true that the documentation says supported in all **resources**
but root_block_device
is only an argument of this resource, so maybe this is the problem?的确,文档说
supported in all **resources**
但root_block_device
只是该资源的一个参数,所以也许这就是问题所在?
I'm just looking for a kind of confirmation because the documentation is not very clear on this point.我只是在寻找一种确认,因为文档在这一点上不是很清楚。
Thank you谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.