[英]How can I fix cloudformation update when resource was changed manually
My cloudformation stack has a secret resource deployed to secret manager.我的 cloudformation 堆栈有一个秘密资源部署到秘密管理器。 But this secret was removed and recreate with the same name manually which happened outside cf stack update.
但是这个秘密被删除并用相同的名称手动重新创建,这发生在 cf 堆栈更新之外。
Now when I update this stack, I got an error: Secrets Manager can't find the specified secret
.现在,当我更新此堆栈时,出现错误:
Secrets Manager can't find the specified secret
。 The reason is that even the secret was recreated with the same name, the arn of this secret was changed which makes the logic ID in stack is different.原因是即使秘密是用相同的名字重新创建的,这个秘密的 arn 也被改变了,这使得堆栈中的逻辑 ID 不同。
I have tried to drift the stack but the secret is not showing in the result.我试图漂移堆栈,但结果中没有显示秘密。
So in this case, how can I make the stack in sync with existing resources?那么在这种情况下,如何让堆栈与现有资源同步呢?
Can you redeploy just the secret resource from your code?你能从你的代码中重新部署秘密资源吗? If yes, remove the manually created secret resource from the console, remove secret resource from code, deploy code.
如果是,从控制台删除手动创建的秘密资源,从代码中删除秘密资源,部署代码。 Add resource to code, deploy code again.
将资源添加到代码,再次部署代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.