-
Notifications
You must be signed in to change notification settings - Fork 9.8k
feat/cloudfront-cross-account-vpc-origin #45021
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
base: main
Are you sure you want to change the base?
feat/cloudfront-cross-account-vpc-origin #45021
Conversation
|
Welcome @kharouny 👋 It looks like this is your first Pull Request submission to the Terraform AWS Provider repository. Thank you very much for taking the time to do so, and welcome to the community! 🎉 Community GuidelinesThis comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀 Voting for Prioritization
Pull Request Authors
|
3e90409 to
ffe5013
Compare
Fixes hashicorp#45011 AWS released cross-account VPC Origins for CloudFront on November 7, 2025. The CloudFront API requires the OwnerAccountId field when referencing a VPC origin from a different account. Without this parameter, Terraform returns 404 EntityNotFound even when the VPC origin is properly shared via RAM. Changes: - Add owner_account_id field to vpc_origin_config schema (Optional, Computed) - Update expandVPCOriginConfig to include OwnerAccountId when provided - Update flattenVPCOriginConfig to read OwnerAccountId from API response - Add acceptance test TestAccCloudFrontDistribution_vpcOriginConfigOwnerAccountID - Update documentation Backward compatible: When owner_account_id is omitted, CloudFront uses the distribution's account.
ffe5013 to
fa5938a
Compare
|
Looks like this needs another pipeline trigger from one of the owners to get the checks running. |
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the library.
Changes to Security Controls
No changes to security controls. This adds an optional parameter that enables cross-account resource access already configured via AWS Resource Access Manager (RAM). The parameter only exposes existing AWS CloudFront API functionality.
Description
Adds support for cross-account VPC origins in CloudFront distributions by implementing the
owner_account_idparameter invpc_origin_config.AWS CloudFront requires the
OwnerAccountIdfield when referencing a VPC origin from a different account. Without this parameter, Terraform fails with a 404 EntityNotFound error even when the VPC origin is properly shared via AWS RAM.Changes:
owner_account_idfield tovpc_origin_configschema (Optional, Computed)TestAccCloudFrontDistribution_vpcOriginConfigOwnerAccountIDBackward compatible: When omitted, CloudFront assumes same-account origin (existing behavior).
Relations
Closes #45011
References
Output from Acceptance Testing (Did not run)