Retrieving multiple secrets and assigning to multiple resources

HI -
Any suggestions on the below topic would be helpful

I have to create multiple aws managed active directories at different times/day and each directory will have a unique password. Previously created directory should not be destroyed. On all runs terraform is destroying the previously created resources. Are there any options for terraform to ignore the previously created infrstructure. I tried using lifecycle

Without seeing the code you are using it is pretty hard to say, but it sounds like you might be modifying the existing resource rather than adding additional ones. If each directory will be similar the use of for_each or count would probably be useful.

Attached is the code and the error I get
aws.txt (1.7 KB)
The error shown in the attached screenshot occurs after the random password is being assigned to the managed ad module