Skip to content

[PLT-1418] Update web module to support DPC, leverage STS headers and cloudfront logging;#358

Merged
mianava merged 4 commits into
mainfrom
mianava/PLT-1418
Dec 22, 2025
Merged

[PLT-1418] Update web module to support DPC, leverage STS headers and cloudfront logging;#358
mianava merged 4 commits into
mainfrom
mianava/PLT-1418

Conversation

@mianava

@mianava mianava commented Dec 15, 2025

Copy link
Copy Markdown
Contributor

🎫 Ticket

jira.cms.gov/browse/PLT-1418

🛠 Changes

This PR configures:

  1. The 'web' module to configure an existing cloudfront deployment that supports STS headers, has a regional domain name ("domain_name_overwrite").
  2. The platform module to accommodate bucket logging in regional paths for Cloudfront logs passed into S3. This enables the passing of logs, by administrative AWS configuration, to an external provider.
  3. Simplifies some variables into strings instead of objects.

ℹ️ Context

These changes were made to support oversight and standardization of static site management through the centralization of terraform.

🧪 Validation

These changes require validation in the sandbox environment. The module source will be updated to point to this github commit hash as ref. Once the sandbox site is determined mostly unchanged, the module ref can be updated for the production site.

@mianava mianava requested a review from a team as a code owner December 15, 2025 16:30
@mianava mianava force-pushed the mianava/PLT-1418 branch 2 times, most recently from fb939d3 to 9ca433e Compare December 15, 2025 21:13
@mianava mianava changed the title Mianava/plt 1418 Update web module to support DPC, leverage STS headers and cloudfront logging; plt-1418 Dec 15, 2025
Comment thread terraform/modules/platform/outputs.tf Outdated
Comment thread terraform/modules/web/variables.tf
Comment thread terraform/modules/platform/outputs.tf Outdated
arn = string
})
type = string
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we can drop the logging_bucket variable and instead reference platform.splunk_logging_bucket.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Switched and pointed to the splunk_logging_bucket. Noting that the splunk_logging_bucket assignment does not include the suffix string defined in docs, just the ARN.

@mianava mianava changed the title Update web module to support DPC, leverage STS headers and cloudfront logging; plt-1418 [PLT-1418] Update web module to support DPC, leverage STS headers and cloudfront logging; Dec 18, 2025
Comment thread terraform/modules/web/logs.tf
Comment thread terraform/modules/web/main.tf
enabled = var.enabled
http_version = "http2and3"
is_ipv6_enabled = true
price_class = "PriceClass_100"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed because the assignment gets overwritten by institutionalized templates in the AWS accounts. Geographical restrictions are preferred to this setting.

Comment on lines -73 to +93
cloudfront_default_certificate = var.certificate == null ? true : false
acm_certificate_arn = var.certificate == null ? null : var.certificate.arn
minimum_protocol_version = var.certificate == null ? null : "TLSv1.2_2021"
ssl_support_method = var.certificate == null ? null : "sni-only"
cloudfront_default_certificate = false

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@gsf this now assumes that a certificate is already issued - as there is no longer a certificate value, just domain.

@mianava mianava requested a review from gsf December 19, 2025 18:25
@mianava mianava merged commit 18a86dc into main Dec 22, 2025
2 checks passed
@mianava mianava deleted the mianava/PLT-1418 branch December 22, 2025 19:38
juliareynolds-nava pushed a commit that referenced this pull request Jan 6, 2026
… cloudfront logging; (#358)

## 🎫 Ticket

jira.cms.gov/browse/PLT-1418

## 🛠 Changes

This PR configures: 
1) The 'web' module to configure an existing cloudfront deployment that
supports STS headers, has a regional domain name
("domain_name_overwrite").
2) The platform module to accommodate bucket logging in regional paths
for Cloudfront logs passed into S3. This enables the passing of logs, by
administrative AWS configuration, to an external provider.
3) Simplifies some variables into strings instead of objects.

## ℹ️ Context

These changes were made to support oversight and standardization of
static site management through the centralization of terraform.

<!-- If any of the following security implications apply, this PR must
not be merged without Stephen Walter's approval. Explain in this section
and add @SJWalter11 as a reviewer.
  - Adds a new software dependency or dependencies.
  - Modifies or invalidates one or more of our security controls.
  - Stores or transmits data that was not stored or transmitted before.
- Requires additional review of security implications for other reasons.
-->

## 🧪 Validation

<!-- How were the changes verified? Did you fully test the acceptance
criteria in the ticket? Provide reproducible testing instructions and
screenshots if applicable. -->
These changes require validation in the sandbox environment. The module
source will be updated to point to this github commit hash as ref. Once
the sandbox site is determined mostly unchanged, the module ref can be
updated for the production site.
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.

4 participants