cortexapps-cli 1.38.0__tar.gz → 1.40.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/PKG-INFO +1 -1
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/solutions.py +109 -12
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/harness-deploy/setup.py +1 -1
- cortexapps_cli-1.40.0/cortexapps_cli/solutions/kubernetes-agent/README.md +137 -0
- cortexapps_cli-1.40.0/cortexapps_cli/solutions/terraform/README.md +255 -0
- cortexapps_cli-1.40.0/cortexapps_cli/solutions/terraform/_templates/terraform/ecommerce.tf +116 -0
- cortexapps_cli-1.40.0/cortexapps_cli/solutions/terraform/_templates/terraform/provider.tf +14 -0
- cortexapps_cli-1.40.0/cortexapps_cli/solutions/terraform/_templates/terraform/scorecards.tf +116 -0
- cortexapps_cli-1.40.0/cortexapps_cli/solutions/terraform/_templates/terraform/supply-chain.tf +113 -0
- cortexapps_cli-1.40.0/cortexapps_cli/solutions/terraform/_templates/terraform/teams.tf +125 -0
- cortexapps_cli-1.40.0/cortexapps_cli/solutions/terraform/_templates/terraform/terraform.tfvars.example +10 -0
- cortexapps_cli-1.40.0/cortexapps_cli/solutions/terraform/_templates/terraform/variables.tf +11 -0
- cortexapps_cli-1.40.0/cortexapps_cli/solutions/terraform/_templates/terraform-delta/ecommerce.tf +163 -0
- cortexapps_cli-1.40.0/cortexapps_cli/solutions/terraform/_templates/terraform-delta/teams.tf +130 -0
- cortexapps_cli-1.40.0/cortexapps_cli/solutions/terraform/setup.py +196 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/pyproject.toml +1 -1
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/LICENSE +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/README.rst +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/__init__.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/cli.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/command_options.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/ai_skills.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/api_keys.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/audit_logs.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/backup.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/backup_commands/cortex_export.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/catalog.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/custom_data.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/custom_events.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/custom_metrics.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/dependencies.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/deploys.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/discovery_audit.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/docs.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/entity_relationship_types.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/entity_relationships.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/entity_types.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/gitops_logs.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/groups.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/initiatives.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/apiiro.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/argocd.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/aws.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/azure_active_directory.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/azure_devops.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/azure_resources.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/bamboohr.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/bitbucket.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/bugsnag.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/buildkite.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/checkmarx_sast.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/circleci.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/clickup.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/codecov.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/coralogix.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/datadog.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/dynatrace.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/firehydrant.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/github.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/gitlab.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/harness.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/incidentio.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/instana.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/jenkins.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/jira.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/launchdarkly.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/mend_sast.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/mend_sca.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/newrelic.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/okta.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/opsgenie.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/pagerduty.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/prometheus.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/rollbar.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/rootly.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/semgrep.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/sentry.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/servicenow.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/servicenow_cloud_observability.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/snyk.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/sonarqube.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/splunk_observability_cloud.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/splunk_on_call.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/sumologic.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/veracode.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/wiz.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/workday.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/integrations_commands/xmatters.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/ip_allowlist.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/on_call.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/packages.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/packages_commands/go.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/packages_commands/java.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/packages_commands/node.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/packages_commands/nuget.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/packages_commands/python.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/plugins.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/queries.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/rest.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/scaffolders.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/scim.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/scorecards.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/scorecards_commands/exemptions.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/secrets.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/teams.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/users.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/users_commands/roles.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/commands/workflows.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/cortex_client.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/models/team.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/__init__.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/_lib/__init__.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/_lib/setup_base.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-agents/README.md +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-agents/catalog/address-reviews.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-agents/catalog/audit-flags.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-agents/catalog/code-review.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-agents/catalog/fix-issue.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-agents/catalog/incident-trends.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-agents/catalog/jira-to-kb.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-agents/catalog/release-to-sha.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-agents/catalog/search-troubleshooting-kb.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-agents/catalog/simplify-test.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-agents/entity-types/ai-agent.json +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-agents/scorecards/ai-agent-governance.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-skills/README.md +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-skills/catalog/api-doc-sync.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-skills/catalog/changelog-writer.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-skills/catalog/docs-generator.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-skills/catalog/docs-portal.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-skills/entity-relationship-types/ai-plugin-service.json +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-skills/entity-relationship-types/ai-plugin-skills.json +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-skills/entity-relationship-types/ai-skill-service.json +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-skills/entity-types/ai-plugin.json +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-skills/entity-types/ai-skill.json +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-skills/scorecards/ai-skills-quality.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-spend/.github/workflows/sync-claude-spend.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-spend/README.md +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-spend/catalog/employee-alice-chen.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-spend/catalog/employee-bob-martinez.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-spend/catalog/employee-carol-kim.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-spend/catalog/employee-david-osei.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-spend/catalog/employee-emma-johnson.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-spend/catalog/team-data.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-spend/catalog/team-engineering.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-spend/catalog/team-frontend.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-spend/catalog/team-platform.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-spend/custom-metrics/ai-spend.json +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-spend/entity-relationship-types/team-member.json +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-spend/entity-types/employee.json +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-spend/plugins/team-ai-spend.json +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-spend/scorecards/ai-spend-scorecard.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/ai-spend/scripts/sync-claude-spend.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/.github/workflows/cortex-service-version.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/README.md +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/api-gateway-3.0.1.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/api-gateway-3.1.0.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/api-gateway-3.1.1.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/api-gateway.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/auth-2.1.0.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/auth-2.1.1.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/auth-2.2.0.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/auth.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/aws-dev-us-west-2.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/billing-1.1.0.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/billing-1.2.0.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/billing.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/cart-1.0.2.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/cart.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/checkout-2.2.0.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/checkout-2.3.0.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/checkout-2.4.0.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/checkout.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/gcp-prod-us-east-1.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/gcp-prod-us-west-1.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/gcp-staging-us-east-1.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/notifications-1.0.0.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/notifications-1.0.1.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/notifications-1.1.0.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/notifications.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/order-service-2.0.1.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/order-service-2.1.0.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/order-service.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/payments-1.6.1.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/payments-1.7.0.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/payments-1.7.1.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/payments.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/release-2026-06-20.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/release-2026-07-01.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/release-2026-07-09.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/release-2026-07-10.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/search-4.0.0.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/search-4.1.0.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/search.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/user-service-1.2.0.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/user-service-1.3.0.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/catalog/user-service.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/entity-relationship-types/environments.json +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/entity-relationship-types/versions.json +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/entity-types/environment.json +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/entity-types/release.json +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/entity-types/service-version.json +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/workflows/create-environment.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/workflows/create-release.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/environments/workflows/trigger-github-release.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/github-actions-deploy/README.md +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/github-actions-deploy/_templates/cortex-async-callback.yml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/github-actions-deploy/_templates/cortex-deploy.yml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/github-actions-deploy/_templates/cortex-register-deploy.yml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/github-actions-deploy/_templates/github-actions-deploy.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/github-actions-deploy/catalog/github-actions-demo.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/github-actions-deploy/scorecards/deploy-health.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/github-actions-deploy/setup.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/harness-deploy/README.md +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/harness-deploy/_templates/cortex-async-callback-template.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/harness-deploy/_templates/cortex-deploy-pipeline.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/harness-deploy/_templates/cortex-record-deploy-template.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/harness-deploy/_templates/trigger-harness-deploy.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/harness-deploy/catalog/harness-demo.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/harness-deploy/scorecards/deploy-health.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/jenkins-deploy/README.md +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/jenkins-deploy/_templates/Jenkinsfile +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/jenkins-deploy/_templates/trigger-jenkins-deploy.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/jenkins-deploy/catalog/jenkins-demo.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/jenkins-deploy/scorecards/deploy-health.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/jenkins-deploy/setup.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/monorepo/README.md +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/monorepo/catalog/cli-commands.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/monorepo/catalog/cli-core.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/monorepo/catalog/cli-docker.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/monorepo/catalog/cli-solutions.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/monorepo/catalog/cli-tests.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/monorepo/scorecards/monorepo-component-health.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/monorepo/services/cli-commands/README.md +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/monorepo/services/cli-commands/cortex.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/monorepo/services/cli-commands/src/commands.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/monorepo/services/cli-core/README.md +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/monorepo/services/cli-core/cortex.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/monorepo/services/cli-core/src/cli.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/monorepo/services/cli-docker/Dockerfile +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/monorepo/services/cli-docker/README.md +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/monorepo/services/cli-docker/cortex.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/monorepo/services/cli-solutions/README.md +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/monorepo/services/cli-solutions/cortex.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/monorepo/services/cli-solutions/src/solutions.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/monorepo/services/cli-tests/README.md +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/monorepo/services/cli-tests/cortex.yaml +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/monorepo/services/cli-tests/src/test_cli.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/monorepo/setup.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/workday/README.md +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/workday/data/configuration.json +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/workday/data/pied-piper-supervisory-org.json +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/workday/setup.py +0 -0
- {cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/utils.py +0 -0
|
@@ -568,7 +568,84 @@ def _apply_hyperlinks(line: str, entity_tags: set[str], ui_url: str) -> str:
|
|
|
568
568
|
return "".join(parts)
|
|
569
569
|
|
|
570
570
|
|
|
571
|
-
|
|
571
|
+
_GITHUB_BLOB = "https://github.com/cortexapps/cli/blob/main/cortexapps_cli/solutions"
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
def _parse_tf_tags_by_type(solution_dir: Path) -> tuple[set[str], set[str]]:
|
|
575
|
+
"""Scan *.tf files under _templates/<solution>/ and return (entity_tags, scorecard_tags)."""
|
|
576
|
+
entity_tags: set[str] = set()
|
|
577
|
+
scorecard_tags: set[str] = set()
|
|
578
|
+
templates = next(
|
|
579
|
+
(d for d in (solution_dir / "_templates").iterdir() if d.is_dir() and not d.name.endswith("-delta")),
|
|
580
|
+
None,
|
|
581
|
+
) if (solution_dir / "_templates").exists() else None
|
|
582
|
+
if templates is None:
|
|
583
|
+
return entity_tags, scorecard_tags
|
|
584
|
+
for tf in templates.glob("*.tf"):
|
|
585
|
+
current_type: str | None = None
|
|
586
|
+
depth = 0
|
|
587
|
+
for line in tf.read_text(encoding="utf-8").split("\n"):
|
|
588
|
+
m = re.match(r'\s*resource\s+"(cortex_\w+)"\s+"[^"]+"\s*\{', line)
|
|
589
|
+
if m:
|
|
590
|
+
current_type = m.group(1)
|
|
591
|
+
depth = 1
|
|
592
|
+
continue
|
|
593
|
+
if current_type:
|
|
594
|
+
depth += line.count("{") - line.count("}")
|
|
595
|
+
if depth <= 0:
|
|
596
|
+
current_type = None
|
|
597
|
+
depth = 0
|
|
598
|
+
continue
|
|
599
|
+
tm = re.search(r'\btag\s*=\s*"([^"]+)"', line)
|
|
600
|
+
if tm:
|
|
601
|
+
if current_type == "cortex_catalog_entity":
|
|
602
|
+
entity_tags.add(tm.group(1))
|
|
603
|
+
elif current_type == "cortex_scorecard":
|
|
604
|
+
scorecard_tags.add(tm.group(1))
|
|
605
|
+
return entity_tags, scorecard_tags
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
def _extract_tf_entity_tags(solution_dir: Path) -> set[str]:
|
|
609
|
+
"""Return only cortex_catalog_entity tags from .tf template files."""
|
|
610
|
+
entity_tags, _ = _parse_tf_tags_by_type(solution_dir)
|
|
611
|
+
return entity_tags
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
def _apply_file_hyperlinks(line: str, solution_tag: str) -> str:
|
|
616
|
+
"""Replace bare filenames in the diagram with OSC 8 links to GitHub blob URLs."""
|
|
617
|
+
base = f"{_GITHUB_BLOB}/{solution_tag}/_templates/{solution_tag}"
|
|
618
|
+
parts = []
|
|
619
|
+
i = 0
|
|
620
|
+
while i < len(line):
|
|
621
|
+
# Look for a word boundary start: not alphanumeric/hyphen/dot before current pos
|
|
622
|
+
for filename in sorted(
|
|
623
|
+
(f for f in [
|
|
624
|
+
"teams.tf", "ecommerce.tf", "supply-chain.tf", "scorecards.tf",
|
|
625
|
+
"provider.tf", "variables.tf", "terraform.tfvars",
|
|
626
|
+
] if line.find(f, i) == i),
|
|
627
|
+
key=len, reverse=True,
|
|
628
|
+
):
|
|
629
|
+
after = i + len(filename)
|
|
630
|
+
# Ensure word boundary after: next char must not be alphanumeric
|
|
631
|
+
if after < len(line) and (line[after].isalnum() or line[after] in "-_."):
|
|
632
|
+
continue
|
|
633
|
+
parts.append(_osc8(f"{base}/{filename}", filename))
|
|
634
|
+
i = after
|
|
635
|
+
break
|
|
636
|
+
else:
|
|
637
|
+
parts.append(line[i])
|
|
638
|
+
i += 1
|
|
639
|
+
return "".join(parts)
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
def _show_diagram(
|
|
644
|
+
readme: str,
|
|
645
|
+
entity_tags: set[str] | None = None,
|
|
646
|
+
ui_url: str = "https://app.getcortexapp.com",
|
|
647
|
+
solution_tag: str = "",
|
|
648
|
+
) -> None:
|
|
572
649
|
block = _extract_first_codeblock(readme)
|
|
573
650
|
if not block:
|
|
574
651
|
return
|
|
@@ -577,23 +654,26 @@ def _show_diagram(readme: str, entity_tags: set[str] | None = None, ui_url: str
|
|
|
577
654
|
|
|
578
655
|
print()
|
|
579
656
|
for line in block.split("\n"):
|
|
580
|
-
if
|
|
581
|
-
|
|
657
|
+
if links_supported:
|
|
658
|
+
if entity_tags:
|
|
659
|
+
line = _apply_hyperlinks(line, entity_tags, ui_url)
|
|
660
|
+
if solution_tag:
|
|
661
|
+
line = _apply_file_hyperlinks(line, solution_tag)
|
|
582
662
|
# Use print() not console.print(): Rich counts OSC 8 escape bytes as
|
|
583
663
|
# visible characters, shifting ASCII art alignment.
|
|
584
664
|
print(f" {line}")
|
|
585
665
|
|
|
586
666
|
if entity_tags and not links_supported:
|
|
587
|
-
|
|
667
|
+
entity_rows = sorted(
|
|
588
668
|
(tag for tag in entity_tags if tag in block),
|
|
589
669
|
key=lambda t: t.lower(),
|
|
590
670
|
)
|
|
591
|
-
if
|
|
671
|
+
if entity_rows:
|
|
592
672
|
print()
|
|
593
673
|
table = Table(show_header=True, header_style="bold", box=None, padding=(0, 2, 0, 0))
|
|
594
674
|
table.add_column("Entity")
|
|
595
675
|
table.add_column("URL")
|
|
596
|
-
for tag in
|
|
676
|
+
for tag in entity_rows:
|
|
597
677
|
table.add_row(tag, f"{ui_url}/admin/resources?tag={tag}")
|
|
598
678
|
console.print(table)
|
|
599
679
|
|
|
@@ -612,18 +692,21 @@ def _post_install_menu(
|
|
|
612
692
|
import_report: str = "",
|
|
613
693
|
entity_tags: set[str] | None = None,
|
|
614
694
|
ui_url: str = "https://app.getcortexapp.com",
|
|
695
|
+
solution_tag: str = "",
|
|
615
696
|
) -> None:
|
|
616
697
|
options = [
|
|
617
698
|
("1", "Data Model"),
|
|
618
699
|
("2", "Next steps"),
|
|
619
|
-
("3", "Import report"),
|
|
620
|
-
("4", "Exit"),
|
|
621
700
|
]
|
|
622
701
|
actions = {
|
|
623
|
-
"1": lambda: _show_diagram(readme, entity_tags=entity_tags, ui_url=ui_url),
|
|
702
|
+
"1": lambda: _show_diagram(readme, entity_tags=entity_tags, ui_url=ui_url, solution_tag=solution_tag),
|
|
624
703
|
"2": lambda: _show_next_steps(readme),
|
|
625
|
-
"3": lambda: (console.print(), typer.echo(import_report)),
|
|
626
704
|
}
|
|
705
|
+
if import_report:
|
|
706
|
+
options.append(("3", "Import report"))
|
|
707
|
+
actions["3"] = lambda: (console.print(), typer.echo(import_report))
|
|
708
|
+
exit_key = str(len(options) + 1)
|
|
709
|
+
options.append((exit_key, "Exit"))
|
|
627
710
|
|
|
628
711
|
while True:
|
|
629
712
|
console.print()
|
|
@@ -634,7 +717,7 @@ def _post_install_menu(
|
|
|
634
717
|
|
|
635
718
|
choice = Prompt.ask("Choice", choices=[k for k, _ in options], show_choices=False)
|
|
636
719
|
|
|
637
|
-
if choice ==
|
|
720
|
+
if choice == exit_key:
|
|
638
721
|
break
|
|
639
722
|
actions[choice]()
|
|
640
723
|
|
|
@@ -731,9 +814,23 @@ def install(
|
|
|
731
814
|
with as_file(root / solution) as sp:
|
|
732
815
|
resources = _collect_solution_resources(sp)
|
|
733
816
|
entity_tags = set(resources.get("catalog", []))
|
|
817
|
+
if solutions_dir:
|
|
818
|
+
entity_tags |= _extract_tf_entity_tags(root / solution)
|
|
819
|
+
else:
|
|
820
|
+
with as_file(root / solution) as sp:
|
|
821
|
+
entity_tags |= _extract_tf_entity_tags(sp)
|
|
734
822
|
except Exception:
|
|
735
823
|
pass
|
|
736
|
-
|
|
824
|
+
has_import_results = bool(
|
|
825
|
+
total_match and (int(total_match.group(1)) > 0 or int(total_match.group(2)) > 0)
|
|
826
|
+
)
|
|
827
|
+
_post_install_menu(
|
|
828
|
+
readme,
|
|
829
|
+
import_report=output if has_import_results else "",
|
|
830
|
+
entity_tags=entity_tags,
|
|
831
|
+
ui_url=ui_url,
|
|
832
|
+
solution_tag=solution,
|
|
833
|
+
)
|
|
737
834
|
|
|
738
835
|
|
|
739
836
|
@app.command(name="post-install")
|
{cortexapps_cli-1.38.0 → cortexapps_cli-1.40.0}/cortexapps_cli/solutions/harness-deploy/setup.py
RENAMED
|
@@ -231,7 +231,7 @@ class HarnessDeploySetup(SolutionSetup):
|
|
|
231
231
|
base_url = self._answers["cortex_base_url"].rstrip("/")
|
|
232
232
|
app_url = base_url.replace("api.", "app.", 1) if "api." in base_url else base_url
|
|
233
233
|
entity_tag = self._answers["entity_tag"]
|
|
234
|
-
cortex_url = f"{app_url}/admin/resources?tag={entity_tag}"
|
|
234
|
+
cortex_url = f"{app_url}/admin/resources?tag={entity_tag}"
|
|
235
235
|
|
|
236
236
|
harness_pipeline_url = (
|
|
237
237
|
f"{self._harness_base()}/ng/account/{self._harness_account()}"
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Kubernetes Agent
|
|
3
|
+
description: Deploy the Cortex Kubernetes agent to a kind cluster in a GitHub Codespace, or to any existing Kubernetes cluster, to demonstrate live workload discovery and k8s integration.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Kubernetes Agent Solution
|
|
7
|
+
|
|
8
|
+
Demonstrates the [Cortex Kubernetes agent](https://docs.cortex.io/docs/reference/integrations/kubernetes) integration. Supports two deployment paths:
|
|
9
|
+
|
|
10
|
+
- **GitHub Codespace** — creates a Codespace with a local [kind](https://kind.sigs.k8s.io) cluster automatically (no cluster setup required)
|
|
11
|
+
- **Existing cluster** — deploys to any Kubernetes cluster already configured in your `kubectl` context
|
|
12
|
+
|
|
13
|
+
## What this installs
|
|
14
|
+
|
|
15
|
+
- **Cortex k8s-agent** — connects your cluster to Cortex and syncs workload metadata
|
|
16
|
+
- **Demo workloads** — Deployment, StatefulSet, CronJob, and Argo Rollout, all tagged `demo-kubernetes`
|
|
17
|
+
- **demo-kubernetes** — a Cortex service entity that the workloads annotate to
|
|
18
|
+
|
|
19
|
+
After setup, visit your entity's K8s tab to see live workload data synced from the cluster.
|
|
20
|
+
|
|
21
|
+
## Data Model
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
GitHub Codespace
|
|
25
|
+
┌──────────────────────────────────────────────────────────┐
|
|
26
|
+
│ kind cluster (cortex-demo) │
|
|
27
|
+
│ ┌────────────────────────────────────────────────────┐ │
|
|
28
|
+
│ │ │ │
|
|
29
|
+
│ │ ┌─────────────────┐ ┌──────────────────────┐ │ │
|
|
30
|
+
│ │ │ Kubernetes API │◀──│ cortex-k8s-agent │ │ │
|
|
31
|
+
│ │ │ Server │ │ (polls every 5 min) │ │ │
|
|
32
|
+
│ │ └─────────────────┘ └──────────┬───────────┘ │ │
|
|
33
|
+
│ │ │ HTTPS push │ │
|
|
34
|
+
│ │ ┌──────────────────────────────┐ │ │ │
|
|
35
|
+
│ │ │ demo workloads │ │ │ │
|
|
36
|
+
│ │ │ Deployment · StatefulSet │ │ │ │
|
|
37
|
+
│ │ │ CronJob · Argo Rollout │ │ │ │
|
|
38
|
+
│ │ └──────────────────────────────┘ │ │ │
|
|
39
|
+
│ └────────────────────────────────────────────────────┘ │
|
|
40
|
+
└──────────────────────────────────┬───────────────────────┘
|
|
41
|
+
▼
|
|
42
|
+
┌─────────────────┐
|
|
43
|
+
│ Cortex │
|
|
44
|
+
│ Platform │
|
|
45
|
+
└─────────────────┘
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The agent runs inside the cluster as a Deployment. Every 5 minutes it queries the Kubernetes API for workload resources and pushes the metadata to Cortex over HTTPS. Cortex surfaces the data on each entity's K8s tab.
|
|
49
|
+
|
|
50
|
+
## Prerequisites
|
|
51
|
+
|
|
52
|
+
- A Cortex API key (`CORTEX_API_KEY`) — get from Cortex Settings → API Keys
|
|
53
|
+
- A GitHub PAT provided by Cortex Customer Engineering (`GHCR_TOKEN`) — required to pull the k8s-agent image; see [Kubernetes prerequisites](https://docs.cortex.io/ingesting-data-into-cortex/integrations/kubernetes#prerequisites)
|
|
54
|
+
|
|
55
|
+
**For the GitHub Codespace path only:**
|
|
56
|
+
- The [gh CLI](https://cli.github.com) installed and authenticated (`gh auth login`)
|
|
57
|
+
|
|
58
|
+
**For the existing cluster path only:**
|
|
59
|
+
- `kubectl`, `helm` installed and configured to reach your cluster
|
|
60
|
+
|
|
61
|
+
## Quick start
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
cortex solutions install -s kubernetes-agent
|
|
65
|
+
cortex solutions post-install -s kubernetes-agent
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The setup script will ask which path you want:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
Create a new GitHub Codespace with a kind cluster? (yes = spin up Codespace, no = use an existing configured cluster) [yes]:
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### GitHub Codespace path
|
|
75
|
+
|
|
76
|
+
The script will:
|
|
77
|
+
1. Create a Codespace from the `cortexapps/cli` repository using the `kubernetes-agent` devcontainer
|
|
78
|
+
2. Wait for the Codespace to start and the kind cluster to initialize (~15-20 min on first run)
|
|
79
|
+
3. Deploy the k8s-agent and demo workloads inside the Codespace via `gh codespace ssh`
|
|
80
|
+
|
|
81
|
+
After setup, the Codespace URL and `gh codespace ssh` command are printed.
|
|
82
|
+
|
|
83
|
+
### Existing cluster path
|
|
84
|
+
|
|
85
|
+
Requires `kubectl` pointed at a running cluster. The script deploys the k8s-agent and demo workloads into whatever namespace your current context targets.
|
|
86
|
+
|
|
87
|
+
## What you should see
|
|
88
|
+
|
|
89
|
+
After the agent's first sync (~5 min), visit:
|
|
90
|
+
`https://app.getcortexapp.com/admin/resources?tag=demo-kubernetes`
|
|
91
|
+
|
|
92
|
+
- `demo-deployment` (Deployment)
|
|
93
|
+
- `demo-statefulset` (StatefulSet)
|
|
94
|
+
- `demo-cronjob` (CronJob)
|
|
95
|
+
- `demo-rollout` (Argo Rollout — containers resolved from `demo-deployment`)
|
|
96
|
+
|
|
97
|
+
## Troubleshooting
|
|
98
|
+
|
|
99
|
+
**No K8s details showing on the entity page after the first sync**
|
|
100
|
+
|
|
101
|
+
If you have configured [K8s metadata label customization](https://docs.cortex.io/ingesting-data-into-cortex/integrations/kubernetes#auto-mapping-customization) in your Cortex settings (Settings → Kubernetes → Metadata labels), Cortex uses *only* those labels for resource mapping and ignores the `cortex.io/tag` annotation used by the demo manifests. Either:
|
|
102
|
+
|
|
103
|
+
- Remove the metadata label customization to use the default annotation-based mapping, or
|
|
104
|
+
- Add a matching label (e.g., `app: demo-kubernetes`) to the demo manifests
|
|
105
|
+
|
|
106
|
+
## Re-running setup
|
|
107
|
+
|
|
108
|
+
The setup script is idempotent — re-run `cortex solutions post-install -s kubernetes-agent` to retry any failed step. Completed steps are skipped.
|
|
109
|
+
|
|
110
|
+
For the Codespace path, the Codespace name is saved locally so re-runs reconnect to the same Codespace rather than creating a new one.
|
|
111
|
+
|
|
112
|
+
## After Installing
|
|
113
|
+
|
|
114
|
+
Once you have verified the agent working against the demo cluster, roll it out to your real clusters:
|
|
115
|
+
|
|
116
|
+
1. **Install the Cortex Kubernetes agent Helm chart into each cluster** for which you want data associated with your Cortex entities. Give each cluster a distinct `clusterName` — this is how Cortex identifies which cluster a workload belongs to:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
helm upgrade --install cortex-k8s-agent \
|
|
120
|
+
oci://ghcr.io/cortexapps/k8s-agent/helm/cortex-k8s-agent \
|
|
121
|
+
--set app.apiKey=<your-cortex-api-key> \
|
|
122
|
+
--set app.clusterName=<name-as-it-appears-in-cortex> \
|
|
123
|
+
--set app.baseUrl=https://api.getcortexapp.com
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
2. **Ensure your Kubernetes workloads have the appropriate annotation or label** so Cortex can map them to your catalog entities:
|
|
127
|
+
|
|
128
|
+
- **Annotation** (default): add `cortex.io/tag: <entity-tag>` to each workload's metadata
|
|
129
|
+
- **Label** (if you have configured K8s metadata label customization in Cortex Settings): add the configured label key with the entity tag as the value, e.g. `app: <entity-tag>`
|
|
130
|
+
|
|
131
|
+
3. **Wait for the first sync** (~5 min) then visit each entity's K8s tab in Cortex to confirm workload data is flowing.
|
|
132
|
+
|
|
133
|
+
See the [Cortex Kubernetes integration docs](https://docs.cortex.io/ingesting-data-into-cortex/integrations/kubernetes) for full configuration options including namespace filtering, custom resource types, and RBAC setup.
|
|
134
|
+
|
|
135
|
+
## Temporary limitation
|
|
136
|
+
|
|
137
|
+
The k8s-agent image is currently private on GHCR, requiring `GHCR_TOKEN`. This requirement will be removed once the image is made public.
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Terraform
|
|
3
|
+
description: Manage your Cortex catalog as code using the Cortex Terraform provider.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Terraform
|
|
7
|
+
|
|
8
|
+
The [Cortex Terraform provider](https://github.com/cortexapps/terraform-provider-cortex) lets you define your entire service catalog — teams, services, domains, scorecards — as HCL code in `.tf` files. Changes go through PR review and apply automatically on merge, giving you a fully auditable, GitOps-driven catalog.
|
|
9
|
+
|
|
10
|
+
## Data Model
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
┌──────────────────────────────────────────────────────┐
|
|
14
|
+
│ Terraform Repo │
|
|
15
|
+
│ │
|
|
16
|
+
│ teams.tf scorecards.tf │
|
|
17
|
+
│ ecommerce.tf provider.tf │
|
|
18
|
+
│ supply-chain.tf variables.tf │
|
|
19
|
+
└─────────────────────────────┬────────────────────────┘
|
|
20
|
+
│
|
|
21
|
+
│ terraform apply
|
|
22
|
+
│
|
|
23
|
+
▼
|
|
24
|
+
┌──────────────────────────────────────────────────────┐
|
|
25
|
+
│ Cortex Catalog │
|
|
26
|
+
│ │
|
|
27
|
+
│ Teams │
|
|
28
|
+
│ ┌────────────────────────────────────────────────┐ │
|
|
29
|
+
│ │ terraform-demo-team-development │ │
|
|
30
|
+
│ │ terraform-demo-team-operations │ │
|
|
31
|
+
│ │ terraform-demo-team-security │ │
|
|
32
|
+
│ │ terraform-demo-team-qa │ │
|
|
33
|
+
│ └────────────────────────────────────────────────┘ │
|
|
34
|
+
│ │
|
|
35
|
+
│ Domains │
|
|
36
|
+
│ ┌────────────────────────────────────────────────┐ │
|
|
37
|
+
│ │ terraform-demo-domain-ecommerce │ │
|
|
38
|
+
│ │ terraform-demo-domain-supply-chain │ │
|
|
39
|
+
│ └────────────────────────────────────────────────┘ │
|
|
40
|
+
│ │
|
|
41
|
+
│ Services │
|
|
42
|
+
│ ┌────────────────────────────────────────────────┐ │
|
|
43
|
+
│ │ terraform-demo-phoenix │ │
|
|
44
|
+
│ │ terraform-demo-parts-catalog-api │ │
|
|
45
|
+
│ │ terraform-demo-payments-service │ │
|
|
46
|
+
│ │ terraform-demo-inventory-service │ │
|
|
47
|
+
│ │ terraform-demo-ordering-service │ │
|
|
48
|
+
│ │ terraform-demo-shipping-service │ │
|
|
49
|
+
│ └────────────────────────────────────────────────┘ │
|
|
50
|
+
│ │
|
|
51
|
+
│ Scorecard │
|
|
52
|
+
│ ┌────────────────────────────────────────────────┐ │
|
|
53
|
+
│ │ terraform-demo-production-readiness │ │
|
|
54
|
+
│ └────────────────────────────────────────────────┘ │
|
|
55
|
+
└──────────────────────────────────────────────────────┘
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## What is HCL?
|
|
59
|
+
|
|
60
|
+
HCL (HashiCorp Configuration Language) is the declarative language used in `.tf` files. It reads like structured config rather than code:
|
|
61
|
+
|
|
62
|
+
```hcl
|
|
63
|
+
resource "cortex_catalog_entity" "phoenix" {
|
|
64
|
+
tag = "terraform-demo-phoenix"
|
|
65
|
+
name = "The Phoenix Project"
|
|
66
|
+
description = "Main e-commerce monolith for Parts Unlimited."
|
|
67
|
+
|
|
68
|
+
owners = [{ name = "terraform-demo-team-development", type = "group", provider = "CORTEX" }]
|
|
69
|
+
|
|
70
|
+
git = {
|
|
71
|
+
github = { repository = "parts-unlimited/phoenix" }
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Terraform reads all `.tf` files in a directory, compares them to the current live state, and applies only what changed.
|
|
77
|
+
|
|
78
|
+
## Terraform vs. cortex.yaml — two flavors of GitOps
|
|
79
|
+
|
|
80
|
+
Both approaches keep your catalog in git and apply changes on merge. The difference is where the files live:
|
|
81
|
+
|
|
82
|
+
| | Terraform | cortex.yaml |
|
|
83
|
+
|---|---|---|
|
|
84
|
+
| **Files live in** | One central infra repo | Each service's own repo |
|
|
85
|
+
| **Managed by** | Platform / infra team | Individual service teams |
|
|
86
|
+
| **Also manages** | AWS, GCP, everything else | Just Cortex catalog |
|
|
87
|
+
| **Apply mechanism** | CI runs `terraform apply` | Cortex git integration polls files |
|
|
88
|
+
|
|
89
|
+
Neither is better. Platform teams who already manage cloud infrastructure with Terraform often prefer the centralized approach. Dev teams who want catalog config alongside their code prefer cortex.yaml.
|
|
90
|
+
|
|
91
|
+
## File ownership at scale
|
|
92
|
+
|
|
93
|
+
Terraform has no requirements on file names — it reads all `.tf` files in a directory and merges them. This means you can split by team or domain ownership:
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
infra-catalog/
|
|
97
|
+
├── provider.tf ← platform team
|
|
98
|
+
├── teams.tf ← platform team
|
|
99
|
+
├── scorecards.tf ← platform team
|
|
100
|
+
├── ecommerce.tf ← e-commerce team (domain + services)
|
|
101
|
+
├── supply-chain.tf ← supply chain team (domain + services)
|
|
102
|
+
└── payments.tf ← payments team
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Each team submits PRs touching only their file. At very large scale (100K+ services), teams use Terraform modules (subdirectories) to organize further — but the ownership model is the same.
|
|
106
|
+
|
|
107
|
+
## What's Included
|
|
108
|
+
|
|
109
|
+
This solution installs a demo org for **Parts Unlimited** (from *The Phoenix Project*):
|
|
110
|
+
|
|
111
|
+
- **4 teams**: Development (Bill's team), IT Operations (Brent's domain), Information Security (John's team), QA
|
|
112
|
+
- **2 domains**: E-Commerce, Supply Chain
|
|
113
|
+
- **6 services**: The Phoenix Project, Parts Catalog API, Payments Service, Inventory Service, Ordering Service, Shipping Service
|
|
114
|
+
- **1 scorecard**: Terraform Demo Production Readiness (Bronze/Silver/Gold)
|
|
115
|
+
|
|
116
|
+
All services start at **Bronze** — intentionally incomplete so you can see the delta in action.
|
|
117
|
+
|
|
118
|
+
## Prerequisites
|
|
119
|
+
|
|
120
|
+
- Terraform >= 1.5 — install at https://developer.hashicorp.com/terraform/install
|
|
121
|
+
- Cortex API key with write access
|
|
122
|
+
|
|
123
|
+
## Install
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
cortex solutions post-install -s terraform
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
You'll be asked where to create the working directory (default: `~/parts-unlimited-terraform`). The script will:
|
|
130
|
+
1. Verify Terraform is installed
|
|
131
|
+
2. Copy the `.tf` files to your working directory
|
|
132
|
+
3. Write your credentials to `terraform.tfvars`
|
|
133
|
+
4. Run `terraform init` to download the Cortex provider
|
|
134
|
+
5. Run `terraform apply` to create all entities in Cortex
|
|
135
|
+
|
|
136
|
+
## After Installing
|
|
137
|
+
|
|
138
|
+
Terraform created 13 entities in your Cortex catalog: 4 teams, 2 domains, and 6 services — all tagged with the `terraform-demo` group.
|
|
139
|
+
|
|
140
|
+
**Create a catalog to filter to the demo entities**
|
|
141
|
+
|
|
142
|
+
1. Go to [Catalogs](https://app.getcortexapp.com/admin/catalogs) → **New Catalog**
|
|
143
|
+
2. Name it **Terraform Demo**
|
|
144
|
+
3. Set the catalog filter:
|
|
145
|
+
- **Entity type:** `service`
|
|
146
|
+
- **Advanced options → Groups → Include:** `terraform-demo`
|
|
147
|
+
|
|
148
|
+
**Open the scorecard**
|
|
149
|
+
|
|
150
|
+
Open [Scorecards](https://app.getcortexapp.com/admin/scorecards) and find **Terraform Demo Production Readiness** to see all 6 services at Bronze.
|
|
151
|
+
|
|
152
|
+
### Try the Delta
|
|
153
|
+
|
|
154
|
+
The delta shows what a real team PR looks like — modify a file, plan, apply, watch the scorecard update.
|
|
155
|
+
|
|
156
|
+
**Step 1: Copy the delta files into your working directory**
|
|
157
|
+
|
|
158
|
+
The exact delta file paths were printed when you ran `cortex solutions post-install -s terraform`. Copy the delta files shown there to your working directory.
|
|
159
|
+
|
|
160
|
+
**Step 2: See what will change**
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
cd ~/parts-unlimited-terraform
|
|
164
|
+
terraform plan
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
You'll see:
|
|
168
|
+
- `~ cortex_catalog_entity.phoenix` — **update** (adds links, metadata to `terraform-demo-phoenix`)
|
|
169
|
+
- `+ cortex_catalog_entity.notification_service` — **create** (`terraform-demo-notification-service`)
|
|
170
|
+
- `~ cortex_catalog_entity.team_development` — **update** (new member on `terraform-demo-team-development`)
|
|
171
|
+
|
|
172
|
+
**Step 3: Apply**
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
terraform apply
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**Step 4: Check the scorecard**
|
|
179
|
+
|
|
180
|
+
Open [Scorecards](https://app.getcortexapp.com/admin/scorecards) and find **Terraform Demo Production Readiness** in Cortex. The Phoenix Project should now show **Silver**. Also check that the new **Notification Service** appears in your catalog.
|
|
181
|
+
|
|
182
|
+
## File Walkthrough
|
|
183
|
+
|
|
184
|
+
**`provider.tf`** — Declares the `cortexapps/cortex` provider version and reads credentials from variables. This is the only file that changes if you upgrade the provider version.
|
|
185
|
+
|
|
186
|
+
**`variables.tf`** — Defines `cortex_api_token` (sensitive) and `cortex_base_url`. Values come from `terraform.tfvars` (never committed) or environment variables (`CORTEX_API_TOKEN`, `CORTEX_API_URL`).
|
|
187
|
+
|
|
188
|
+
**`teams.tf`** — Owned by the platform team. Defines all teams and their members. Changes here require a platform PR.
|
|
189
|
+
|
|
190
|
+
**`ecommerce.tf`** — Owned by the e-commerce team. Defines the E-Commerce domain and its three services. Changes here — new services, updated descriptions, added links — are the e-commerce team's PR to make.
|
|
191
|
+
|
|
192
|
+
**`supply-chain.tf`** — Same pattern, owned by the supply chain team.
|
|
193
|
+
|
|
194
|
+
**`scorecards.tf`** — Owned by the platform team. Defines the Terraform Demo Production Readiness scorecard and its Bronze/Silver/Gold rules.
|
|
195
|
+
|
|
196
|
+
## Customizing for Your Org
|
|
197
|
+
|
|
198
|
+
1. Rename entity tags and display names throughout
|
|
199
|
+
2. Replace `parts-unlimited/*` GitHub repos with your actual repos
|
|
200
|
+
3. Add more services: copy any service block from `ecommerce.tf` and adjust the tag, name, and owner
|
|
201
|
+
4. Extend scorecard rules: add rules to `scorecards.tf` with the expression language shown in the [Cortex docs](https://docs.cortex.io/docs/reference/scorecard-rules)
|
|
202
|
+
5. Split into more files as your team grows — Terraform reads them all
|
|
203
|
+
|
|
204
|
+
## Next Steps: CI/CD Integration
|
|
205
|
+
|
|
206
|
+
In practice, customers commit their `.tf` files to a repo and let CI handle applies. Here's a minimal GitHub Actions workflow:
|
|
207
|
+
|
|
208
|
+
```yaml
|
|
209
|
+
# .github/workflows/cortex-catalog.yml
|
|
210
|
+
name: Cortex Catalog
|
|
211
|
+
|
|
212
|
+
on:
|
|
213
|
+
pull_request:
|
|
214
|
+
paths: ['catalog/**']
|
|
215
|
+
push:
|
|
216
|
+
branches: [main]
|
|
217
|
+
paths: ['catalog/**']
|
|
218
|
+
|
|
219
|
+
jobs:
|
|
220
|
+
plan:
|
|
221
|
+
if: github.event_name == 'pull_request'
|
|
222
|
+
runs-on: ubuntu-latest
|
|
223
|
+
steps:
|
|
224
|
+
- uses: actions/checkout@v4
|
|
225
|
+
- uses: hashicorp/setup-terraform@v3
|
|
226
|
+
with:
|
|
227
|
+
terraform_version: "~> 1.5"
|
|
228
|
+
- run: terraform init
|
|
229
|
+
working-directory: catalog
|
|
230
|
+
env:
|
|
231
|
+
TF_VAR_cortex_api_token: ${{ secrets.CORTEX_API_TOKEN }}
|
|
232
|
+
- run: terraform plan
|
|
233
|
+
working-directory: catalog
|
|
234
|
+
env:
|
|
235
|
+
TF_VAR_cortex_api_token: ${{ secrets.CORTEX_API_TOKEN }}
|
|
236
|
+
|
|
237
|
+
apply:
|
|
238
|
+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
239
|
+
runs-on: ubuntu-latest
|
|
240
|
+
steps:
|
|
241
|
+
- uses: actions/checkout@v4
|
|
242
|
+
- uses: hashicorp/setup-terraform@v3
|
|
243
|
+
with:
|
|
244
|
+
terraform_version: "~> 1.5"
|
|
245
|
+
- run: terraform init
|
|
246
|
+
working-directory: catalog
|
|
247
|
+
env:
|
|
248
|
+
TF_VAR_cortex_api_token: ${{ secrets.CORTEX_API_TOKEN }}
|
|
249
|
+
- run: terraform apply -auto-approve
|
|
250
|
+
working-directory: catalog
|
|
251
|
+
env:
|
|
252
|
+
TF_VAR_cortex_api_token: ${{ secrets.CORTEX_API_TOKEN }}
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
Store `CORTEX_API_TOKEN` as a GitHub Actions secret. Now every PR shows a plan diff as a CI check, and every merge to main applies automatically.
|