fix(iam): grant plan role CloudFront DescribeFunction

This commit is contained in:
Adam Moussa 2026-09-18 11:24:03 -04:00
parent 4682d952a0
commit 7183a793cd
No known key found for this signature in database
2 changed files with 2 additions and 0 deletions

View file

@ -634,6 +634,7 @@ resource "aws_iam_role_policy" "hcptf_plan_refresh" {
},
{
Action = [
"cloudfront:DescribeFunction",
"cloudfront:Get*",
"cloudfront:List*",
]

View file

@ -77,6 +77,7 @@ def test_cloudfront_forwards_portal_api_paths_without_publish_or_roster():
assert "custom_error_response" not in cloudfront
assert 'resource "aws_cloudfront_function" "form_spa_rewrite"' in cloudfront
assert "function_arn = aws_cloudfront_function.form_spa_rewrite.arn" in cloudfront
assert "cloudfront:DescribeFunction" in _read("hcp_iam.tf")
assert "AllViewerExceptHostHeader" in locals_tf or (
"b689b0a8-53d0-40ab-baf2-68738e2966ac" in locals_tf
)