Skip to content

feat(variables): Add variable types to default_origin, cache_behavior, ordered_cache_behavior. #167

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

kevcube
Copy link

@kevcube kevcube commented Jul 31, 2025

Adds typing to the variable origin instead of using type = any

Comment on lines -84 to -95
domain_name = origin.value.domain_name
origin_id = lookup(origin.value, "origin_id", origin.key)
origin_path = lookup(origin.value, "origin_path", "")
connection_attempts = lookup(origin.value, "connection_attempts", null)
connection_timeout = lookup(origin.value, "connection_timeout", null)
origin_access_control_id = lookup(origin.value, "origin_access_control_id", lookup(lookup(aws_cloudfront_origin_access_control.this, lookup(origin.value, "origin_access_control", ""), {}), "id", null))

dynamic "s3_origin_config" {
for_each = length(keys(lookup(origin.value, "s3_origin_config", {}))) == 0 ? [] : [lookup(origin.value, "s3_origin_config", {})]

content {
origin_access_identity = lookup(s3_origin_config.value, "cloudfront_access_identity_path", lookup(lookup(aws_cloudfront_origin_access_identity.this, lookup(s3_origin_config.value, "origin_access_identity", ""), {}), "cloudfront_access_identity_path", null))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all origin params have been re-ordered to match provider documentation and remove opinionation.

@kevcube kevcube changed the title feat: make origin a typed variable feat(variables): make origin a typed variable Jul 31, 2025
@kevcube kevcube changed the title feat(variables): make origin a typed variable feat(variables): Make origin a typed variable Jul 31, 2025
@kevcube
Copy link
Author

kevcube commented Jul 31, 2025

note: there's more any variables that need to be complexed.

@kevcube kevcube changed the title feat(variables): Make origin a typed variable feat(variables): Add variable types to default_origin, cache_behavior, ordered_cache_behavior. Jul 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant