harness.platform.GitOpsAgent
Explore with Pulumi AI
Resource for creating a Harness Gitops Agents.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Lbrlabs.PulumiPackage.Harness;
return await Deployment.RunAsync(() =>
{
var example = new Harness.Platform.GitOpsAgent("example", new()
{
AccountId = "account_id",
Identifier = "identifier",
Metadatas = new[]
{
new Harness.Platform.Inputs.GitOpsAgentMetadataArgs
{
HighAvailability = true,
Namespace = "namespace",
},
},
OrgId = "org_id",
ProjectId = "project_id",
Type = "MANAGED_ARGO_PROVIDER",
});
});
package main
import (
"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.NewGitOpsAgent(ctx, "example", &platform.GitOpsAgentArgs{
AccountId: pulumi.String("account_id"),
Identifier: pulumi.String("identifier"),
Metadatas: platform.GitOpsAgentMetadataArray{
&platform.GitOpsAgentMetadataArgs{
HighAvailability: pulumi.Bool(true),
Namespace: pulumi.String("namespace"),
},
},
OrgId: pulumi.String("org_id"),
ProjectId: pulumi.String("project_id"),
Type: pulumi.String("MANAGED_ARGO_PROVIDER"),
})
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.GitOpsAgent;
import com.pulumi.harness.platform.GitOpsAgentArgs;
import com.pulumi.harness.platform.inputs.GitOpsAgentMetadataArgs;
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 GitOpsAgent("example", GitOpsAgentArgs.builder()
.accountId("account_id")
.identifier("identifier")
.metadatas(GitOpsAgentMetadataArgs.builder()
.highAvailability(true)
.namespace("namespace")
.build())
.orgId("org_id")
.projectId("project_id")
.type("MANAGED_ARGO_PROVIDER")
.build());
}
}
import pulumi
import lbrlabs_pulumi_harness as harness
example = harness.platform.GitOpsAgent("example",
account_id="account_id",
identifier="identifier",
metadatas=[harness.platform.GitOpsAgentMetadataArgs(
high_availability=True,
namespace="namespace",
)],
org_id="org_id",
project_id="project_id",
type="MANAGED_ARGO_PROVIDER")
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@lbrlabs/pulumi-harness";
const example = new harness.platform.GitOpsAgent("example", {
accountId: "account_id",
identifier: "identifier",
metadatas: [{
highAvailability: true,
namespace: "namespace",
}],
orgId: "org_id",
projectId: "project_id",
type: "MANAGED_ARGO_PROVIDER",
});
resources:
example:
type: harness:platform:GitOpsAgent
properties:
accountId: account_id
identifier: identifier
metadatas:
- highAvailability: true
namespace: namespace
orgId: org_id
projectId: project_id
type: MANAGED_ARGO_PROVIDER
Create GitOpsAgent Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GitOpsAgent(name: string, args: GitOpsAgentArgs, opts?: CustomResourceOptions);
@overload
def GitOpsAgent(resource_name: str,
args: GitOpsAgentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def GitOpsAgent(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
identifier: Optional[str] = None,
type: Optional[str] = None,
description: Optional[str] = None,
metadatas: Optional[Sequence[GitOpsAgentMetadataArgs]] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None)
func NewGitOpsAgent(ctx *Context, name string, args GitOpsAgentArgs, opts ...ResourceOption) (*GitOpsAgent, error)
public GitOpsAgent(string name, GitOpsAgentArgs args, CustomResourceOptions? opts = null)
public GitOpsAgent(String name, GitOpsAgentArgs args)
public GitOpsAgent(String name, GitOpsAgentArgs args, CustomResourceOptions options)
type: harness:platform:GitOpsAgent
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args GitOpsAgentArgs
- 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 GitOpsAgentArgs
- 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 GitOpsAgentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GitOpsAgentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GitOpsAgentArgs
- 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 gitOpsAgentResource = new Harness.Platform.GitOpsAgent("gitOpsAgentResource", new()
{
AccountId = "string",
Identifier = "string",
Type = "string",
Description = "string",
Metadatas = new[]
{
new Harness.Platform.Inputs.GitOpsAgentMetadataArgs
{
HighAvailability = false,
Namespace = "string",
},
},
Name = "string",
OrgId = "string",
ProjectId = "string",
Tags =
{
{ "string", "string" },
},
});
example, err := platform.NewGitOpsAgent(ctx, "gitOpsAgentResource", &platform.GitOpsAgentArgs{
AccountId: pulumi.String("string"),
Identifier: pulumi.String("string"),
Type: pulumi.String("string"),
Description: pulumi.String("string"),
Metadatas: platform.GitOpsAgentMetadataArray{
&platform.GitOpsAgentMetadataArgs{
HighAvailability: pulumi.Bool(false),
Namespace: pulumi.String("string"),
},
},
Name: pulumi.String("string"),
OrgId: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var gitOpsAgentResource = new GitOpsAgent("gitOpsAgentResource", GitOpsAgentArgs.builder()
.accountId("string")
.identifier("string")
.type("string")
.description("string")
.metadatas(GitOpsAgentMetadataArgs.builder()
.highAvailability(false)
.namespace("string")
.build())
.name("string")
.orgId("string")
.projectId("string")
.tags(Map.of("string", "string"))
.build());
git_ops_agent_resource = harness.platform.GitOpsAgent("gitOpsAgentResource",
account_id="string",
identifier="string",
type="string",
description="string",
metadatas=[harness.platform.GitOpsAgentMetadataArgs(
high_availability=False,
namespace="string",
)],
name="string",
org_id="string",
project_id="string",
tags={
"string": "string",
})
const gitOpsAgentResource = new harness.platform.GitOpsAgent("gitOpsAgentResource", {
accountId: "string",
identifier: "string",
type: "string",
description: "string",
metadatas: [{
highAvailability: false,
namespace: "string",
}],
name: "string",
orgId: "string",
projectId: "string",
tags: {
string: "string",
},
});
type: harness:platform:GitOpsAgent
properties:
accountId: string
description: string
identifier: string
metadatas:
- highAvailability: false
namespace: string
name: string
orgId: string
projectId: string
tags:
string: string
type: string
GitOpsAgent 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 GitOpsAgent resource accepts the following input properties:
- Account
Id string - Account identifier of the GitOps agent.
- Identifier string
- Identifier of the GitOps agent.
- Type string
- Default: "AGENTTYPEUNSET" Enum: "AGENTTYPEUNSET" "CONNECTEDARGOPROVIDER" "MANAGEDARGOPROVIDER"
- Description string
- Description of the GitOps agent.
- Metadatas
List<Lbrlabs.
Pulumi Package. Harness. Platform. Inputs. Git Ops Agent Metadata> - Metadata of the agent.
- Name string
- Name of the GitOps agent.
- Org
Id string - Organization identifier of the GitOps agent.
- Project
Id string - Project identifier of the GitOps agent.
- Dictionary<string, string>
- Tags for the GitOps agents. These can be used to search or filter the GitOps agents.
- Account
Id string - Account identifier of the GitOps agent.
- Identifier string
- Identifier of the GitOps agent.
- Type string
- Default: "AGENTTYPEUNSET" Enum: "AGENTTYPEUNSET" "CONNECTEDARGOPROVIDER" "MANAGEDARGOPROVIDER"
- Description string
- Description of the GitOps agent.
- Metadatas
[]Git
Ops Agent Metadata Args - Metadata of the agent.
- Name string
- Name of the GitOps agent.
- Org
Id string - Organization identifier of the GitOps agent.
- Project
Id string - Project identifier of the GitOps agent.
- map[string]string
- Tags for the GitOps agents. These can be used to search or filter the GitOps agents.
- account
Id String - Account identifier of the GitOps agent.
- identifier String
- Identifier of the GitOps agent.
- type String
- Default: "AGENTTYPEUNSET" Enum: "AGENTTYPEUNSET" "CONNECTEDARGOPROVIDER" "MANAGEDARGOPROVIDER"
- description String
- Description of the GitOps agent.
- metadatas
List<Git
Ops Agent Metadata> - Metadata of the agent.
- name String
- Name of the GitOps agent.
- org
Id String - Organization identifier of the GitOps agent.
- project
Id String - Project identifier of the GitOps agent.
- Map<String,String>
- Tags for the GitOps agents. These can be used to search or filter the GitOps agents.
- account
Id string - Account identifier of the GitOps agent.
- identifier string
- Identifier of the GitOps agent.
- type string
- Default: "AGENTTYPEUNSET" Enum: "AGENTTYPEUNSET" "CONNECTEDARGOPROVIDER" "MANAGEDARGOPROVIDER"
- description string
- Description of the GitOps agent.
- metadatas
Git
Ops Agent Metadata[] - Metadata of the agent.
- name string
- Name of the GitOps agent.
- org
Id string - Organization identifier of the GitOps agent.
- project
Id string - Project identifier of the GitOps agent.
- {[key: string]: string}
- Tags for the GitOps agents. These can be used to search or filter the GitOps agents.
- account_
id str - Account identifier of the GitOps agent.
- identifier str
- Identifier of the GitOps agent.
- type str
- Default: "AGENTTYPEUNSET" Enum: "AGENTTYPEUNSET" "CONNECTEDARGOPROVIDER" "MANAGEDARGOPROVIDER"
- description str
- Description of the GitOps agent.
- metadatas
Sequence[Git
Ops Agent Metadata Args] - Metadata of the agent.
- name str
- Name of the GitOps agent.
- org_
id str - Organization identifier of the GitOps agent.
- project_
id str - Project identifier of the GitOps agent.
- Mapping[str, str]
- Tags for the GitOps agents. These can be used to search or filter the GitOps agents.
- account
Id String - Account identifier of the GitOps agent.
- identifier String
- Identifier of the GitOps agent.
- type String
- Default: "AGENTTYPEUNSET" Enum: "AGENTTYPEUNSET" "CONNECTEDARGOPROVIDER" "MANAGEDARGOPROVIDER"
- description String
- Description of the GitOps agent.
- metadatas List<Property Map>
- Metadata of the agent.
- name String
- Name of the GitOps agent.
- org
Id String - Organization identifier of the GitOps agent.
- project
Id String - Project identifier of the GitOps agent.
- Map<String>
- Tags for the GitOps agents. These can be used to search or filter the GitOps agents.
Outputs
All input properties are implicitly available as output properties. Additionally, the GitOpsAgent 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 GitOpsAgent Resource
Get an existing GitOpsAgent 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?: GitOpsAgentState, opts?: CustomResourceOptions): GitOpsAgent
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
description: Optional[str] = None,
identifier: Optional[str] = None,
metadatas: Optional[Sequence[GitOpsAgentMetadataArgs]] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
type: Optional[str] = None) -> GitOpsAgent
func GetGitOpsAgent(ctx *Context, name string, id IDInput, state *GitOpsAgentState, opts ...ResourceOption) (*GitOpsAgent, error)
public static GitOpsAgent Get(string name, Input<string> id, GitOpsAgentState? state, CustomResourceOptions? opts = null)
public static GitOpsAgent get(String name, Output<String> id, GitOpsAgentState 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.
- Account
Id string - Account identifier of the GitOps agent.
- Description string
- Description of the GitOps agent.
- Identifier string
- Identifier of the GitOps agent.
- Metadatas
List<Lbrlabs.
Pulumi Package. Harness. Platform. Inputs. Git Ops Agent Metadata> - Metadata of the agent.
- Name string
- Name of the GitOps agent.
- Org
Id string - Organization identifier of the GitOps agent.
- Project
Id string - Project identifier of the GitOps agent.
- Dictionary<string, string>
- Tags for the GitOps agents. These can be used to search or filter the GitOps agents.
- Type string
- Default: "AGENTTYPEUNSET" Enum: "AGENTTYPEUNSET" "CONNECTEDARGOPROVIDER" "MANAGEDARGOPROVIDER"
- Account
Id string - Account identifier of the GitOps agent.
- Description string
- Description of the GitOps agent.
- Identifier string
- Identifier of the GitOps agent.
- Metadatas
[]Git
Ops Agent Metadata Args - Metadata of the agent.
- Name string
- Name of the GitOps agent.
- Org
Id string - Organization identifier of the GitOps agent.
- Project
Id string - Project identifier of the GitOps agent.
- map[string]string
- Tags for the GitOps agents. These can be used to search or filter the GitOps agents.
- Type string
- Default: "AGENTTYPEUNSET" Enum: "AGENTTYPEUNSET" "CONNECTEDARGOPROVIDER" "MANAGEDARGOPROVIDER"
- account
Id String - Account identifier of the GitOps agent.
- description String
- Description of the GitOps agent.
- identifier String
- Identifier of the GitOps agent.
- metadatas
List<Git
Ops Agent Metadata> - Metadata of the agent.
- name String
- Name of the GitOps agent.
- org
Id String - Organization identifier of the GitOps agent.
- project
Id String - Project identifier of the GitOps agent.
- Map<String,String>
- Tags for the GitOps agents. These can be used to search or filter the GitOps agents.
- type String
- Default: "AGENTTYPEUNSET" Enum: "AGENTTYPEUNSET" "CONNECTEDARGOPROVIDER" "MANAGEDARGOPROVIDER"
- account
Id string - Account identifier of the GitOps agent.
- description string
- Description of the GitOps agent.
- identifier string
- Identifier of the GitOps agent.
- metadatas
Git
Ops Agent Metadata[] - Metadata of the agent.
- name string
- Name of the GitOps agent.
- org
Id string - Organization identifier of the GitOps agent.
- project
Id string - Project identifier of the GitOps agent.
- {[key: string]: string}
- Tags for the GitOps agents. These can be used to search or filter the GitOps agents.
- type string
- Default: "AGENTTYPEUNSET" Enum: "AGENTTYPEUNSET" "CONNECTEDARGOPROVIDER" "MANAGEDARGOPROVIDER"
- account_
id str - Account identifier of the GitOps agent.
- description str
- Description of the GitOps agent.
- identifier str
- Identifier of the GitOps agent.
- metadatas
Sequence[Git
Ops Agent Metadata Args] - Metadata of the agent.
- name str
- Name of the GitOps agent.
- org_
id str - Organization identifier of the GitOps agent.
- project_
id str - Project identifier of the GitOps agent.
- Mapping[str, str]
- Tags for the GitOps agents. These can be used to search or filter the GitOps agents.
- type str
- Default: "AGENTTYPEUNSET" Enum: "AGENTTYPEUNSET" "CONNECTEDARGOPROVIDER" "MANAGEDARGOPROVIDER"
- account
Id String - Account identifier of the GitOps agent.
- description String
- Description of the GitOps agent.
- identifier String
- Identifier of the GitOps agent.
- metadatas List<Property Map>
- Metadata of the agent.
- name String
- Name of the GitOps agent.
- org
Id String - Organization identifier of the GitOps agent.
- project
Id String - Project identifier of the GitOps agent.
- Map<String>
- Tags for the GitOps agents. These can be used to search or filter the GitOps agents.
- type String
- Default: "AGENTTYPEUNSET" Enum: "AGENTTYPEUNSET" "CONNECTEDARGOPROVIDER" "MANAGEDARGOPROVIDER"
Supporting Types
GitOpsAgentMetadata, GitOpsAgentMetadataArgs
- High
Availability bool - Indicates if the deployment should be deployed using the deploy-ha.yaml
- Namespace string
- The k8s namespace that this agent resides in.
- High
Availability bool - Indicates if the deployment should be deployed using the deploy-ha.yaml
- Namespace string
- The k8s namespace that this agent resides in.
- high
Availability Boolean - Indicates if the deployment should be deployed using the deploy-ha.yaml
- namespace String
- The k8s namespace that this agent resides in.
- high
Availability boolean - Indicates if the deployment should be deployed using the deploy-ha.yaml
- namespace string
- The k8s namespace that this agent resides in.
- high_
availability bool - Indicates if the deployment should be deployed using the deploy-ha.yaml
- namespace str
- The k8s namespace that this agent resides in.
- high
Availability Boolean - Indicates if the deployment should be deployed using the deploy-ha.yaml
- namespace String
- The k8s namespace that this agent resides in.
Import
Import a Account level Gitops Agent
$ pulumi import harness:platform/gitOpsAgent:GitOpsAgent example <agent_id>
Import a Project level Gitops Agent
$ pulumi import harness:platform/gitOpsAgent:GitOpsAgent example <organization_id>/<project_id>/<agent_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- harness lbrlabs/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harness
Terraform Provider.