Skip to content

Undocumented breaking change: Removed variable origin[].origin_access_controlΒ #185

@aburgel

Description

@aburgel

Description

In versions prior to 6.0, you could specify the origin's access control policy using origin_access_control = <name>. With version 6.0, this no longer works, you must use original_access_control_key instead.

This isn't documented in the upgrade notes doc and doesn't result in any terraform warnings or errors.

  • βœ‹ I have searched the open/closed issues and my issue is not listed.

Versions

  • Module version [Required]: 6.0.1

  • Terraform version: Terraform v1.14.1

  • Provider version(s): registry.terraform.io/hashicorp/aws v6.24.0

Reproduction Code [Required]

Works on 5.2:

module "cloudfront" {
  source  = "terraform-aws-modules/cloudfront/aws"
  version = "~> 5.2"

  origin_access_control = {
    "oac" = {
      origin_type      = "s3"
      signing_behavior = "always"
      signing_protocol = "sigv4"
    }
  }

  origin = {
    bucket = {
      domain_name           = "bucket"
      origin_access_control = "oac"
    }
  }
}

Required change for 6.0

-    origin_access_control = "oac"
+    origin_access_control_key = "oac"

Expected behavior

The old variable name should work, be documented that it is unsupported, or result in an error.

Actual behavior

No errors. The plan attempts to remove the origin access control from the origin which is bad.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions