简体   繁体   English

AWS CloudFormation 部署覆盖“名称”标签?

[英]AWS CloudFormation deploy overwrite "name" tag?

I like not specifying custom names for my resources (because of how CF won't rebuild them if changed)我喜欢不为我的资源指定自定义名称(因为如果更改,CF 不会重建它们)

But it would be nice if I could change the "name" tag at deploy time, for example:但是如果我可以在部署时更改“名称”标签会很好,例如:

aws cloudformation deploy --template-file dev-cf.yaml --stack-name mystack --region us-east-1 --tags Name=myapp env=dev

Will this work or break anything?这会起作用还是会破坏任何东西? Does CF depend on the "name" tag of resources it creates? CF 是否依赖于它创建的资源的“名称”标签?

No, CF does not depend on Name tags, name tags are largely for your/sysadmins benefit.不,CF 不依赖于名称标签,名称标签主要是为了您/系统管理员的利益。 I haven't used many name tags (that's probably not a good thing) throughout a lot of stuff I've written and I've never had issues.在我写的很多东西中,我没有使用很多名称标签(这可能不是一件好事),而且我从来没有遇到过问题。 The only thing that I can see being a possibility, is that CF does use some values/resource attrs/cf resource names to generate the CF specific names for things, so they may take your Name tags into consideration for generating those, but other than that, you'll be fine.我唯一能看到的可能是 CF 确实使用一些值/资源属性/cf 资源名称来为事物生成 CF 特定名称,因此它们可能会考虑您的名称标签来生成这些名称,但除了那,你会没事的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM