1. Packages
  2. Harness Provider
  3. API Docs
  4. platform
  5. Infrastructure
Harness v0.7.1 published on Saturday, Mar 29, 2025 by Pulumi

harness.platform.Infrastructure

Explore with Pulumi AI

Resource for creating a Harness Infrastructure.

Example to create Infrastructure at different levels (Org, Project, Account)

Account Level

import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";

const example = new harness.platform.Infrastructure("example", {
    identifier: "identifier",
    name: "name",
    envId: "environmentIdentifier",
    type: "KubernetesDirect",
    deploymentType: "Kubernetes",
    yaml: `infrastructureDefinition:
 name: name
 identifier: identifier
 description: ""
 tags:
   asda: ""
 orgIdentifier: orgIdentifer
 projectIdentifier: projectIdentifier
 environmentRef: environmentIdentifier
 deploymentType: Kubernetes
 type: KubernetesDirect
 spec:
  connectorRef: account.gfgf
  namespace: asdasdsa
  releaseName: release-<+INFRA_KEY>
  allowSimultaneousDeployments: false
`,
});
Copy
import pulumi
import pulumi_harness as harness

example = harness.platform.Infrastructure("example",
    identifier="identifier",
    name="name",
    env_id="environmentIdentifier",
    type="KubernetesDirect",
    deployment_type="Kubernetes",
    yaml="""infrastructureDefinition:
 name: name
 identifier: identifier
 description: ""
 tags:
   asda: ""
 orgIdentifier: orgIdentifer
 projectIdentifier: projectIdentifier
 environmentRef: environmentIdentifier
 deploymentType: Kubernetes
 type: KubernetesDirect
 spec:
  connectorRef: account.gfgf
  namespace: asdasdsa
  releaseName: release-<+INFRA_KEY>
  allowSimultaneousDeployments: false
""")
Copy
package main

import (
	"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := platform.NewInfrastructure(ctx, "example", &platform.InfrastructureArgs{
			Identifier:     pulumi.String("identifier"),
			Name:           pulumi.String("name"),
			EnvId:          pulumi.String("environmentIdentifier"),
			Type:           pulumi.String("KubernetesDirect"),
			DeploymentType: pulumi.String("Kubernetes"),
			Yaml: pulumi.String(`infrastructureDefinition:
 name: name
 identifier: identifier
 description: ""
 tags:
   asda: ""
 orgIdentifier: orgIdentifer
 projectIdentifier: projectIdentifier
 environmentRef: environmentIdentifier
 deploymentType: Kubernetes
 type: KubernetesDirect
 spec:
  connectorRef: account.gfgf
  namespace: asdasdsa
  releaseName: release-<+INFRA_KEY>
  allowSimultaneousDeployments: false
`),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;

return await Deployment.RunAsync(() => 
{
    var example = new Harness.Platform.Infrastructure("example", new()
    {
        Identifier = "identifier",
        Name = "name",
        EnvId = "environmentIdentifier",
        Type = "KubernetesDirect",
        DeploymentType = "Kubernetes",
        Yaml = @"infrastructureDefinition:
 name: name
 identifier: identifier
 description: """"
 tags:
   asda: """"
 orgIdentifier: orgIdentifer
 projectIdentifier: projectIdentifier
 environmentRef: environmentIdentifier
 deploymentType: Kubernetes
 type: KubernetesDirect
 spec:
  connectorRef: account.gfgf
  namespace: asdasdsa
  releaseName: release-<+INFRA_KEY>
  allowSimultaneousDeployments: false
",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.platform.Infrastructure;
import com.pulumi.harness.platform.InfrastructureArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new Infrastructure("example", InfrastructureArgs.builder()
            .identifier("identifier")
            .name("name")
            .envId("environmentIdentifier")
            .type("KubernetesDirect")
            .deploymentType("Kubernetes")
            .yaml("""
infrastructureDefinition:
 name: name
 identifier: identifier
 description: ""
 tags:
   asda: ""
 orgIdentifier: orgIdentifer
 projectIdentifier: projectIdentifier
 environmentRef: environmentIdentifier
 deploymentType: Kubernetes
 type: KubernetesDirect
 spec:
  connectorRef: account.gfgf
  namespace: asdasdsa
  releaseName: release-<+INFRA_KEY>
  allowSimultaneousDeployments: false
            """)
            .build());

    }
}
Copy
resources:
  example:
    type: harness:platform:Infrastructure
    properties:
      identifier: identifier
      name: name
      envId: environmentIdentifier
      type: KubernetesDirect
      deploymentType: Kubernetes
      yaml: |
        infrastructureDefinition:
         name: name
         identifier: identifier
         description: ""
         tags:
           asda: ""
         orgIdentifier: orgIdentifer
         projectIdentifier: projectIdentifier
         environmentRef: environmentIdentifier
         deploymentType: Kubernetes
         type: KubernetesDirect
         spec:
          connectorRef: account.gfgf
          namespace: asdasdsa
          releaseName: release-<+INFRA_KEY>
          allowSimultaneousDeployments: false        
Copy

Org Level

import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";

const example = new harness.platform.Infrastructure("example", {
    identifier: "identifier",
    name: "name",
    orgId: "orgIdentifer",
    envId: "environmentIdentifier",
    type: "KubernetesDirect",
    deploymentType: "Kubernetes",
    yaml: `infrastructureDefinition:
 name: name
 identifier: identifier
 description: ""
 tags:
   asda: ""
 orgIdentifier: orgIdentifer
 projectIdentifier: projectIdentifier
 environmentRef: environmentIdentifier
 deploymentType: Kubernetes
 type: KubernetesDirect
 spec:
  connectorRef: account.gfgf
  namespace: asdasdsa
  releaseName: release-<+INFRA_KEY>
  allowSimultaneousDeployments: false
`,
});
Copy
import pulumi
import pulumi_harness as harness

example = harness.platform.Infrastructure("example",
    identifier="identifier",
    name="name",
    org_id="orgIdentifer",
    env_id="environmentIdentifier",
    type="KubernetesDirect",
    deployment_type="Kubernetes",
    yaml="""infrastructureDefinition:
 name: name
 identifier: identifier
 description: ""
 tags:
   asda: ""
 orgIdentifier: orgIdentifer
 projectIdentifier: projectIdentifier
 environmentRef: environmentIdentifier
 deploymentType: Kubernetes
 type: KubernetesDirect
 spec:
  connectorRef: account.gfgf
  namespace: asdasdsa
  releaseName: release-<+INFRA_KEY>
  allowSimultaneousDeployments: false
""")
Copy
package main

import (
	"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := platform.NewInfrastructure(ctx, "example", &platform.InfrastructureArgs{
			Identifier:     pulumi.String("identifier"),
			Name:           pulumi.String("name"),
			OrgId:          pulumi.String("orgIdentifer"),
			EnvId:          pulumi.String("environmentIdentifier"),
			Type:           pulumi.String("KubernetesDirect"),
			DeploymentType: pulumi.String("Kubernetes"),
			Yaml: pulumi.String(`infrastructureDefinition:
 name: name
 identifier: identifier
 description: ""
 tags:
   asda: ""
 orgIdentifier: orgIdentifer
 projectIdentifier: projectIdentifier
 environmentRef: environmentIdentifier
 deploymentType: Kubernetes
 type: KubernetesDirect
 spec:
  connectorRef: account.gfgf
  namespace: asdasdsa
  releaseName: release-<+INFRA_KEY>
  allowSimultaneousDeployments: false
`),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;

return await Deployment.RunAsync(() => 
{
    var example = new Harness.Platform.Infrastructure("example", new()
    {
        Identifier = "identifier",
        Name = "name",
        OrgId = "orgIdentifer",
        EnvId = "environmentIdentifier",
        Type = "KubernetesDirect",
        DeploymentType = "Kubernetes",
        Yaml = @"infrastructureDefinition:
 name: name
 identifier: identifier
 description: """"
 tags:
   asda: """"
 orgIdentifier: orgIdentifer
 projectIdentifier: projectIdentifier
 environmentRef: environmentIdentifier
 deploymentType: Kubernetes
 type: KubernetesDirect
 spec:
  connectorRef: account.gfgf
  namespace: asdasdsa
  releaseName: release-<+INFRA_KEY>
  allowSimultaneousDeployments: false
",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.platform.Infrastructure;
import com.pulumi.harness.platform.InfrastructureArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new Infrastructure("example", InfrastructureArgs.builder()
            .identifier("identifier")
            .name("name")
            .orgId("orgIdentifer")
            .envId("environmentIdentifier")
            .type("KubernetesDirect")
            .deploymentType("Kubernetes")
            .yaml("""
infrastructureDefinition:
 name: name
 identifier: identifier
 description: ""
 tags:
   asda: ""
 orgIdentifier: orgIdentifer
 projectIdentifier: projectIdentifier
 environmentRef: environmentIdentifier
 deploymentType: Kubernetes
 type: KubernetesDirect
 spec:
  connectorRef: account.gfgf
  namespace: asdasdsa
  releaseName: release-<+INFRA_KEY>
  allowSimultaneousDeployments: false
            """)
            .build());

    }
}
Copy
resources:
  example:
    type: harness:platform:Infrastructure
    properties:
      identifier: identifier
      name: name
      orgId: orgIdentifer
      envId: environmentIdentifier
      type: KubernetesDirect
      deploymentType: Kubernetes
      yaml: |
        infrastructureDefinition:
         name: name
         identifier: identifier
         description: ""
         tags:
           asda: ""
         orgIdentifier: orgIdentifer
         projectIdentifier: projectIdentifier
         environmentRef: environmentIdentifier
         deploymentType: Kubernetes
         type: KubernetesDirect
         spec:
          connectorRef: account.gfgf
          namespace: asdasdsa
          releaseName: release-<+INFRA_KEY>
          allowSimultaneousDeployments: false        
Copy

Project Level

import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";

const example = new harness.platform.Infrastructure("example", {
    identifier: "identifier",
    name: "name",
    orgId: "orgIdentifer",
    projectId: "projectIdentifier",
    envId: "environmentIdentifier",
    type: "KubernetesDirect",
    deploymentType: "Kubernetes",
    yaml: `infrastructureDefinition:
 name: name
 identifier: identifier
 description: ""
 tags:
   asda: ""
 orgIdentifier: orgIdentifer
 projectIdentifier: projectIdentifier
 environmentRef: environmentIdentifier
 deploymentType: Kubernetes
 type: KubernetesDirect
 spec:
  connectorRef: account.gfgf
  namespace: asdasdsa
  releaseName: release-<+INFRA_KEY>
  allowSimultaneousDeployments: false
`,
});
Copy
import pulumi
import pulumi_harness as harness

example = harness.platform.Infrastructure("example",
    identifier="identifier",
    name="name",
    org_id="orgIdentifer",
    project_id="projectIdentifier",
    env_id="environmentIdentifier",
    type="KubernetesDirect",
    deployment_type="Kubernetes",
    yaml="""infrastructureDefinition:
 name: name
 identifier: identifier
 description: ""
 tags:
   asda: ""
 orgIdentifier: orgIdentifer
 projectIdentifier: projectIdentifier
 environmentRef: environmentIdentifier
 deploymentType: Kubernetes
 type: KubernetesDirect
 spec:
  connectorRef: account.gfgf
  namespace: asdasdsa
  releaseName: release-<+INFRA_KEY>
  allowSimultaneousDeployments: false
""")
Copy
package main

import (
	"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := platform.NewInfrastructure(ctx, "example", &platform.InfrastructureArgs{
			Identifier:     pulumi.String("identifier"),
			Name:           pulumi.String("name"),
			OrgId:          pulumi.String("orgIdentifer"),
			ProjectId:      pulumi.String("projectIdentifier"),
			EnvId:          pulumi.String("environmentIdentifier"),
			Type:           pulumi.String("KubernetesDirect"),
			DeploymentType: pulumi.String("Kubernetes"),
			Yaml: pulumi.String(`infrastructureDefinition:
 name: name
 identifier: identifier
 description: ""
 tags:
   asda: ""
 orgIdentifier: orgIdentifer
 projectIdentifier: projectIdentifier
 environmentRef: environmentIdentifier
 deploymentType: Kubernetes
 type: KubernetesDirect
 spec:
  connectorRef: account.gfgf
  namespace: asdasdsa
  releaseName: release-<+INFRA_KEY>
  allowSimultaneousDeployments: false
`),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;

return await Deployment.RunAsync(() => 
{
    var example = new Harness.Platform.Infrastructure("example", new()
    {
        Identifier = "identifier",
        Name = "name",
        OrgId = "orgIdentifer",
        ProjectId = "projectIdentifier",
        EnvId = "environmentIdentifier",
        Type = "KubernetesDirect",
        DeploymentType = "Kubernetes",
        Yaml = @"infrastructureDefinition:
 name: name
 identifier: identifier
 description: """"
 tags:
   asda: """"
 orgIdentifier: orgIdentifer
 projectIdentifier: projectIdentifier
 environmentRef: environmentIdentifier
 deploymentType: Kubernetes
 type: KubernetesDirect
 spec:
  connectorRef: account.gfgf
  namespace: asdasdsa
  releaseName: release-<+INFRA_KEY>
  allowSimultaneousDeployments: false
",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.platform.Infrastructure;
import com.pulumi.harness.platform.InfrastructureArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new Infrastructure("example", InfrastructureArgs.builder()
            .identifier("identifier")
            .name("name")
            .orgId("orgIdentifer")
            .projectId("projectIdentifier")
            .envId("environmentIdentifier")
            .type("KubernetesDirect")
            .deploymentType("Kubernetes")
            .yaml("""
infrastructureDefinition:
 name: name
 identifier: identifier
 description: ""
 tags:
   asda: ""
 orgIdentifier: orgIdentifer
 projectIdentifier: projectIdentifier
 environmentRef: environmentIdentifier
 deploymentType: Kubernetes
 type: KubernetesDirect
 spec:
  connectorRef: account.gfgf
  namespace: asdasdsa
  releaseName: release-<+INFRA_KEY>
  allowSimultaneousDeployments: false
            """)
            .build());

    }
}
Copy
resources:
  example:
    type: harness:platform:Infrastructure
    properties:
      identifier: identifier
      name: name
      orgId: orgIdentifer
      projectId: projectIdentifier
      envId: environmentIdentifier
      type: KubernetesDirect
      deploymentType: Kubernetes
      yaml: |
        infrastructureDefinition:
         name: name
         identifier: identifier
         description: ""
         tags:
           asda: ""
         orgIdentifier: orgIdentifer
         projectIdentifier: projectIdentifier
         environmentRef: environmentIdentifier
         deploymentType: Kubernetes
         type: KubernetesDirect
         spec:
          connectorRef: account.gfgf
          namespace: asdasdsa
          releaseName: release-<+INFRA_KEY>
          allowSimultaneousDeployments: false        
Copy

Importing Infrastructure From Git

import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";

const test = new harness.platform.Infrastructure("test", {
    identifier: "identifier",
    name: "name",
    envId: "env_id",
    gitDetails: {
        storeType: "REMOTE",
        connectorRef: "connector_ref",
        repoName: "repo_name",
        filePath: "file_path",
        branch: "branch",
        importFromGit: true,
    },
});
Copy
import pulumi
import pulumi_harness as harness

test = harness.platform.Infrastructure("test",
    identifier="identifier",
    name="name",
    env_id="env_id",
    git_details={
        "store_type": "REMOTE",
        "connector_ref": "connector_ref",
        "repo_name": "repo_name",
        "file_path": "file_path",
        "branch": "branch",
        "import_from_git": True,
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := platform.NewInfrastructure(ctx, "test", &platform.InfrastructureArgs{
			Identifier: pulumi.String("identifier"),
			Name:       pulumi.String("name"),
			EnvId:      pulumi.String("env_id"),
			GitDetails: &platform.InfrastructureGitDetailsArgs{
				StoreType:     pulumi.String("REMOTE"),
				ConnectorRef:  pulumi.String("connector_ref"),
				RepoName:      pulumi.String("repo_name"),
				FilePath:      pulumi.String("file_path"),
				Branch:        pulumi.String("branch"),
				ImportFromGit: pulumi.Bool(true),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;

return await Deployment.RunAsync(() => 
{
    var test = new Harness.Platform.Infrastructure("test", new()
    {
        Identifier = "identifier",
        Name = "name",
        EnvId = "env_id",
        GitDetails = new Harness.Platform.Inputs.InfrastructureGitDetailsArgs
        {
            StoreType = "REMOTE",
            ConnectorRef = "connector_ref",
            RepoName = "repo_name",
            FilePath = "file_path",
            Branch = "branch",
            ImportFromGit = true,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.platform.Infrastructure;
import com.pulumi.harness.platform.InfrastructureArgs;
import com.pulumi.harness.platform.inputs.InfrastructureGitDetailsArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var test = new Infrastructure("test", InfrastructureArgs.builder()
            .identifier("identifier")
            .name("name")
            .envId("env_id")
            .gitDetails(InfrastructureGitDetailsArgs.builder()
                .storeType("REMOTE")
                .connectorRef("connector_ref")
                .repoName("repo_name")
                .filePath("file_path")
                .branch("branch")
                .importFromGit("true")
                .build())
            .build());

    }
}
Copy
resources:
  test:
    type: harness:platform:Infrastructure
    properties:
      identifier: identifier
      name: name
      envId: env_id
      gitDetails:
        storeType: REMOTE
        connectorRef: connector_ref
        repoName: repo_name
        filePath: file_path
        branch: branch
        importFromGit: 'true'
Copy

Create Infrastructure Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Infrastructure(name: string, args: InfrastructureArgs, opts?: CustomResourceOptions);
@overload
def Infrastructure(resource_name: str,
                   args: InfrastructureArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def Infrastructure(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   env_id: Optional[str] = None,
                   identifier: Optional[str] = None,
                   deployment_type: Optional[str] = None,
                   description: Optional[str] = None,
                   force_delete: Optional[bool] = None,
                   git_details: Optional[InfrastructureGitDetailsArgs] = None,
                   name: Optional[str] = None,
                   org_id: Optional[str] = None,
                   project_id: Optional[str] = None,
                   tags: Optional[Sequence[str]] = None,
                   type: Optional[str] = None,
                   yaml: Optional[str] = None)
func NewInfrastructure(ctx *Context, name string, args InfrastructureArgs, opts ...ResourceOption) (*Infrastructure, error)
public Infrastructure(string name, InfrastructureArgs args, CustomResourceOptions? opts = null)
public Infrastructure(String name, InfrastructureArgs args)
public Infrastructure(String name, InfrastructureArgs args, CustomResourceOptions options)
type: harness:platform:Infrastructure
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. InfrastructureArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. InfrastructureArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. InfrastructureArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. InfrastructureArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. InfrastructureArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var infrastructureResource = new Harness.Platform.Infrastructure("infrastructureResource", new()
{
    EnvId = "string",
    Identifier = "string",
    DeploymentType = "string",
    Description = "string",
    ForceDelete = false,
    GitDetails = new Harness.Platform.Inputs.InfrastructureGitDetailsArgs
    {
        BaseBranch = "string",
        Branch = "string",
        CommitMessage = "string",
        ConnectorRef = "string",
        FilePath = "string",
        ImportFromGit = false,
        IsForceImport = false,
        IsHarnesscodeRepo = false,
        IsNewBranch = false,
        LastCommitId = "string",
        LastObjectId = "string",
        LoadFromCache = "string",
        LoadFromFallbackBranch = false,
        ParentEntityConnectorRef = "string",
        ParentEntityRepoName = "string",
        RepoName = "string",
        StoreType = "string",
    },
    Name = "string",
    OrgId = "string",
    ProjectId = "string",
    Tags = new[]
    {
        "string",
    },
    Type = "string",
    Yaml = "string",
});
Copy
example, err := platform.NewInfrastructure(ctx, "infrastructureResource", &platform.InfrastructureArgs{
	EnvId:          pulumi.String("string"),
	Identifier:     pulumi.String("string"),
	DeploymentType: pulumi.String("string"),
	Description:    pulumi.String("string"),
	ForceDelete:    pulumi.Bool(false),
	GitDetails: &platform.InfrastructureGitDetailsArgs{
		BaseBranch:               pulumi.String("string"),
		Branch:                   pulumi.String("string"),
		CommitMessage:            pulumi.String("string"),
		ConnectorRef:             pulumi.String("string"),
		FilePath:                 pulumi.String("string"),
		ImportFromGit:            pulumi.Bool(false),
		IsForceImport:            pulumi.Bool(false),
		IsHarnesscodeRepo:        pulumi.Bool(false),
		IsNewBranch:              pulumi.Bool(false),
		LastCommitId:             pulumi.String("string"),
		LastObjectId:             pulumi.String("string"),
		LoadFromCache:            pulumi.String("string"),
		LoadFromFallbackBranch:   pulumi.Bool(false),
		ParentEntityConnectorRef: pulumi.String("string"),
		ParentEntityRepoName:     pulumi.String("string"),
		RepoName:                 pulumi.String("string"),
		StoreType:                pulumi.String("string"),
	},
	Name:      pulumi.String("string"),
	OrgId:     pulumi.String("string"),
	ProjectId: pulumi.String("string"),
	Tags: pulumi.StringArray{
		pulumi.String("string"),
	},
	Type: pulumi.String("string"),
	Yaml: pulumi.String("string"),
})
Copy
var infrastructureResource = new Infrastructure("infrastructureResource", InfrastructureArgs.builder()
    .envId("string")
    .identifier("string")
    .deploymentType("string")
    .description("string")
    .forceDelete(false)
    .gitDetails(InfrastructureGitDetailsArgs.builder()
        .baseBranch("string")
        .branch("string")
        .commitMessage("string")
        .connectorRef("string")
        .filePath("string")
        .importFromGit(false)
        .isForceImport(false)
        .isHarnesscodeRepo(false)
        .isNewBranch(false)
        .lastCommitId("string")
        .lastObjectId("string")
        .loadFromCache("string")
        .loadFromFallbackBranch(false)
        .parentEntityConnectorRef("string")
        .parentEntityRepoName("string")
        .repoName("string")
        .storeType("string")
        .build())
    .name("string")
    .orgId("string")
    .projectId("string")
    .tags("string")
    .type("string")
    .yaml("string")
    .build());
Copy
infrastructure_resource = harness.platform.Infrastructure("infrastructureResource",
    env_id="string",
    identifier="string",
    deployment_type="string",
    description="string",
    force_delete=False,
    git_details={
        "base_branch": "string",
        "branch": "string",
        "commit_message": "string",
        "connector_ref": "string",
        "file_path": "string",
        "import_from_git": False,
        "is_force_import": False,
        "is_harnesscode_repo": False,
        "is_new_branch": False,
        "last_commit_id": "string",
        "last_object_id": "string",
        "load_from_cache": "string",
        "load_from_fallback_branch": False,
        "parent_entity_connector_ref": "string",
        "parent_entity_repo_name": "string",
        "repo_name": "string",
        "store_type": "string",
    },
    name="string",
    org_id="string",
    project_id="string",
    tags=["string"],
    type="string",
    yaml="string")
Copy
const infrastructureResource = new harness.platform.Infrastructure("infrastructureResource", {
    envId: "string",
    identifier: "string",
    deploymentType: "string",
    description: "string",
    forceDelete: false,
    gitDetails: {
        baseBranch: "string",
        branch: "string",
        commitMessage: "string",
        connectorRef: "string",
        filePath: "string",
        importFromGit: false,
        isForceImport: false,
        isHarnesscodeRepo: false,
        isNewBranch: false,
        lastCommitId: "string",
        lastObjectId: "string",
        loadFromCache: "string",
        loadFromFallbackBranch: false,
        parentEntityConnectorRef: "string",
        parentEntityRepoName: "string",
        repoName: "string",
        storeType: "string",
    },
    name: "string",
    orgId: "string",
    projectId: "string",
    tags: ["string"],
    type: "string",
    yaml: "string",
});
Copy
type: harness:platform:Infrastructure
properties:
    deploymentType: string
    description: string
    envId: string
    forceDelete: false
    gitDetails:
        baseBranch: string
        branch: string
        commitMessage: string
        connectorRef: string
        filePath: string
        importFromGit: false
        isForceImport: false
        isHarnesscodeRepo: false
        isNewBranch: false
        lastCommitId: string
        lastObjectId: string
        loadFromCache: string
        loadFromFallbackBranch: false
        parentEntityConnectorRef: string
        parentEntityRepoName: string
        repoName: string
        storeType: string
    identifier: string
    name: string
    orgId: string
    projectId: string
    tags:
        - string
    type: string
    yaml: string
Copy

Infrastructure Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Infrastructure resource accepts the following input properties:

EnvId This property is required. string
Environment Identifier.
Identifier
This property is required.
Changes to this property will trigger replacement.
string
Unique identifier of the resource.
DeploymentType string
Infrastructure deployment type. Valid values are Kubernetes, NativeHelm, Ssh, WinRm, ServerlessAwsLambda, AzureWebApp, Custom, ECS.
Description string
Description of the resource.
ForceDelete bool
When set to true, enables force deletion of infrastructure.
GitDetails InfrastructureGitDetails
Contains Git Information for remote entities from Git for Create/Update/Import
Name string
Name of the resource.
OrgId string
Unique identifier of the organization.
ProjectId string
Unique identifier of the project.
Tags List<string>
Tags to associate with the resource.
Type string
Type of Infrastructure. Valid values are KubernetesDirect, KubernetesGcp, ServerlessAwsLambda, Pdc, KubernetesAzure, SshWinRmAzure, SshWinRmAws, AzureWebApp, ECS, GitOps, CustomDeployment, TAS, KubernetesRancher, AWS_SAM.
Yaml string
Infrastructure YAML. In YAML, to reference an entity at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference an entity at the account scope, prefix 'account` to the expression: account.{identifier}. For eg, to reference a connector with identifier 'connectorId' at the organization scope in a stage mention it as connectorRef: org.connectorId.
EnvId This property is required. string
Environment Identifier.
Identifier
This property is required.
Changes to this property will trigger replacement.
string
Unique identifier of the resource.
DeploymentType string
Infrastructure deployment type. Valid values are Kubernetes, NativeHelm, Ssh, WinRm, ServerlessAwsLambda, AzureWebApp, Custom, ECS.
Description string
Description of the resource.
ForceDelete bool
When set to true, enables force deletion of infrastructure.
GitDetails InfrastructureGitDetailsArgs
Contains Git Information for remote entities from Git for Create/Update/Import
Name string
Name of the resource.
OrgId string
Unique identifier of the organization.
ProjectId string
Unique identifier of the project.
Tags []string
Tags to associate with the resource.
Type string
Type of Infrastructure. Valid values are KubernetesDirect, KubernetesGcp, ServerlessAwsLambda, Pdc, KubernetesAzure, SshWinRmAzure, SshWinRmAws, AzureWebApp, ECS, GitOps, CustomDeployment, TAS, KubernetesRancher, AWS_SAM.
Yaml string
Infrastructure YAML. In YAML, to reference an entity at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference an entity at the account scope, prefix 'account` to the expression: account.{identifier}. For eg, to reference a connector with identifier 'connectorId' at the organization scope in a stage mention it as connectorRef: org.connectorId.
envId This property is required. String
Environment Identifier.
identifier
This property is required.
Changes to this property will trigger replacement.
String
Unique identifier of the resource.
deploymentType String
Infrastructure deployment type. Valid values are Kubernetes, NativeHelm, Ssh, WinRm, ServerlessAwsLambda, AzureWebApp, Custom, ECS.
description String
Description of the resource.
forceDelete Boolean
When set to true, enables force deletion of infrastructure.
gitDetails InfrastructureGitDetails
Contains Git Information for remote entities from Git for Create/Update/Import
name String
Name of the resource.
orgId String
Unique identifier of the organization.
projectId String
Unique identifier of the project.
tags List<String>
Tags to associate with the resource.
type String
Type of Infrastructure. Valid values are KubernetesDirect, KubernetesGcp, ServerlessAwsLambda, Pdc, KubernetesAzure, SshWinRmAzure, SshWinRmAws, AzureWebApp, ECS, GitOps, CustomDeployment, TAS, KubernetesRancher, AWS_SAM.
yaml String
Infrastructure YAML. In YAML, to reference an entity at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference an entity at the account scope, prefix 'account` to the expression: account.{identifier}. For eg, to reference a connector with identifier 'connectorId' at the organization scope in a stage mention it as connectorRef: org.connectorId.
envId This property is required. string
Environment Identifier.
identifier
This property is required.
Changes to this property will trigger replacement.
string
Unique identifier of the resource.
deploymentType string
Infrastructure deployment type. Valid values are Kubernetes, NativeHelm, Ssh, WinRm, ServerlessAwsLambda, AzureWebApp, Custom, ECS.
description string
Description of the resource.
forceDelete boolean
When set to true, enables force deletion of infrastructure.
gitDetails InfrastructureGitDetails
Contains Git Information for remote entities from Git for Create/Update/Import
name string
Name of the resource.
orgId string
Unique identifier of the organization.
projectId string
Unique identifier of the project.
tags string[]
Tags to associate with the resource.
type string
Type of Infrastructure. Valid values are KubernetesDirect, KubernetesGcp, ServerlessAwsLambda, Pdc, KubernetesAzure, SshWinRmAzure, SshWinRmAws, AzureWebApp, ECS, GitOps, CustomDeployment, TAS, KubernetesRancher, AWS_SAM.
yaml string
Infrastructure YAML. In YAML, to reference an entity at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference an entity at the account scope, prefix 'account` to the expression: account.{identifier}. For eg, to reference a connector with identifier 'connectorId' at the organization scope in a stage mention it as connectorRef: org.connectorId.
env_id This property is required. str
Environment Identifier.
identifier
This property is required.
Changes to this property will trigger replacement.
str
Unique identifier of the resource.
deployment_type str
Infrastructure deployment type. Valid values are Kubernetes, NativeHelm, Ssh, WinRm, ServerlessAwsLambda, AzureWebApp, Custom, ECS.
description str
Description of the resource.
force_delete bool
When set to true, enables force deletion of infrastructure.
git_details InfrastructureGitDetailsArgs
Contains Git Information for remote entities from Git for Create/Update/Import
name str
Name of the resource.
org_id str
Unique identifier of the organization.
project_id str
Unique identifier of the project.
tags Sequence[str]
Tags to associate with the resource.
type str
Type of Infrastructure. Valid values are KubernetesDirect, KubernetesGcp, ServerlessAwsLambda, Pdc, KubernetesAzure, SshWinRmAzure, SshWinRmAws, AzureWebApp, ECS, GitOps, CustomDeployment, TAS, KubernetesRancher, AWS_SAM.
yaml str
Infrastructure YAML. In YAML, to reference an entity at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference an entity at the account scope, prefix 'account` to the expression: account.{identifier}. For eg, to reference a connector with identifier 'connectorId' at the organization scope in a stage mention it as connectorRef: org.connectorId.
envId This property is required. String
Environment Identifier.
identifier
This property is required.
Changes to this property will trigger replacement.
String
Unique identifier of the resource.
deploymentType String
Infrastructure deployment type. Valid values are Kubernetes, NativeHelm, Ssh, WinRm, ServerlessAwsLambda, AzureWebApp, Custom, ECS.
description String
Description of the resource.
forceDelete Boolean
When set to true, enables force deletion of infrastructure.
gitDetails Property Map
Contains Git Information for remote entities from Git for Create/Update/Import
name String
Name of the resource.
orgId String
Unique identifier of the organization.
projectId String
Unique identifier of the project.
tags List<String>
Tags to associate with the resource.
type String
Type of Infrastructure. Valid values are KubernetesDirect, KubernetesGcp, ServerlessAwsLambda, Pdc, KubernetesAzure, SshWinRmAzure, SshWinRmAws, AzureWebApp, ECS, GitOps, CustomDeployment, TAS, KubernetesRancher, AWS_SAM.
yaml String
Infrastructure YAML. In YAML, to reference an entity at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference an entity at the account scope, prefix 'account` to the expression: account.{identifier}. For eg, to reference a connector with identifier 'connectorId' at the organization scope in a stage mention it as connectorRef: org.connectorId.

Outputs

All input properties are implicitly available as output properties. Additionally, the Infrastructure resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing Infrastructure Resource

Get an existing Infrastructure resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: InfrastructureState, opts?: CustomResourceOptions): Infrastructure
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        deployment_type: Optional[str] = None,
        description: Optional[str] = None,
        env_id: Optional[str] = None,
        force_delete: Optional[bool] = None,
        git_details: Optional[InfrastructureGitDetailsArgs] = None,
        identifier: Optional[str] = None,
        name: Optional[str] = None,
        org_id: Optional[str] = None,
        project_id: Optional[str] = None,
        tags: Optional[Sequence[str]] = None,
        type: Optional[str] = None,
        yaml: Optional[str] = None) -> Infrastructure
func GetInfrastructure(ctx *Context, name string, id IDInput, state *InfrastructureState, opts ...ResourceOption) (*Infrastructure, error)
public static Infrastructure Get(string name, Input<string> id, InfrastructureState? state, CustomResourceOptions? opts = null)
public static Infrastructure get(String name, Output<String> id, InfrastructureState state, CustomResourceOptions options)
resources:  _:    type: harness:platform:Infrastructure    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
DeploymentType string
Infrastructure deployment type. Valid values are Kubernetes, NativeHelm, Ssh, WinRm, ServerlessAwsLambda, AzureWebApp, Custom, ECS.
Description string
Description of the resource.
EnvId string
Environment Identifier.
ForceDelete bool
When set to true, enables force deletion of infrastructure.
GitDetails InfrastructureGitDetails
Contains Git Information for remote entities from Git for Create/Update/Import
Identifier Changes to this property will trigger replacement. string
Unique identifier of the resource.
Name string
Name of the resource.
OrgId string
Unique identifier of the organization.
ProjectId string
Unique identifier of the project.
Tags List<string>
Tags to associate with the resource.
Type string
Type of Infrastructure. Valid values are KubernetesDirect, KubernetesGcp, ServerlessAwsLambda, Pdc, KubernetesAzure, SshWinRmAzure, SshWinRmAws, AzureWebApp, ECS, GitOps, CustomDeployment, TAS, KubernetesRancher, AWS_SAM.
Yaml string
Infrastructure YAML. In YAML, to reference an entity at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference an entity at the account scope, prefix 'account` to the expression: account.{identifier}. For eg, to reference a connector with identifier 'connectorId' at the organization scope in a stage mention it as connectorRef: org.connectorId.
DeploymentType string
Infrastructure deployment type. Valid values are Kubernetes, NativeHelm, Ssh, WinRm, ServerlessAwsLambda, AzureWebApp, Custom, ECS.
Description string
Description of the resource.
EnvId string
Environment Identifier.
ForceDelete bool
When set to true, enables force deletion of infrastructure.
GitDetails InfrastructureGitDetailsArgs
Contains Git Information for remote entities from Git for Create/Update/Import
Identifier Changes to this property will trigger replacement. string
Unique identifier of the resource.
Name string
Name of the resource.
OrgId string
Unique identifier of the organization.
ProjectId string
Unique identifier of the project.
Tags []string
Tags to associate with the resource.
Type string
Type of Infrastructure. Valid values are KubernetesDirect, KubernetesGcp, ServerlessAwsLambda, Pdc, KubernetesAzure, SshWinRmAzure, SshWinRmAws, AzureWebApp, ECS, GitOps, CustomDeployment, TAS, KubernetesRancher, AWS_SAM.
Yaml string
Infrastructure YAML. In YAML, to reference an entity at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference an entity at the account scope, prefix 'account` to the expression: account.{identifier}. For eg, to reference a connector with identifier 'connectorId' at the organization scope in a stage mention it as connectorRef: org.connectorId.
deploymentType String
Infrastructure deployment type. Valid values are Kubernetes, NativeHelm, Ssh, WinRm, ServerlessAwsLambda, AzureWebApp, Custom, ECS.
description String
Description of the resource.
envId String
Environment Identifier.
forceDelete Boolean
When set to true, enables force deletion of infrastructure.
gitDetails InfrastructureGitDetails
Contains Git Information for remote entities from Git for Create/Update/Import
identifier Changes to this property will trigger replacement. String
Unique identifier of the resource.
name String
Name of the resource.
orgId String
Unique identifier of the organization.
projectId String
Unique identifier of the project.
tags List<String>
Tags to associate with the resource.
type String
Type of Infrastructure. Valid values are KubernetesDirect, KubernetesGcp, ServerlessAwsLambda, Pdc, KubernetesAzure, SshWinRmAzure, SshWinRmAws, AzureWebApp, ECS, GitOps, CustomDeployment, TAS, KubernetesRancher, AWS_SAM.
yaml String
Infrastructure YAML. In YAML, to reference an entity at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference an entity at the account scope, prefix 'account` to the expression: account.{identifier}. For eg, to reference a connector with identifier 'connectorId' at the organization scope in a stage mention it as connectorRef: org.connectorId.
deploymentType string
Infrastructure deployment type. Valid values are Kubernetes, NativeHelm, Ssh, WinRm, ServerlessAwsLambda, AzureWebApp, Custom, ECS.
description string
Description of the resource.
envId string
Environment Identifier.
forceDelete boolean
When set to true, enables force deletion of infrastructure.
gitDetails InfrastructureGitDetails
Contains Git Information for remote entities from Git for Create/Update/Import
identifier Changes to this property will trigger replacement. string
Unique identifier of the resource.
name string
Name of the resource.
orgId string
Unique identifier of the organization.
projectId string
Unique identifier of the project.
tags string[]
Tags to associate with the resource.
type string
Type of Infrastructure. Valid values are KubernetesDirect, KubernetesGcp, ServerlessAwsLambda, Pdc, KubernetesAzure, SshWinRmAzure, SshWinRmAws, AzureWebApp, ECS, GitOps, CustomDeployment, TAS, KubernetesRancher, AWS_SAM.
yaml string
Infrastructure YAML. In YAML, to reference an entity at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference an entity at the account scope, prefix 'account` to the expression: account.{identifier}. For eg, to reference a connector with identifier 'connectorId' at the organization scope in a stage mention it as connectorRef: org.connectorId.
deployment_type str
Infrastructure deployment type. Valid values are Kubernetes, NativeHelm, Ssh, WinRm, ServerlessAwsLambda, AzureWebApp, Custom, ECS.
description str
Description of the resource.
env_id str
Environment Identifier.
force_delete bool
When set to true, enables force deletion of infrastructure.
git_details InfrastructureGitDetailsArgs
Contains Git Information for remote entities from Git for Create/Update/Import
identifier Changes to this property will trigger replacement. str
Unique identifier of the resource.
name str
Name of the resource.
org_id str
Unique identifier of the organization.
project_id str
Unique identifier of the project.
tags Sequence[str]
Tags to associate with the resource.
type str
Type of Infrastructure. Valid values are KubernetesDirect, KubernetesGcp, ServerlessAwsLambda, Pdc, KubernetesAzure, SshWinRmAzure, SshWinRmAws, AzureWebApp, ECS, GitOps, CustomDeployment, TAS, KubernetesRancher, AWS_SAM.
yaml str
Infrastructure YAML. In YAML, to reference an entity at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference an entity at the account scope, prefix 'account` to the expression: account.{identifier}. For eg, to reference a connector with identifier 'connectorId' at the organization scope in a stage mention it as connectorRef: org.connectorId.
deploymentType String
Infrastructure deployment type. Valid values are Kubernetes, NativeHelm, Ssh, WinRm, ServerlessAwsLambda, AzureWebApp, Custom, ECS.
description String
Description of the resource.
envId String
Environment Identifier.
forceDelete Boolean
When set to true, enables force deletion of infrastructure.
gitDetails Property Map
Contains Git Information for remote entities from Git for Create/Update/Import
identifier Changes to this property will trigger replacement. String
Unique identifier of the resource.
name String
Name of the resource.
orgId String
Unique identifier of the organization.
projectId String
Unique identifier of the project.
tags List<String>
Tags to associate with the resource.
type String
Type of Infrastructure. Valid values are KubernetesDirect, KubernetesGcp, ServerlessAwsLambda, Pdc, KubernetesAzure, SshWinRmAzure, SshWinRmAws, AzureWebApp, ECS, GitOps, CustomDeployment, TAS, KubernetesRancher, AWS_SAM.
yaml String
Infrastructure YAML. In YAML, to reference an entity at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference an entity at the account scope, prefix 'account` to the expression: account.{identifier}. For eg, to reference a connector with identifier 'connectorId' at the organization scope in a stage mention it as connectorRef: org.connectorId.

Supporting Types

InfrastructureGitDetails
, InfrastructureGitDetailsArgs

BaseBranch string
Name of the default branch (this checks out a new branch titled by branch_name).
Branch string
Name of the branch.
CommitMessage string
message for the commit in Git Repo.
ConnectorRef string
Identifier of the Harness Connector used for importing entity from Git To reference a connector at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a connector at the account scope, prefix 'account` to the expression: account.{identifier}.
FilePath string
File path of the Entity in the repository.
ImportFromGit bool
Flag to set if importing from Git
IsForceImport bool
Flag to set if force importing from Git
IsHarnesscodeRepo bool
If the gitProvider is HarnessCode
IsNewBranch bool
If a new branch creation is requested.
LastCommitId string
Last commit identifier (for Git Repositories other than Github). To be provided only when updating Infrastructures.
LastObjectId string
Last object identifier (for Github). To be provided only when updating Infrastructures.
LoadFromCache string
If the Entity is to be fetched from cache
LoadFromFallbackBranch bool
Whether the file has to be get from fallback_branch.
ParentEntityConnectorRef string
Identifier of the Harness Connector used for CRUD operations on the Parent Entity. To reference a connector at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a connector at the account scope, prefix 'account` to the expression: account.{identifier}.
ParentEntityRepoName string
Name of the repository where parent entity lies.
RepoName string
Name of the repository.
StoreType string
store type of the entity.
BaseBranch string
Name of the default branch (this checks out a new branch titled by branch_name).
Branch string
Name of the branch.
CommitMessage string
message for the commit in Git Repo.
ConnectorRef string
Identifier of the Harness Connector used for importing entity from Git To reference a connector at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a connector at the account scope, prefix 'account` to the expression: account.{identifier}.
FilePath string
File path of the Entity in the repository.
ImportFromGit bool
Flag to set if importing from Git
IsForceImport bool
Flag to set if force importing from Git
IsHarnesscodeRepo bool
If the gitProvider is HarnessCode
IsNewBranch bool
If a new branch creation is requested.
LastCommitId string
Last commit identifier (for Git Repositories other than Github). To be provided only when updating Infrastructures.
LastObjectId string
Last object identifier (for Github). To be provided only when updating Infrastructures.
LoadFromCache string
If the Entity is to be fetched from cache
LoadFromFallbackBranch bool
Whether the file has to be get from fallback_branch.
ParentEntityConnectorRef string
Identifier of the Harness Connector used for CRUD operations on the Parent Entity. To reference a connector at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a connector at the account scope, prefix 'account` to the expression: account.{identifier}.
ParentEntityRepoName string
Name of the repository where parent entity lies.
RepoName string
Name of the repository.
StoreType string
store type of the entity.
baseBranch String
Name of the default branch (this checks out a new branch titled by branch_name).
branch String
Name of the branch.
commitMessage String
message for the commit in Git Repo.
connectorRef String
Identifier of the Harness Connector used for importing entity from Git To reference a connector at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a connector at the account scope, prefix 'account` to the expression: account.{identifier}.
filePath String
File path of the Entity in the repository.
importFromGit Boolean
Flag to set if importing from Git
isForceImport Boolean
Flag to set if force importing from Git
isHarnesscodeRepo Boolean
If the gitProvider is HarnessCode
isNewBranch Boolean
If a new branch creation is requested.
lastCommitId String
Last commit identifier (for Git Repositories other than Github). To be provided only when updating Infrastructures.
lastObjectId String
Last object identifier (for Github). To be provided only when updating Infrastructures.
loadFromCache String
If the Entity is to be fetched from cache
loadFromFallbackBranch Boolean
Whether the file has to be get from fallback_branch.
parentEntityConnectorRef String
Identifier of the Harness Connector used for CRUD operations on the Parent Entity. To reference a connector at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a connector at the account scope, prefix 'account` to the expression: account.{identifier}.
parentEntityRepoName String
Name of the repository where parent entity lies.
repoName String
Name of the repository.
storeType String
store type of the entity.
baseBranch string
Name of the default branch (this checks out a new branch titled by branch_name).
branch string
Name of the branch.
commitMessage string
message for the commit in Git Repo.
connectorRef string
Identifier of the Harness Connector used for importing entity from Git To reference a connector at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a connector at the account scope, prefix 'account` to the expression: account.{identifier}.
filePath string
File path of the Entity in the repository.
importFromGit boolean
Flag to set if importing from Git
isForceImport boolean
Flag to set if force importing from Git
isHarnesscodeRepo boolean
If the gitProvider is HarnessCode
isNewBranch boolean
If a new branch creation is requested.
lastCommitId string
Last commit identifier (for Git Repositories other than Github). To be provided only when updating Infrastructures.
lastObjectId string
Last object identifier (for Github). To be provided only when updating Infrastructures.
loadFromCache string
If the Entity is to be fetched from cache
loadFromFallbackBranch boolean
Whether the file has to be get from fallback_branch.
parentEntityConnectorRef string
Identifier of the Harness Connector used for CRUD operations on the Parent Entity. To reference a connector at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a connector at the account scope, prefix 'account` to the expression: account.{identifier}.
parentEntityRepoName string
Name of the repository where parent entity lies.
repoName string
Name of the repository.
storeType string
store type of the entity.
base_branch str
Name of the default branch (this checks out a new branch titled by branch_name).
branch str
Name of the branch.
commit_message str
message for the commit in Git Repo.
connector_ref str
Identifier of the Harness Connector used for importing entity from Git To reference a connector at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a connector at the account scope, prefix 'account` to the expression: account.{identifier}.
file_path str
File path of the Entity in the repository.
import_from_git bool
Flag to set if importing from Git
is_force_import bool
Flag to set if force importing from Git
is_harnesscode_repo bool
If the gitProvider is HarnessCode
is_new_branch bool
If a new branch creation is requested.
last_commit_id str
Last commit identifier (for Git Repositories other than Github). To be provided only when updating Infrastructures.
last_object_id str
Last object identifier (for Github). To be provided only when updating Infrastructures.
load_from_cache str
If the Entity is to be fetched from cache
load_from_fallback_branch bool
Whether the file has to be get from fallback_branch.
parent_entity_connector_ref str
Identifier of the Harness Connector used for CRUD operations on the Parent Entity. To reference a connector at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a connector at the account scope, prefix 'account` to the expression: account.{identifier}.
parent_entity_repo_name str
Name of the repository where parent entity lies.
repo_name str
Name of the repository.
store_type str
store type of the entity.
baseBranch String
Name of the default branch (this checks out a new branch titled by branch_name).
branch String
Name of the branch.
commitMessage String
message for the commit in Git Repo.
connectorRef String
Identifier of the Harness Connector used for importing entity from Git To reference a connector at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a connector at the account scope, prefix 'account` to the expression: account.{identifier}.
filePath String
File path of the Entity in the repository.
importFromGit Boolean
Flag to set if importing from Git
isForceImport Boolean
Flag to set if force importing from Git
isHarnesscodeRepo Boolean
If the gitProvider is HarnessCode
isNewBranch Boolean
If a new branch creation is requested.
lastCommitId String
Last commit identifier (for Git Repositories other than Github). To be provided only when updating Infrastructures.
lastObjectId String
Last object identifier (for Github). To be provided only when updating Infrastructures.
loadFromCache String
If the Entity is to be fetched from cache
loadFromFallbackBranch Boolean
Whether the file has to be get from fallback_branch.
parentEntityConnectorRef String
Identifier of the Harness Connector used for CRUD operations on the Parent Entity. To reference a connector at the organization scope, prefix 'org' to the expression: org.{identifier}. To reference a connector at the account scope, prefix 'account` to the expression: account.{identifier}.
parentEntityRepoName String
Name of the repository where parent entity lies.
repoName String
Name of the repository.
storeType String
store type of the entity.

Import

Import account level infrastructure

$ pulumi import harness:platform/infrastructure:Infrastructure example <env_id>/<infrastructure_id>
Copy

Import org level infrastructure

$ pulumi import harness:platform/infrastructure:Infrastructure example <org_id>/<env_id>/<infrastructure_id>
Copy

Import project level infrastructure

$ pulumi import harness:platform/infrastructure:Infrastructure example <org_id>/<project_id>/<env_id>/<infrastructure_id>
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
harness pulumi/pulumi-harness
License
Apache-2.0
Notes
This Pulumi package is based on the harness Terraform Provider.