harness.platform.Infrastructure

Data source for retrieving a Harness Infrastructure.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Harness = Lbrlabs.PulumiPackage.Harness;

return await Deployment.RunAsync(() => 
{
    var example = new Harness.Platform.Infrastructure("example", new()
    {
        DeploymentType = "Kubernetes",
        EnvId = "environmentIdentifier",
        Identifier = "identifier",
        OrgId = "orgIdentifer",
        ProjectId = "projectIdentifier",
        Type = "KubernetesDirect",
        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

",
    });

});
package main

import (
	"fmt"

	"github.com/lbrlabs/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{
			DeploymentType: pulumi.String("Kubernetes"),
			EnvId:          pulumi.String("environmentIdentifier"),
			Identifier:     pulumi.String("identifier"),
			OrgId:          pulumi.String("orgIdentifer"),
			ProjectId:      pulumi.String("projectIdentifier"),
			Type:           pulumi.String("KubernetesDirect"),
			Yaml: pulumi.String(fmt.Sprintf(`			   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
	})
}
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()        
            .deploymentType("Kubernetes")
            .envId("environmentIdentifier")
            .identifier("identifier")
            .orgId("orgIdentifer")
            .projectId("projectIdentifier")
            .type("KubernetesDirect")
            .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());

    }
}
import pulumi
import lbrlabs_pulumi_harness as harness

example = harness.platform.Infrastructure("example",
    deployment_type="Kubernetes",
    env_id="environmentIdentifier",
    identifier="identifier",
    org_id="orgIdentifer",
    project_id="projectIdentifier",
    type="KubernetesDirect",
    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

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

const example = new harness.platform.Infrastructure("example", {
    deploymentType: "Kubernetes",
    envId: "environmentIdentifier",
    identifier: "identifier",
    orgId: "orgIdentifer",
    projectId: "projectIdentifier",
    type: "KubernetesDirect",
    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
`,
});
resources:
  example:
    type: harness:platform:Infrastructure
    properties:
      deploymentType: Kubernetes
      envId: environmentIdentifier
      identifier: identifier
      orgId: orgIdentifer
      projectId: projectIdentifier
      type: KubernetesDirect
      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        

Create Infrastructure Resource

new Infrastructure(name: string, args: InfrastructureArgs, opts?: CustomResourceOptions);
@overload
def Infrastructure(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   deployment_type: Optional[str] = None,
                   description: Optional[str] = None,
                   env_id: Optional[str] = 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)
@overload
def Infrastructure(resource_name: str,
                   args: InfrastructureArgs,
                   opts: Optional[ResourceOptions] = 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.

name string
The unique name of the resource.
args InfrastructureArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args 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 string
The unique name of the resource.
args InfrastructureArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args InfrastructureArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args InfrastructureArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

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

The Infrastructure resource accepts the following input properties:

EnvId string

environment identifier.

Identifier string

Unique identifier of the resource.

OrgId string

Unique identifier of the Organization.

ProjectId string

Unique identifier of the Project.

Type string

Type of Infrastructure. Valid values are KUBERNETESDIRECT, KUBERNETESGCP, SERVERLESSAWSLAMBDA, PDC, KUBERNETESAZURE, SSHWINRMAZURE, SSHWINRMAWS, AZUREWEBAPP, ECS, GITOPS, CUSTOMDEPLOYMENT.

Yaml string

Infrastructure YAML

DeploymentType string

Infrastructure deployment type. Valid values are KUBERNETESDIRECT, KUBERNETESGCP, SERVERLESSAWSLAMBDA, PDC, KUBERNETESAZURE, SSHWINRMAZURE, SSHWINRMAWS, AZUREWEBAPP, ECS, GITOPS, CUSTOMDEPLOYMENT.

Description string

Description of the resource.

Name string

Name of the resource.

Tags List<string>

Tags to associate with the resource. Tags should be in the form name:value.

EnvId string

environment identifier.

Identifier string

Unique identifier of the resource.

OrgId string

Unique identifier of the Organization.

ProjectId string

Unique identifier of the Project.

Type string

Type of Infrastructure. Valid values are KUBERNETESDIRECT, KUBERNETESGCP, SERVERLESSAWSLAMBDA, PDC, KUBERNETESAZURE, SSHWINRMAZURE, SSHWINRMAWS, AZUREWEBAPP, ECS, GITOPS, CUSTOMDEPLOYMENT.

Yaml string

Infrastructure YAML

DeploymentType string

Infrastructure deployment type. Valid values are KUBERNETESDIRECT, KUBERNETESGCP, SERVERLESSAWSLAMBDA, PDC, KUBERNETESAZURE, SSHWINRMAZURE, SSHWINRMAWS, AZUREWEBAPP, ECS, GITOPS, CUSTOMDEPLOYMENT.

Description string

Description of the resource.

Name string

Name of the resource.

Tags []string

Tags to associate with the resource. Tags should be in the form name:value.

envId String

environment identifier.

identifier String

Unique identifier of the resource.

orgId String

Unique identifier of the Organization.

projectId String

Unique identifier of the Project.

type String

Type of Infrastructure. Valid values are KUBERNETESDIRECT, KUBERNETESGCP, SERVERLESSAWSLAMBDA, PDC, KUBERNETESAZURE, SSHWINRMAZURE, SSHWINRMAWS, AZUREWEBAPP, ECS, GITOPS, CUSTOMDEPLOYMENT.

yaml String

Infrastructure YAML

deploymentType String

Infrastructure deployment type. Valid values are KUBERNETESDIRECT, KUBERNETESGCP, SERVERLESSAWSLAMBDA, PDC, KUBERNETESAZURE, SSHWINRMAZURE, SSHWINRMAWS, AZUREWEBAPP, ECS, GITOPS, CUSTOMDEPLOYMENT.

description String

Description of the resource.

name String

Name of the resource.

tags List<String>

Tags to associate with the resource. Tags should be in the form name:value.

envId string

environment identifier.

identifier string

Unique identifier of the resource.

orgId string

Unique identifier of the Organization.

projectId string

Unique identifier of the Project.

type string

Type of Infrastructure. Valid values are KUBERNETESDIRECT, KUBERNETESGCP, SERVERLESSAWSLAMBDA, PDC, KUBERNETESAZURE, SSHWINRMAZURE, SSHWINRMAWS, AZUREWEBAPP, ECS, GITOPS, CUSTOMDEPLOYMENT.

yaml string

Infrastructure YAML

deploymentType string

Infrastructure deployment type. Valid values are KUBERNETESDIRECT, KUBERNETESGCP, SERVERLESSAWSLAMBDA, PDC, KUBERNETESAZURE, SSHWINRMAZURE, SSHWINRMAWS, AZUREWEBAPP, ECS, GITOPS, CUSTOMDEPLOYMENT.

description string

Description of the resource.

name string

Name of the resource.

tags string[]

Tags to associate with the resource. Tags should be in the form name:value.

env_id str

environment identifier.

identifier str

Unique identifier of the resource.

org_id str

Unique identifier of the Organization.

project_id str

Unique identifier of the Project.

type str

Type of Infrastructure. Valid values are KUBERNETESDIRECT, KUBERNETESGCP, SERVERLESSAWSLAMBDA, PDC, KUBERNETESAZURE, SSHWINRMAZURE, SSHWINRMAWS, AZUREWEBAPP, ECS, GITOPS, CUSTOMDEPLOYMENT.

yaml str

Infrastructure YAML

deployment_type str

Infrastructure deployment type. Valid values are KUBERNETESDIRECT, KUBERNETESGCP, SERVERLESSAWSLAMBDA, PDC, KUBERNETESAZURE, SSHWINRMAZURE, SSHWINRMAWS, AZUREWEBAPP, ECS, GITOPS, CUSTOMDEPLOYMENT.

description str

Description of the resource.

name str

Name of the resource.

tags Sequence[str]

Tags to associate with the resource. Tags should be in the form name:value.

envId String

environment identifier.

identifier String

Unique identifier of the resource.

orgId String

Unique identifier of the Organization.

projectId String

Unique identifier of the Project.

type String

Type of Infrastructure. Valid values are KUBERNETESDIRECT, KUBERNETESGCP, SERVERLESSAWSLAMBDA, PDC, KUBERNETESAZURE, SSHWINRMAZURE, SSHWINRMAWS, AZUREWEBAPP, ECS, GITOPS, CUSTOMDEPLOYMENT.

yaml String

Infrastructure YAML

deploymentType String

Infrastructure deployment type. Valid values are KUBERNETESDIRECT, KUBERNETESGCP, SERVERLESSAWSLAMBDA, PDC, KUBERNETESAZURE, SSHWINRMAZURE, SSHWINRMAWS, AZUREWEBAPP, ECS, GITOPS, CUSTOMDEPLOYMENT.

description String

Description of the resource.

name String

Name of the resource.

tags List<String>

Tags to associate with the resource. Tags should be in the form name:value.

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,
        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)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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 KUBERNETESDIRECT, KUBERNETESGCP, SERVERLESSAWSLAMBDA, PDC, KUBERNETESAZURE, SSHWINRMAZURE, SSHWINRMAWS, AZUREWEBAPP, ECS, GITOPS, CUSTOMDEPLOYMENT.

Description string

Description of the resource.

EnvId string

environment identifier.

Identifier 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. Tags should be in the form name:value.

Type string

Type of Infrastructure. Valid values are KUBERNETESDIRECT, KUBERNETESGCP, SERVERLESSAWSLAMBDA, PDC, KUBERNETESAZURE, SSHWINRMAZURE, SSHWINRMAWS, AZUREWEBAPP, ECS, GITOPS, CUSTOMDEPLOYMENT.

Yaml string

Infrastructure YAML

DeploymentType string

Infrastructure deployment type. Valid values are KUBERNETESDIRECT, KUBERNETESGCP, SERVERLESSAWSLAMBDA, PDC, KUBERNETESAZURE, SSHWINRMAZURE, SSHWINRMAWS, AZUREWEBAPP, ECS, GITOPS, CUSTOMDEPLOYMENT.

Description string

Description of the resource.

EnvId string

environment identifier.

Identifier 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. Tags should be in the form name:value.

Type string

Type of Infrastructure. Valid values are KUBERNETESDIRECT, KUBERNETESGCP, SERVERLESSAWSLAMBDA, PDC, KUBERNETESAZURE, SSHWINRMAZURE, SSHWINRMAWS, AZUREWEBAPP, ECS, GITOPS, CUSTOMDEPLOYMENT.

Yaml string

Infrastructure YAML

deploymentType String

Infrastructure deployment type. Valid values are KUBERNETESDIRECT, KUBERNETESGCP, SERVERLESSAWSLAMBDA, PDC, KUBERNETESAZURE, SSHWINRMAZURE, SSHWINRMAWS, AZUREWEBAPP, ECS, GITOPS, CUSTOMDEPLOYMENT.

description String

Description of the resource.

envId String

environment identifier.

identifier 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. Tags should be in the form name:value.

type String

Type of Infrastructure. Valid values are KUBERNETESDIRECT, KUBERNETESGCP, SERVERLESSAWSLAMBDA, PDC, KUBERNETESAZURE, SSHWINRMAZURE, SSHWINRMAWS, AZUREWEBAPP, ECS, GITOPS, CUSTOMDEPLOYMENT.

yaml String

Infrastructure YAML

deploymentType string

Infrastructure deployment type. Valid values are KUBERNETESDIRECT, KUBERNETESGCP, SERVERLESSAWSLAMBDA, PDC, KUBERNETESAZURE, SSHWINRMAZURE, SSHWINRMAWS, AZUREWEBAPP, ECS, GITOPS, CUSTOMDEPLOYMENT.

description string

Description of the resource.

envId string

environment identifier.

identifier 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. Tags should be in the form name:value.

type string

Type of Infrastructure. Valid values are KUBERNETESDIRECT, KUBERNETESGCP, SERVERLESSAWSLAMBDA, PDC, KUBERNETESAZURE, SSHWINRMAZURE, SSHWINRMAWS, AZUREWEBAPP, ECS, GITOPS, CUSTOMDEPLOYMENT.

yaml string

Infrastructure YAML

deployment_type str

Infrastructure deployment type. Valid values are KUBERNETESDIRECT, KUBERNETESGCP, SERVERLESSAWSLAMBDA, PDC, KUBERNETESAZURE, SSHWINRMAZURE, SSHWINRMAWS, AZUREWEBAPP, ECS, GITOPS, CUSTOMDEPLOYMENT.

description str

Description of the resource.

env_id str

environment identifier.

identifier 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. Tags should be in the form name:value.

type str

Type of Infrastructure. Valid values are KUBERNETESDIRECT, KUBERNETESGCP, SERVERLESSAWSLAMBDA, PDC, KUBERNETESAZURE, SSHWINRMAZURE, SSHWINRMAWS, AZUREWEBAPP, ECS, GITOPS, CUSTOMDEPLOYMENT.

yaml str

Infrastructure YAML

deploymentType String

Infrastructure deployment type. Valid values are KUBERNETESDIRECT, KUBERNETESGCP, SERVERLESSAWSLAMBDA, PDC, KUBERNETESAZURE, SSHWINRMAZURE, SSHWINRMAWS, AZUREWEBAPP, ECS, GITOPS, CUSTOMDEPLOYMENT.

description String

Description of the resource.

envId String

environment identifier.

identifier 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. Tags should be in the form name:value.

type String

Type of Infrastructure. Valid values are KUBERNETESDIRECT, KUBERNETESGCP, SERVERLESSAWSLAMBDA, PDC, KUBERNETESAZURE, SSHWINRMAZURE, SSHWINRMAWS, AZUREWEBAPP, ECS, GITOPS, CUSTOMDEPLOYMENT.

yaml String

Infrastructure YAML

Import

Import using infrastructure id

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

Package Details

Repository
harness lbrlabs/pulumi-harness
License
Apache-2.0
Notes

This Pulumi package is based on the harness Terraform Provider.