当尝试通过web控制台进行更新时,AWS接受低于标记值的值,但使用terraform很难完成任务。
我想根据我的资源更新的标签是:
1. "IT R&D & DATA - 7777"
2. "Example Team, Inc. - 001"
在地形应用过程中,每次不同的尝试都会出现以下错误(但是预览总是显示正确的数据(。对此有什么变通办法吗?
Error: error updating LB (arn:aws:elasticloadbalancing:us-west-1:xxxx:loadbalancer/app/LB-DEV/f4c252)
tags: error tagging resource (arn:aws:elasticloadbalancing:us-west-1:xxxx:loadbalancer/app/LB-DEV/f4c252):
ValidationError: 1 validation error detected: Value 'Example Team, Inc. - 001' at 'tags.1.member.value'
failed to satisfy constraint: Member must satisfy regular expression pattern: ^([p{L}p{Z}p{N}_.:/=+-@]*)$
resource "aws_lb" "lb" {
internal = "true"
load_balancer_type = "application"
name = format("%s%s","LB-",var.name)
subnets = data.aws_subnet_ids.subnet.ids
security_groups = [
data.aws_security_group.sec_group.id
]
tags = {
business_unit = "IT R//&D //& DATA //- 7777"
legal_entity = replace("Example Team, Inc. - 001", "/(['\*])/", "//$1")
}
}
&
不允许出现在标记中。来自文档:
通常,允许的字符是字母、数字、可以用UTF-8表示的空格,以及以下字符:_.:/=+-@。