I have Jenkins as CI/CD that executes my terraform code. When my pipeline does execute terraform, the aws_iam_policy_document being attached to aws_kms_key is adopting the account ID where Jenkins currently lives while I want the infrastructure to be created in different account, therefore giving me a permission error. Curios enough this only happens in modules/cloudfront-logs yet modules/opennext-revalidation-queue is using the same method to retrieve account ID.
Note: Unless I am doing something wrong... I do have a possible solution I would like to contribute.
Expected Behavior
I would expect the all resources being created by terraform to be created in the account I specify.
Steps To Reproduce
No response
Output
No response
Code of Conduct
[X] I agree to follow this project's Code of Conduct
Sensitive Information Declaration
[X] I confirm that neither PII/PID nor sensitive data are included in this form
Is there an existing issue for this?
Current Behavior
I have Jenkins as CI/CD that executes my terraform code. When my pipeline does execute terraform, the
aws_iam_policy_document
being attached toaws_kms_key
is adopting the account ID where Jenkins currently lives while I want the infrastructure to be created in different account, therefore giving me a permission error. Curios enough this only happens inmodules/cloudfront-logs
yetmodules/opennext-revalidation-queue
is using the same method to retrieve account ID.Note: Unless I am doing something wrong... I do have a possible solution I would like to contribute.
Expected Behavior
I would expect the all resources being created by terraform to be created in the account I specify.
Steps To Reproduce
No response
Output
No response
Code of Conduct
Sensitive Information Declaration