将现有策略附加到 CloudFormation 中的现有角色

0

【以下的问题经过翻译处理】 CloudFormation 模板如何将现有策略附加到现有角色?

据我所知,可以:

...但似乎两者都已存在的情况下,只能重新定义某一个资源才可以?

我的场景下,内联或托管策略的都可以。

1 Answer
0

【以下的回答经过翻译处理】 这在现在的 CloudFormation 中还不支持,因为没有这样的资源。此外,如果我们认为 CloudFormation 有一个资源来执行此操作,那么它只是一个将策略附加到角色的逻辑资源,就像我们如何将路由附加到路由表一样。 所以你的选择是

1.使用自定义资源或 2. 创建一个新角色并将现有策略附加到它或 3. 创建新策略并将其附加到现有角色或 4. 在 CloudFormation 中创建两者

profile picture
EXPERT
answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions