-
Notifications
You must be signed in to change notification settings - Fork 27
Description
In moudles/infrastructure/permissions/iam_user, a new IAM user is created, and a new access key pair for that user is also created.
AWS best practices currently are to rotate access keys every 90 days. Currently, the only clean way I can see to rotate this access key is to "terraform taint" the resource, and re-apply the template, resulting in deletion and re-creation of the access key, and subsequest update of the cloud-connector helm template.
However, as currently written, this would result in deleting the old key before creating the new key, which could cause an access denied message to cloud-connector while this is in progress. However, by specifying the "create_before_destroy" option for the access key, the new access key should be created, the helm template should be updated, and only then would the old key be deleted.
Is there another, cleaner way of rotating this access key that I'm missing? If not, I think create_before_destroy should be set on this resource.