Loading...
Loading...
Generate Harness Infrastructure Definition YAML for deployment targets and create via MCP. Use when user says "create infrastructure", "infrastructure definition", "k8s cluster config", "deployment target", or wants to configure where workloads run.
npx skill4agent add harness/harness-skills create-infrastructureharness_createinfrastructureinfrastructureDefinition:
name: K8s Production
identifier: k8s_prod
orgIdentifier: default
projectIdentifier: my_project
environmentRef: prod
deploymentType: Kubernetes
type: KubernetesDirect
spec:
connectorRef: k8s_connector
namespace: my-app-prod
releaseName: release-<+INFRA_KEY_SHORT_ID>
allowSimultaneousDeployments: falseinfrastructureDefinition:
name: GKE Cluster
identifier: gke_prod
environmentRef: prod
deploymentType: Kubernetes
type: KubernetesGcp
spec:
connectorRef: gcp_connector
cluster: my-gke-cluster
namespace: my-app
releaseName: release-<+INFRA_KEY_SHORT_ID>infrastructureDefinition:
name: AKS Cluster
identifier: aks_prod
environmentRef: prod
deploymentType: Kubernetes
type: KubernetesAzure
spec:
connectorRef: azure_connector
subscriptionId: <subscription_id>
resourceGroup: my-rg
cluster: my-aks-cluster
namespace: my-app
releaseName: release-<+INFRA_KEY_SHORT_ID>infrastructureDefinition:
name: ECS Fargate
identifier: ecs_prod
environmentRef: prod
deploymentType: ECS
type: ECS
spec:
connectorRef: aws_connector
region: us-east-1
cluster: my-ecs-clusterinfrastructureDefinition:
name: Lambda
identifier: lambda_prod
environmentRef: prod
deploymentType: ServerlessAwsLambda
type: ServerlessAwsLambda
spec:
connectorRef: aws_connector
region: us-east-1
stage: prodinfrastructureDefinition:
name: Azure Web App
identifier: azure_webapp_prod
environmentRef: prod
deploymentType: AzureWebApp
type: AzureWebApp
spec:
connectorRef: azure_connector
subscriptionId: <subscription_id>
resourceGroup: my-rginfrastructureDefinition:
name: ASG Production
identifier: asg_prod
environmentRef: prod
deploymentType: Asg
type: Asg
spec:
connectorRef: aws_connector
region: us-east-1infrastructureDefinition:
name: Cloud Functions
identifier: gcf_prod
environmentRef: prod
deploymentType: GoogleCloudFunctions
type: GoogleCloudFunctions
spec:
connectorRef: gcp_connector
region: us-central1
project: my-gcp-projectinfrastructureDefinition:
name: On-Prem Servers
identifier: pdc_prod
environmentRef: prod
deploymentType: Ssh
type: Pdc
spec:
connectorRef: pdc_connector
hosts:
- host1.example.com
- host2.example.comCall MCP tool: harness_create
Parameters:
resource_type: "infrastructure"
org_id: "<organization>"
project_id: "<project>"
body: <infrastructure YAML><+INFRA_KEY_SHORT_ID>CONNECTOR_NOT_FOUNDENVIRONMENT_NOT_FOUNDreleaseName<+INFRA_KEY_SHORT_ID>deploymentTypeallowSimultaneousDeployments: falsetrue