-
-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot create deployment principal and the CDN in the same terraform run #257
Labels
bug
🐛 An issue with the system
Comments
abeluck
added a commit
to abeluck/terraform-aws-cloudfront-s3-cdn
that referenced
this issue
Feb 14, 2023
This patch refactors the passing of deployment principals, such that it uses static/known map keys. This allows this module to be applied at the same time as the deployment principal (e.g., an iam user) is is deployed. Hashicorp recommends storing only known values in map keys, and leaving all dynamic/unknown values in the map values ([source0](https://developer.hashicorp.com/terraform/language/meta-arguments/for_each#limitations-on-values-used-in-for_each), [source1](hashicorp/terraform#30838 (comment))).
Created a PR for this. |
abeluck
added a commit
to abeluck/terraform-aws-cloudfront-s3-cdn
that referenced
this issue
Aug 11, 2023
This patch refactors the passing of deployment principals, such that it uses static/known map keys. This allows this module to be applied at the same time as the deployment principal (e.g., an iam user) is is deployed. Hashicorp recommends storing only known values in map keys, and leaving all dynamic/unknown values in the map values ([source0](https://developer.hashicorp.com/terraform/language/meta-arguments/for_each#limitations-on-values-used-in-for_each), [source1](hashicorp/terraform#30838 (comment))).
abeluck
added a commit
to abeluck/terraform-aws-cloudfront-s3-cdn
that referenced
this issue
Aug 11, 2023
This patch refactors the passing of deployment principals, such that it uses static/known map keys. This allows this module to be applied at the same time as the deployment principal (e.g., an iam user) is is deployed. Hashicorp recommends storing only known values in map keys, and leaving all dynamic/unknown values in the map values ([source0](https://developer.hashicorp.com/terraform/language/meta-arguments/for_each#limitations-on-values-used-in-for_each), [source1](hashicorp/terraform#30838 (comment))).
abeluck
added a commit
to abeluck/terraform-aws-cloudfront-s3-cdn
that referenced
this issue
Aug 11, 2023
This patch refactors the passing of deployment principals, such that it uses static/known map keys. This allows this module to be applied in the same terraform run that the deployment principal (e.g., an iam user) is applied. Hashicorp recommends storing only known values in map keys, and leaving all dynamic/unknown values in the map values ([source0](https://developer.hashicorp.com/terraform/language/meta-arguments/for_each#limitations-on-values-used-in-for_each), [source1](hashicorp/terraform#30838 (comment))).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the Bug
I would like to create an IAM user and make it the deployment principal in the same terraform execution.
But this isn't possible due to the use of dynamic map keys.
This seems like a very simple and common use-case.
Expected Behavior
I expect to be able to create my deployment principal and the CDN in one go.
Steps to Reproduce
Steps to reproduce the behavior:
Result:
Environment (please complete the following information):
Anything that will help us triage the bug will help. Here are some ideas:
Additional Info
Hashicorp recommends storing only known values in map keys, and leaving all dynamic/unknown values in the map values (source0, source1).
Fixing it I think will require deprecating the existing
deployment_principal_arns
variable, and adding a new one that uses a map of objects:The text was updated successfully, but these errors were encountered: