Skip to content

Infrastructure Deployment Feature#262

Closed
harshavemula-ua wants to merge 11 commits intomainfrom
feature/infra-deployment
Closed

Infrastructure Deployment Feature#262
harshavemula-ua wants to merge 11 commits intomainfrom
feature/infra-deployment

Conversation

@harshavemula-ua
Copy link
Collaborator

@harshavemula-ua harshavemula-ua commented Oct 9, 2025

Overview:-
This PR introduces a comprehensive Terraform CI/CD pipeline with automated validation and testing across 20 VPUs (Vector Processing Units). The changes include a new GitHub Actions workflow that performs Terraform quality checks, security scans, automatic deployment, and end-to-end testing of both short-range and medium-range forecast processing for all VPUs with automated cleanup.

Infrastructure Modernization:-
The Terraform infrastructure has been modernized with S3 remote state backend (encrypted), version constraints (Terraform >= 1.9.0, AWS provider ~> 5.0), and improved modularization. The state machine ARN is now stored in AWS Systems Manager Parameter Store for dynamic lookup, replacing hardcoded references. The scheduler module has been temporarily disabled to allow independent deployment and testing of the orchestration components.

Key Improvements:-
The new CI/CD workflow validates infrastructure changes through automated security scanning (tfsec & Checkov), runs comprehensive VPU testing with matrix strategy, and ensures all resources are properly created and cleaned up after testing.

All Terraform configurations were successfully validated and planned locally prior to submitting this pull request, ensuring infrastructure changes are tested and error-free before deployment.

image

Copy link
Contributor

Copilot AI left a comment

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 implements a comprehensive Terraform CI/CD pipeline for AWS infrastructure deployment and testing. The infrastructure has been modernized with S3 remote state backend, version constraints, and Parameter Store integration for dynamic state machine ARN management. The scheduler module has been temporarily disabled to allow independent deployment testing.

  • Modernized Terraform configuration with S3 backend, encryption, and version constraints (Terraform >= 1.9.0, AWS provider ~> 5.0)
  • Replaced hardcoded state machine ARN references with AWS Systems Manager Parameter Store lookup
  • Added comprehensive GitHub Actions workflow with security scanning, VPU testing across 20 units, and automated cleanup

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
infra/aws/terraform/main.tf Added S3 backend configuration, version constraints, and commented out scheduler module
infra/aws/terraform/outputs.tf Updated outputs to use module reference instead of direct resource
infra/aws/terraform/modules/orchestration/main.tf Added SSM parameter resource to store state machine ARN
infra/aws/terraform/modules/schedules/main.tf Added SSM parameter data source and removed duplicate provider
infra/aws/terraform/modules/schedules/nrds_cfe_nom_schedules.tf Updated file path and replaced hardcoded ARN with SSM parameter lookup
infra/aws/terraform/backend-dev.hcl New S3 backend configuration for development environment
.github/workflows/infra_deploy_val.yaml Comprehensive CI/CD workflow with security scans, testing, and cleanup

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@JordanLaserGit JordanLaserGit added NRDS AWS Deployment Through GitActions enhancement New feature or request P1 Priority level. P0: Critical, P1: High, P2: Medium, P3: Low labels Oct 14, 2025
@arpita0911patel arpita0911patel changed the title WIP:-Infrastructure Deployment Feature Infrastructure Deployment Feature Oct 14, 2025
Copy link
Collaborator

@JordanLaserGit JordanLaserGit left a comment

Choose a reason for hiding this comment

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

@harshavemula-ua great work here! I'd like to address a few things before we get this merged.

@JordanLaserGit JordanLaserGit added the CI/CD Related to Continuous Integration and Delivery/Deployment label Oct 17, 2025
@harshavemula-ua harshavemula-ua force-pushed the feature/infra-deployment branch 9 times, most recently from aa26e2f to ded1ec6 Compare November 14, 2025 04:33
@harshavemula-ua harshavemula-ua force-pushed the feature/infra-deployment branch from 258a1e6 to 80d9797 Compare November 14, 2025 19:27
@harshavemula-ua harshavemula-ua force-pushed the feature/infra-deployment branch 4 times, most recently from bfac352 to 95a3f1c Compare November 14, 2025 21:57
@harshavemula-ua harshavemula-ua force-pushed the feature/infra-deployment branch 5 times, most recently from 3b82011 to 1c6805e Compare November 21, 2025 06:02
Comment on lines +9 to +13
resource "aws_ssm_parameter" "state_machine_arn" {
name = var.sm_parameter_name
type = "SecureString"
value = aws_sfn_state_machine.datastream_state_machine.arn
}

Check failure

Code scanning / checkov

Ensure SSM parameters are using KMS CMK Error

Ensure SSM parameters are using KMS CMK
@harshavemula-ua harshavemula-ua force-pushed the feature/infra-deployment branch from 5bc1d50 to a45c064 Compare November 24, 2025 21:53
@harshavemula-ua harshavemula-ua force-pushed the feature/infra-deployment branch 2 times, most recently from 0789e77 to 912bb77 Compare December 9, 2025 15:04
@harshavemula-ua harshavemula-ua force-pushed the feature/infra-deployment branch 2 times, most recently from ed8f68b to f343f40 Compare January 6, 2026 16:53
- Add main.tf with orchestration module configuration
- Add backend.hcl for S3 state management
- Add variables.tfvars with resource naming
- Add outputs.tf for state machine ARN
- Document environments in README
- Add EC2 API retry config for RequestLimitExceeded handling
- Update IAM policies for EC2, Lambda, and Step Functions
- Add SSM parameter for state machine ARN storage
- Update Lambda function configurations
- Update execution templates for VPU and FP datastream
- Update scheduler IAM configuration
- Update schedule definitions
- Add Terraform plan, apply, and destroy jobs
- Add VPU test execution with Step Functions
- Add workflow inputs for VPU and date selection
- Add concurrency control and cleanup on failure
- Fetch state machine ARN dynamically from SSM
- Add automated health checks for VPU executions
- Add auto-rerun capability on failures
- Add modify_execution.py for test execution configuration
- Add import_terraform_resources.sh for state management
- Make check_datastream_outputs.sh executable
@harshavemula-ua harshavemula-ua force-pushed the feature/infra-deployment branch from ffdd55d to 54a4602 Compare January 6, 2026 20:32
@harshavemula-ua harshavemula-ua force-pushed the feature/infra-deployment branch from 54a4602 to 6a623c7 Compare January 6, 2026 20:34
@arpita0911patel arpita0911patel removed their request for review January 20, 2026 22:12
@harshavemula-ua harshavemula-ua deleted the feature/infra-deployment branch February 12, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD Related to Continuous Integration and Delivery/Deployment enhancement New feature or request NRDS AWS Deployment Through GitActions P1 Priority level. P0: Critical, P1: High, P2: Medium, P3: Low

Projects

Development

Successfully merging this pull request may close these issues.

4 participants