-
Notifications
You must be signed in to change notification settings - Fork 23
feat(infrastructure): add conversion pipeline Terraform module #542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
nguyena2
wants to merge
9
commits into
main
Choose a base branch
from
feat/issue-39-conversion-pipeline-iac
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
01de39e
feat(infrastructure): implement conversion pipeline module
nguyena2 71173da
Merge remote-tracking branch 'origin/main' into feat/issue-39-convers…
nguyena2 e70ddee
feat(infrastructure): enhance conversion pipeline with event grid dea…
nguyena2 afcdd84
docs(infrastructure): update README and fabric.tf with author and dep…
nguyena2 9768c3a
refactor(pipeline): remove virtual network references from conversion…
nguyena2 65c7df9
fix(pipeline): correct output paths for Checkov SARIF results
nguyena2 13cb9c0
refactor(pipeline): remove logs directory creation and update SARIF f…
nguyena2 acd21e6
feat(infrastructure): update conversion pipeline module and tests
nguyena2 5e011bb
Merge remote-tracking branch 'origin/main' into feat/issue-39-convers…
nguyena2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| name: Terraform Security Scan | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| working-directory: | ||
| description: Directory passed to checkov via -d | ||
| required: false | ||
| type: string | ||
| default: infrastructure/terraform | ||
| soft-fail: | ||
| description: Whether to continue on Checkov violations | ||
| required: false | ||
| type: boolean | ||
| default: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| checkov: | ||
| name: Checkov | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| security-events: write | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Create logs directory | ||
| run: mkdir -p logs | ||
|
|
||
| # TODO(security): Pin bridgecrewio/checkov-action to a specific commit SHA | ||
| # via the dependency-pinning workflow before disabling soft-fail. | ||
| - name: Run Checkov | ||
| id: checkov | ||
|
nguyena2 marked this conversation as resolved.
|
||
| uses: bridgecrewio/checkov-action@38a95e98d734de90a74687a8d986d6b06107f342 # v12.2898.0 | ||
| continue-on-error: ${{ inputs.soft-fail }} | ||
| with: | ||
| directory: ${{ inputs.working-directory }} | ||
| framework: terraform | ||
| output_format: cli,sarif | ||
| output_file_path: console,logs/checkov.sarif | ||
| soft_fail: ${{ inputs.soft-fail }} | ||
| download_external_modules: false | ||
|
|
||
| - name: Upload SARIF to GitHub code scanning | ||
| if: always() | ||
| uses: github/codeql-action/upload-sarif@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4.35.2 | ||
| with: | ||
| sarif_file: logs/checkov.sarif | ||
| category: checkov | ||
|
|
||
| - name: Upload Checkov SARIF artifact | ||
| if: always() | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: checkov-sarif | ||
| path: logs/checkov.sarif | ||
| retention-days: 30 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| // ============================================================================= | ||
| // Staging Environment | ||
| // ============================================================================= | ||
| // Production-shaped (private networking, HA backend) but right-sized for | ||
| // pre-production validation. Smaller GPU footprint and F8 Fabric capacity. | ||
| // ============================================================================= | ||
|
|
||
| // Core Configuration | ||
| environment = "staging" | ||
| location = "westus3" | ||
| resource_prefix = "roboticsstg" | ||
| instance = "001" | ||
|
|
||
| // Resource Group | ||
| should_create_resource_group = true | ||
|
|
||
| // AKS System Node Pool | ||
| system_node_pool_vm_size = "Standard_D8ds_v5" | ||
| system_node_pool_node_count = 2 | ||
|
|
||
| // Single GPU pool with dedicated subnet | ||
| node_pools = { | ||
| rtxprogpu = { | ||
| vm_size = "Standard_NC128ds_xl_RTXPRO6000BSE_v6" | ||
| subnet_address_prefixes = ["10.0.7.0/24"] | ||
| node_taints = ["nvidia.com/gpu:NoSchedule"] | ||
| gpu_driver = "None" | ||
| node_labels = { | ||
| "nvidia.com/gpu.deploy.driver" = "false" | ||
| } | ||
| priority = "Regular" | ||
| should_enable_auto_scaling = true | ||
| min_count = 1 | ||
| max_count = 2 | ||
| zones = [] | ||
| } | ||
| } | ||
|
|
||
| // OSMO Backend Services with HA | ||
| should_deploy_postgresql = true | ||
| should_deploy_redis = true | ||
|
|
||
| // PostgreSQL HA | ||
| postgresql_sku_name = "GP_Standard_D2s_v3" | ||
| postgresql_high_availability = { | ||
| enabled = true | ||
| standby_availability_zone = "2" | ||
|
nguyena2 marked this conversation as resolved.
|
||
| } | ||
|
|
||
| // Redis HA | ||
| should_enable_redis_high_availability = true | ||
|
|
||
| // Network Security — Full Private | ||
| should_enable_private_endpoint = true | ||
| should_enable_private_aks_cluster = true | ||
|
|
||
| should_enable_public_network_access = false | ||
| should_add_current_user_key_vault_admin = true | ||
| should_enable_microsoft_defender = true | ||
| should_enable_purge_protection = false | ||
|
|
||
| // ============================================================================= | ||
| // Conversion Pipeline (Optional) | ||
| // ============================================================================= | ||
| // Pre-production posture: ZRS, private endpoints required, F8 capacity. | ||
| // Set should_deploy_conversion_pipeline = true to provision. | ||
| // ============================================================================= | ||
|
|
||
| should_deploy_conversion_pipeline = false | ||
| conversion_pipeline_config = { | ||
| storage_replication_type = "ZRS" | ||
| should_enable_public_network_access = false | ||
| should_enable_shared_key = false | ||
| should_enable_private_endpoint = true | ||
| should_create_fabric_capacity = true | ||
| should_create_fabric_workspace = false | ||
| fabric_capacity_sku = "F8" | ||
| raw_retention_days = 30 | ||
| converted_cool_days = 30 | ||
| converted_archive_days = 90 | ||
| should_enable_event_grid_dead_letter = true | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.