【发布时间】:2018-02-28 13:49:47
【问题描述】:
使用 Terraform 创建红移参数组时,不支持标记。我不知道为什么 terraform 会这样设计。 https://www.terraform.io/docs/providers/aws/r/redshift_parameter_group.html
我确实需要在运行“terraform apply”后标记红移参数组。我在想也许我应该从 null_resource 部分添加标签,也许使用 AWS CLI 等。但我不知道该怎么做。有没有人有类似的问题并弄清楚如何在“terraform apply”之后标记红移参数组?谢谢。
【问题讨论】:
-
Terraform 将永远落后于 AWS 功能支持。这是一个这样的例子。尝试使用
local-exec配置器在创建的资源上运行 CreateTags。 -
好的,谢谢 Krishna Kumar R. 将运行 AWS CLI:docs.aws.amazon.com/cli/latest/reference/ec2/create-tags.html
-
您也可以使用空资源来使用 AWS CLI 标记资源 terraform.io/docs/provisioners/null_resource.html
-
@Krishna Kumar R 和 strongjz:你知道如何在 redshift 参数组上创建标签吗?我想我应该使用:“aws create-tags --resource-name
--tags ”但我不知道 --resource-name 的值是什么。根据docs.aws.amazon.com/cli/latest/reference/redshift/…,应该是……像 arn:aws:redshift:us-east-1:123456789:cluster:t1,对于 redshift 参数组,我应该在 123456789 之后放置什么?谢谢。 -
我想通了。看我的回答。
标签: amazon-web-services amazon-redshift terraform