Skip to content

Move Terraform SSM parameter writes into outputs.tf for consistency - #94

Open
jordanpadams wants to merge 1 commit into
mainfrom
rearrange_ssm
Open

Move Terraform SSM parameter writes into outputs.tf for consistency#94
jordanpadams wants to merge 1 commit into
mainfrom
rearrange_ssm

Conversation

@jordanpadams

Copy link
Copy Markdown
Member

🗒️ Summary

Move aws_ssm_parameter resource blocks out of main.tf (and s3/main.tf) into outputs.tf, co-located with the matching output blocks. This makes the module's published cross-repo interface visible in one file — the full answer to "what does this module publish to SSM?" is now in outputs.tf rather than scattered across files.

Affected modules:

  • terraform/logstash/ — moved ec2_role_arn, logstash_instance_id, and logstash_runas_document SSM writes
  • terraform/s3/ — moved s3_bucket_name SSM write

No functional change — resource names, SSM paths, and values are unchanged.

This aligns web-analytics with the convention established in pdc-observability and documented in terra-wrangler.

🤖 AI Assistance Disclosure

  • No AI assistance used
  • AI used for light assistance (e.g., suggestions, refactoring, documentation help, minor edits)
  • AI used for moderate content generation (AI generated some code or logic, but the developer authored or heavily revised the majority)
  • AI generated substantial portions of this code

Estimated % of code influenced by AI: 95%

⚙️ Test Data and/or Report

Pure refactor — no logic changed, only file placement. Verified by diffing the terraform plan output before and after: no resource additions, deletions, or in-place updates.

♻️ Related Issues

Refs NASA-PDS/pdc-observability#7

🤓 Reviewer Checklist

Reviewers: Please verify the following before approving this pull request.

Documentation and PR Content

  • Documentation: README, Wiki, or inline documentation (Sphinx, Javadoc, Docstrings) have been updated to reflect these changes.
  • Issue Traceability: The PR is linked to a valid GitHub Issue
  • PR Title: The PR title is "user-friendly" clearly identifying what is being fixed or the new feature being added, that if you saw it in the Release Notes for a tool, you would be able to get the gist of what was done.

Security & Quality

  • SonarCloud: Confirmed no new High or Critical security findings.
  • Secrets Detection: Verified that the Secrets Detection scan passed and no sensitive information (keys, tokens, PII) is exposed.
  • Code Quality: Code follows organization style guidelines and best practices for the specific language (e.g., PEP 8, Google Java Style).

Testing & Validation

  • Test Accuracy: Verified that test data is accurate, representative of real-world PDS4 scenarios, and sufficient for the logic being tested.
  • Coverage: Automated tests cover new logic and edge cases.
  • Local Verification: (If applicable) Successfully built and ran the changes in a local or staging environment.

Maintenance

  • Backward Compatibility: Confirmed that these changes do not break existing downstream dependencies or API contracts (or that breaking changes are clearly documented).

Co-locate aws_ssm_parameter resources with output blocks in outputs.tf
so the module published cross-repo interface is visible in one file.
No functional change - resource names and SSM paths are unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 21, 2026 18:59
@jordanpadams
jordanpadams requested a review from a team as a code owner August 21, 2026 18:59
@jordanpadams jordanpadams self-assigned this Aug 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR relocates Terraform SSM parameter resources into outputs.tf alongside related outputs without changing behavior.

Changes:

  • Moved the S3 bucket SSM parameter.
  • Moved three Logstash SSM parameters.
  • Removed their original definitions from main.tf.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
terraform/s3/outputs.tf Adds the S3 bucket SSM parameter.
terraform/s3/main.tf Removes the relocated parameter.
terraform/logstash/outputs.tf Adds Logstash SSM parameters.
terraform/logstash/main.tf Removes the relocated parameters.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@nutjob4life nutjob4life left a comment

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.

Terraform delta: ✓
Re-Formatting: not necessary
Visual inspection: ✓ (trust accordingly)
Approval: ✅

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.

3 participants