简体   繁体   中英

How can I fix cloudformation update when resource was changed manually

My cloudformation stack has a secret resource deployed to secret manager. But this secret was removed and recreate with the same name manually which happened outside cf stack update.

Now when I update this stack, I got an error: 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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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