Skip to content

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
Copy link

This PR has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days

@github-actions github-actions bot added the stale label Sep 26, 2025
@kevcube
Copy link
Author

kevcube commented Sep 26, 2025 via email

@github-actions github-actions bot removed the stale label Sep 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants