import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Resource for managing a Harness Gitops Applicationset. Please note this resource is in an alpha/experimental state and is subject to change. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as harness from "@pulumi/harness"; * * // Example 1: Cluster Generator * const clusterGenerator = new harness.platform.GitopsApplicationset("cluster_generator", { * orgId: "default", * projectId: "projectId", * agentId: "account.agentuseast1", * upsert: true, * applicationset: { * metadata: { * name: "cluster-appset", * namespace: "argocd", * }, * spec: { * goTemplate: true, * goTemplateOptions: ["missingkey=error"], * generators: [{ * clusters: [{ * enabled: true, * }], * }], * template: { * metadata: { * name: "{{.name}}-guestbook", * labels: { * env: "dev", * }, * }, * spec: { * project: "default", * sources: [{ * repoUrl: "https://github.com/argoproj/argocd-example-apps.git", * path: "helm-guestbook", * targetRevision: "HEAD", * }], * destination: { * server: "{{.url}}", * namespace: "app-ns-{{.name}}", * }, * }, * }, * }, * }, * }); * // Example 2: List Generator * const listGenerator = new harness.platform.GitopsApplicationset("list_generator", { * orgId: "default", * projectId: "projectId", * agentId: "account.agentuseast1", * upsert: true, * applicationset: { * metadata: { * name: "list-appset", * }, * spec: { * goTemplate: true, * goTemplateOptions: ["missingkey=error"], * generators: [{ * lists: [{ * elements: [ * { * cluster: "engineering-dev", * url: "https://kubernetes.default.svc", * }, * { * cluster: "engineering-prod", * url: "https://kubernetes.prod.svc", * }, * ], * }], * }], * template: { * metadata: { * name: "{{.cluster}}-guestbook", * }, * spec: { * project: "default", * sources: [{ * repoUrl: "https://github.com/argoproj/argocd-example-apps.git", * path: "helm-guestbook", * targetRevision: "HEAD", * }], * destination: { * server: "{{.url}}", * namespace: "default", * }, * }, * }, * }, * }, * }); * // Example 3: Git Generator with Files * const gitFiles = new harness.platform.GitopsApplicationset("git_files", { * orgId: "default", * projectId: "projectId", * agentId: "account.agentuseast1", * upsert: true, * applicationset: { * metadata: { * name: "git-files-appset", * }, * spec: { * generators: [{ * gits: [{ * repoUrl: "https://github.com/example/config-repo", * revision: "main", * files: [{ * path: "apps/*/config.json", * }], * }], * }], * template: { * metadata: { * name: "{{.path.basename}}-app", * }, * spec: { * project: "default", * sources: [{ * repoUrl: "https://github.com/example/app-repo", * path: "{{.path.path}}", * targetRevision: "main", * }], * destination: { * server: "https://kubernetes.default.svc", * namespace: "{{.path.basename}}", * }, * }, * }, * }, * }, * }); * // Example 4: Git Generator with Directories * const gitDirectories = new harness.platform.GitopsApplicationset("git_directories", { * orgId: "default", * projectId: "projectId", * agentId: "account.agentuseast1", * upsert: true, * applicationset: { * metadata: { * name: "git-directories-appset", * }, * spec: { * generators: [{ * gits: [{ * repoUrl: "https://github.com/argoproj/argo-cd.git", * revision: "HEAD", * directories: [{ * path: "applicationset/examples/git-generator-directory/cluster-addons/*", * exclude: false, * }], * }], * }], * template: { * metadata: { * name: "{{.path.basename}}-addon", * }, * spec: { * project: "default", * sources: [{ * repoUrl: "https://github.com/argoproj/argo-cd.git", * path: "{{.path.path}}", * targetRevision: "HEAD", * }], * destination: { * server: "https://kubernetes.default.svc", * namespace: "{{.path.basename}}", * }, * syncPolicy: { * automated: { * prune: true, * selfHeal: true, * }, * }, * }, * }, * }, * }, * }); * ``` * * ## Import * * The `pulumi import` command can be used, for example: * * Import gitOps applicationset with account level agent, agent id has account prefix # * * ```sh * $ pulumi import harness:platform/gitopsApplicationset:GitopsApplicationset example /// * ``` * * Import gitOps applicationset with org level agent, agent id has org prefix # * * ```sh * $ pulumi import harness:platform/gitopsApplicationset:GitopsApplicationset example /// * ``` * * Import gitOps applicationset with project level agent # * * ```sh * $ pulumi import harness:platform/gitopsApplicationset:GitopsApplicationset example /// * ``` */ export declare class GitopsApplicationset extends pulumi.CustomResource { /** * Get an existing GitopsApplicationset resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: GitopsApplicationsetState, opts?: pulumi.CustomResourceOptions): GitopsApplicationset; /** * Returns true if the given object is an instance of GitopsApplicationset. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is GitopsApplicationset; /** * Agent identifier of the GitOps applicationset. */ readonly agentId: pulumi.Output; /** * Definition of the GitOps applicationset resource. */ readonly applicationset: pulumi.Output; /** * Identifier of the GitOps applicationset. This is a unique identifier for the applicationset generated automatically. */ readonly identifier: pulumi.Output; /** * Organization identifier of the GitOps applicationset. */ readonly orgId: pulumi.Output; /** * Project identifier of the GitOps applicationset. */ readonly projectId: pulumi.Output; /** * Indicates if the GitOps application should be updated if existing and inserted if not. */ readonly upsert: pulumi.Output; /** * Create a GitopsApplicationset resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: GitopsApplicationsetArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering GitopsApplicationset resources. */ export interface GitopsApplicationsetState { /** * Agent identifier of the GitOps applicationset. */ agentId?: pulumi.Input; /** * Definition of the GitOps applicationset resource. */ applicationset?: pulumi.Input; /** * Identifier of the GitOps applicationset. This is a unique identifier for the applicationset generated automatically. */ identifier?: pulumi.Input; /** * Organization identifier of the GitOps applicationset. */ orgId?: pulumi.Input; /** * Project identifier of the GitOps applicationset. */ projectId?: pulumi.Input; /** * Indicates if the GitOps application should be updated if existing and inserted if not. */ upsert?: pulumi.Input; } /** * The set of arguments for constructing a GitopsApplicationset resource. */ export interface GitopsApplicationsetArgs { /** * Agent identifier of the GitOps applicationset. */ agentId: pulumi.Input; /** * Definition of the GitOps applicationset resource. */ applicationset: pulumi.Input; /** * Organization identifier of the GitOps applicationset. */ orgId: pulumi.Input; /** * Project identifier of the GitOps applicationset. */ projectId: pulumi.Input; /** * Indicates if the GitOps application should be updated if existing and inserted if not. */ upsert?: pulumi.Input; } //# sourceMappingURL=gitopsApplicationset.d.ts.map