1. Packages
  2. Harness
  3. API Docs
  4. platform
  5. Template
Harness v0.1.2 published on Friday, Jul 19, 2024 by Pulumi

harness.platform.Template

Explore with Pulumi AI

harness logo
Harness v0.1.2 published on Friday, Jul 19, 2024 by Pulumi

    Resource for creating a Template. Description field is deprecated

    Remote Pipeline template

    resource “harness.platform.Template” “pipeline_template_remote” { identifier = “identifier” org_id = harness_platform_project.test.org_id project_id = harness_platform_project.test.id name = “name” comments = “comments” version = “ab” is_stable = true git_details { branch_name = “main” commit_message = “Commit” file_path = “file_path” connector_ref = “account.connector_ref” store_type = “REMOTE” repo_name = “repo_name” } template_yaml = «-EOT template: name: “name” identifier: “identifier” versionLabel: “ab” type: Pipeline projectIdentifier: ${harness_platform_project.test.id} orgIdentifier: ${harness_platform_project.test.org_id} tags: {} spec: stages: - stage: identifier: dvvdvd name: dvvdvd description: "" type: Deployment spec: deploymentType: Kubernetes service: serviceRef: <+input> serviceInputs: <+input> environment: environmentRef: <+input> deployToAll: false environmentInputs: <+input> serviceOverrideInputs: <+input> infrastructureDefinitions: <+input> execution: steps: - step: name: Rollout Deployment identifier: rolloutDeployment type: K8sRollingDeploy timeout: 10m spec: skipDryRun: false pruningEnabled: false rollbackSteps: - step: name: Rollback Rollout Deployment identifier: rollbackRolloutDeployment type: K8sRollingRollback timeout: 10m spec: pruningEnabled: false tags: {} failureStrategies: - onFailure: errors: - AllErrors action: type: StageRollback

    EOT }

    Remote Pipeline template to create new branch from existing base branch

    resource “harness.platform.Template” “pipeline_template_remote” { identifier = “identifier” org_id = harness_platform_project.test.org_id project_id = harness_platform_project.test.id name = “name” comments = “comments” version = “ab” is_stable = true git_details { branch_name = “new_branch” commit_message = “Commit” file_path = “file_path” connector_ref = “account.connector_ref” store_type = “REMOTE” repo_name = “repo_name” base_branch = “main” } template_yaml = «-EOT template: name: “name” identifier: “identifier” versionLabel: “ab” type: Pipeline projectIdentifier: ${harness_platform_project.test.id} orgIdentifier: ${harness_platform_project.test.org_id} tags: {} spec: stages: - stage: identifier: dvvdvd name: dvvdvd description: "" type: Deployment spec: deploymentType: Kubernetes service: serviceRef: <+input> serviceInputs: <+input> environment: environmentRef: <+input> deployToAll: false environmentInputs: <+input> serviceOverrideInputs: <+input> infrastructureDefinitions: <+input> execution: steps: - step: name: Rollout Deployment identifier: rolloutDeployment type: K8sRollingDeploy timeout: 10m spec: skipDryRun: false pruningEnabled: false rollbackSteps: - step: name: Rollback Rollout Deployment identifier: rollbackRolloutDeployment type: K8sRollingRollback timeout: 10m spec: pruningEnabled: false tags: {} failureStrategies: - onFailure: errors: - AllErrors action: type: StageRollback

    EOT }

    Inline Pipeline template

    resource “harness.platform.Template” “pipeline_template_inline” { identifier = “identifier” org_id = harness_platform_project.test.org_id project_id = harness_platform_project.test.id name = “name” comments = “comments” version = “ab” is_stable = true template_yaml = «-EOT template: name: “name” identifier: “identifier” versionLabel: “ab” type: Pipeline projectIdentifier: ${harness_platform_project.test.id} orgIdentifier: ${harness_platform_project.test.org_id} tags: {} spec: stages: - stage: identifier: dvvdvd name: dvvdvd description: "" type: Deployment spec: deploymentType: Kubernetes service: serviceRef: <+input> serviceInputs: <+input> environment: environmentRef: <+input> deployToAll: false environmentInputs: <+input> serviceOverrideInputs: <+input> infrastructureDefinitions: <+input> execution: steps: - step: name: Rollout Deployment identifier: rolloutDeployment type: K8sRollingDeploy timeout: 10m spec: skipDryRun: false pruningEnabled: false rollbackSteps: - step: name: Rollback Rollout Deployment identifier: rollbackRolloutDeployment type: K8sRollingRollback timeout: 10m spec: pruningEnabled: false tags: {} failureStrategies: - onFailure: errors: - AllErrors action: type: StageRollback

    EOT }

    Inline Step template

    resource “harness.platform.Template” “step_template_inline” { identifier = “identifier” org_id = harness_platform_project.test.org_id project_id = harness_platform_project.test.id name = “name” comments = “comments” version = “ab” is_stable = true template_yaml = «-EOT template: name: “name” identifier: “identifier” versionLabel: “ab” type: Step projectIdentifier: ${harness_platform_project.test.id} orgIdentifier: ${harness_platform_project.test.org_id} tags: {} spec: timeout: 10m type: ShellScript spec: shell: Bash onDelegate: true source: type: Inline spec: script: <+input> environmentVariables: [] outputVariables: []

    EOT }

    Remote Step template

    resource “harness.platform.Template” “step_template_remote” { identifier = “identifier” org_id = harness_platform_project.test.org_id project_id = harness_platform_project.test.id name = “name” comments = “comments” version = “ab” is_stable = true git_details { branch_name = “main” commit_message = “Commit” file_path = “file_path” connector_ref = “account.connector_ref” store_type = “REMOTE” repo_name = “repo_name” } template_yaml = «-EOT template: name: “name” identifier: “identifier” versionLabel: “ab” type: Step projectIdentifier: ${harness_platform_project.test.id} orgIdentifier: ${harness_platform_project.test.org_id} tags: {} spec: timeout: 10m type: ShellScript spec: shell: Bash onDelegate: true source: type: Inline spec: script: <+input> environmentVariables: [] outputVariables: []

    EOT }

    Remote Step template to create new branch from existing branch

    resource “harness.platform.Template” “step_template_remote” { identifier = “identifier” org_id = harness_platform_project.test.org_id project_id = harness_platform_project.test.id name = “name” comments = “comments” version = “ab” is_stable = true git_details { branch_name = “new_branch” commit_message = “Commit” file_path = “file_path” connector_ref = “account.connector_ref” store_type = “REMOTE” repo_name = “repo_name” base_branch = “main” } template_yaml = «-EOT template: name: “name” identifier: “identifier” versionLabel: “ab” type: Step projectIdentifier: ${harness_platform_project.test.id} orgIdentifier: ${harness_platform_project.test.org_id} tags: {} spec: timeout: 10m type: ShellScript spec: shell: Bash onDelegate: true source: type: Inline spec: script: <+input> environmentVariables: [] outputVariables: []

    EOT }

    Inline Stage template

    resource “harness.platform.Template” “stage_template_inline” { identifier = “identifier” org_id = harness_platform_project.test.org_id project_id = harness_platform_project.test.id name = “name” comments = “comments” version = “ab” is_stable = true template_yaml = «-EOT template: name: “name” identifier: “identifier” versionLabel: “ab” type: Stage projectIdentifier: ${harness_platform_project.test.id} orgIdentifier: ${harness_platform_project.test.org_id} tags: {} spec: type: Deployment spec: deploymentType: Kubernetes service: serviceRef: <+input> serviceInputs: <+input> environment: environmentRef: <+input> deployToAll: false environmentInputs: <+input> infrastructureDefinitions: <+input> execution: steps: - step: type: ShellScript name: Shell Script_1 identifier: ShellScript_1 spec: shell: Bash onDelegate: true source: type: Inline spec: script: <+input> environmentVariables: [] outputVariables: [] timeout: <+input> rollbackSteps: [] failureStrategies: - onFailure: errors: - AllErrors action: type: StageRollback

    EOT }

    Remote Stage template

    resource “harness.platform.Template” “stage_template_remote” { identifier = “identifier” org_id = harness_platform_project.test.org_id project_id = harness_platform_project.test.id name = “name” comments = “comments” version = “ab” is_stable = true git_details { branch_name = “main” commit_message = “Commit” file_path = “file_path” connector_ref = “account.connector_ref” store_type = “REMOTE” repo_name = “repo_name” } template_yaml = «-EOT template: name: “name” identifier: “identifier” versionLabel: “ab” type: Stage projectIdentifier: ${harness_platform_project.test.id} orgIdentifier: ${harness_platform_project.test.org_id} tags: {} spec: type: Deployment spec: deploymentType: Kubernetes service: serviceRef: <+input> serviceInputs: <+input> environment: environmentRef: <+input> deployToAll: false environmentInputs: <+input> infrastructureDefinitions: <+input> execution: steps: - step: type: ShellScript name: Shell Script_1 identifier: ShellScript_1 spec: shell: Bash onDelegate: true source: type: Inline spec: script: <+input> environmentVariables: [] outputVariables: [] timeout: <+input> rollbackSteps: [] failureStrategies: - onFailure: errors: - AllErrors action: type: StageRollback

    EOT }

    Remote Stage template to create new branch from existing branch

    resource “harness.platform.Template” “stage_template_remote” { identifier = “identifier” org_id = harness_platform_project.test.org_id project_id = harness_platform_project.test.id name = “name” comments = “comments” version = “ab” is_stable = true git_details { branch_name = “new_branch” commit_message = “Commit” file_path = “file_path” connector_ref = “account.connector_ref” store_type = “REMOTE” repo_name = “repo_name” base_branch = “main” } template_yaml = «-EOT template: name: “name” identifier: “identifier” versionLabel: “ab” type: Stage projectIdentifier: ${harness_platform_project.test.id} orgIdentifier: ${harness_platform_project.test.org_id} tags: {} spec: type: Deployment spec: deploymentType: Kubernetes service: serviceRef: <+input> serviceInputs: <+input> environment: environmentRef: <+input> deployToAll: false environmentInputs: <+input> infrastructureDefinitions: <+input> execution: steps: - step: type: ShellScript name: Shell Script_1 identifier: ShellScript_1 spec: shell: Bash onDelegate: true source: type: Inline spec: script: <+input> environmentVariables: [] outputVariables: [] timeout: <+input> rollbackSteps: [] failureStrategies: - onFailure: errors: - AllErrors action: type: StageRollback

    EOT }

    Inline StepGroup template

    resource “harness.platform.Template” “stepgroup_template_inline” { identifier = “identifier” org_id = harness_platform_project.test.org_id project_id = harness_platform_project.test.id name = “name” comments = “comments” version = “ab” is_stable = true template_yaml = «-EOT template: name: “name” identifier: “identifier” versionLabel: “ab” type: StepGroup projectIdentifier: ${harness_platform_project.test.id} orgIdentifier: ${harness_platform_project.test.org_id} tags: {} spec: stageType: Deployment steps: - step: type: ShellScript name: Shell Script_1 identifier: ShellScript_1 spec: shell: Bash onDelegate: true source: type: Inline spec: script: <+input> environmentVariables: [] outputVariables: [] timeout: 10m

    EOT }

    Remote StepGroup template

    resource “harness.platform.Template” “stepgroup_template_remote” { identifier = “identifier” org_id = harness_platform_project.test.org_id project_id = harness_platform_project.test.id name = “name” comments = “comments” version = “ab” is_stable = true git_details { branch_name = “main” commit_message = “Commit” file_path = “file_path” connector_ref = “account.connector_ref” store_type = “REMOTE” repo_name = “repo_name” } template_yaml = «-EOT template: name: “name” identifier: “identifier” versionLabel: “ab” type: StepGroup projectIdentifier: ${harness_platform_project.test.id} orgIdentifier: ${harness_platform_project.test.org_id} tags: {} spec: stageType: Deployment steps: - step: type: ShellScript name: Shell Script_1 identifier: ShellScript_1 spec: shell: Bash onDelegate: true source: type: Inline spec: script: <+input> environmentVariables: [] outputVariables: [] timeout: 10m

    EOT }

    Remote StepGroup template to create new branch from existing branch

    resource “harness.platform.Template” “stepgroup_template_remote” { identifier = “identifier” org_id = harness_platform_project.test.org_id project_id = harness_platform_project.test.id name = “name” comments = “comments” version = “ab” is_stable = true git_details { branch_name = “new_branch” commit_message = “Commit” file_path = “file_path” connector_ref = “account.connector_ref” store_type = “REMOTE” repo_name = “repo_name” base_branch = “main” } template_yaml = «-EOT template: name: “name” identifier: “identifier” versionLabel: “ab” type: StepGroup projectIdentifier: ${harness_platform_project.test.id} orgIdentifier: ${harness_platform_project.test.org_id} tags: {} spec: stageType: Deployment steps: - step: type: ShellScript name: Shell Script_1 identifier: ShellScript_1 spec: shell: Bash onDelegate: true source: type: Inline spec: script: <+input> environmentVariables: [] outputVariables: [] timeout: 10m

    EOT }

    Inline Monitered Service template

    resource “harness.platform.Template” “monitered_service_template_inline” { identifier = “identifier” org_id = harness_platform_project.test.org_id project_id = harness_platform_project.test.id name = “name” comments = “comments” version = “ab” is_stable = true template_yaml = «-EOT template: name: “name” identifier: “identifier” versionLabel: “ab” type: MonitoredService projectIdentifier: ${harness_platform_project.test.id} orgIdentifier: ${harness_platform_project.test.org_id} tags: {} spec: serviceRef: <+input> environmentRef: <+input> type: Application sources: changeSources: - name: Harness CD Next Gen identifier: harness_cd_next_gen type: HarnessCDNextGen enabled: true category: Deployment spec: {} healthSources: - name: health identifier: health type: AppDynamics spec: applicationName: <+input> tierName: <+input> metricData: Errors: true Performance: true metricDefinitions: [] feature: Application Monitoring connectorRef: <+input> metricPacks: - identifier: Errors - identifier: Performance

    EOT }

    Artifact Source template

    resource “harness.platform.Template” “artifact_source_template” { identifier = “identifier” org_id = harness_platform_project.test.org_id project_id = harness_platform_project.test.id name = “name” comments = “comments” version = “ab” is_stable = true template_yaml = «-EOT template: name: “name” identifier: “identifier” versionLabel: “ab” type: ArtifactSource projectIdentifier: ${harness_platform_project.test.id} orgIdentifier: ${harness_platform_project.test.org_id} tags: {} spec: type: DockerRegistry spec: imagePath: library/nginx tag: <+input> connectorRef: account.Harness_DockerHub

    EOT }

    Deployment template

    resource “harness.platform.Template” “deployment_template” { identifier = “identifier” org_id = harness_platform_project.test.org_id project_id = harness_platform_project.test.id name = “name” comments = “comments” version = “ab” is_stable = true template_yaml = «-EOT template: name: “name” identifier: “identifier” versionLabel: “ab” type: CustomDeployment projectIdentifier: ${harness_platform_project.test.id} orgIdentifier: ${harness_platform_project.test.org_id} tags: {} spec: infrastructure: variables: - name: kubeConnector type: Connector value: <+input> description: "" fetchInstancesScript: store: type: Inline spec: content: | # # Script is expected to query Infrastructure and dump json # in $INSTANCE_OUTPUT_PATH file path # # Harness is expected to initialize ${INSTANCE_OUTPUT_PATH} # environment variable - a random unique file path on delegate, # so script execution can save the result. # /opt/harness-delegate/client-tools/kubectl/v1.19.2/kubectl get pods –namespace=harness-delegate-ng -o json > $INSTANCE_OUTPUT_PATH instanceAttributes: - name: instancename jsonPath: metadata.name description: "" instancesListPath: items execution: stepTemplateRefs: []

    EOT }

    Secrets Manager template

    resource “harness.platform.Template” “secrets_manager_template” { identifier = “identifier” org_id = harness_platform_project.test.org_id project_id = harness_platform_project.test.id name = “name” comments = “comments” version = “ab” is_stable = true template_yaml = «-EOT template: name: “name” identifier: “identifier” versionLabel: “ab” type: SecretManager projectIdentifier: ${harness_platform_project.test.id} orgIdentifier: ${harness_platform_project.test.org_id} tags: {} spec: executionTarget: {} shell: Bash onDelegate: true source: spec: script: |- curl -o secret.json -X GET https://example.com/<+secretManager.environmentVariables.enginename>/<+secretManager.environmentVariables.path> -H ‘X-Vault-Token: <+secrets.getValue(“vaultTokenOne”)>’ secret=$(jq -r ‘.data."<+secretManager.environmentVariables.key>"’ secret.json) type: Inline environmentVariables: - name: enginename type: String value: <+input> - name: path type: String value: <+input> - name: key type: String value: <+input>

    EOT }

    Creating Multiple Versions of a Template

    ##Stable version of the Template resource “harness.platform.Template” “template_v1” { identifier = “temp” org_id = harness_platform_project.test.org_id name = “temp” comments = “comments” version = “v1” is_stable = true force_delete = true template_yaml = «-EOT template: name: “temp” identifier: “temp” versionLabel: v1 type: Pipeline orgIdentifier: ${harness_platform_organization.test.id} tags: {} spec: stages: - stage: name: dvvdvd identifier: dvvdvd description: "" type: Deployment spec: deploymentType: Kubernetes service: serviceRef: <+input> serviceInputs: <+input> environment: environmentRef: <+input> deployToAll: false environmentInputs: <+input> serviceOverrideInputs: <+input> infrastructureDefinitions: <+input> execution: steps: - step: name: Rollout Deployment identifier: rolloutDeployment type: K8sRollingDeploy timeout: 10m spec: skipDryRun: false pruningEnabled: false rollbackSteps: - step: name: Rollback Rollout Deployment identifier: rollbackRolloutDeployment type: K8sRollingRollback timeout: 10m spec: pruningEnabled: false tags: {} failureStrategies: - onFailure: errors: - AllErrors action: type: StageRollback

      EOT
    

    }

    ##Unstable version of the Template resource “harness.platform.Template” “template_v2” { identifier = “temp” org_id = harness_platform_organization.test.id name = “temp” comments = “comments” version = “v2” is_stable = false force_delete = true template_yaml = «-EOT template: name: “temp” identifier: “temp” versionLabel: v2 type: Pipeline orgIdentifier: ${harness_platform_organization.test.id} tags: {} spec: stages: - stage: name: dvvdvd identifier: dvvdvd description: "" type: Deployment spec: deploymentType: Kubernetes service: serviceRef: <+input> serviceInputs: <+input> environment: environmentRef: <+input> deployToAll: false environmentInputs: <+input> serviceOverrideInputs: <+input> infrastructureDefinitions: <+input> execution: steps: - step: name: Rollout Deployment identifier: rolloutDeployment type: K8sRollingDeploy timeout: 10m spec: skipDryRun: false pruningEnabled: false rollbackSteps: - step: name: Rollback Rollout Deployment identifier: rollbackRolloutDeployment type: K8sRollingRollback timeout: 10m spec: pruningEnabled: false tags: {} failureStrategies: - onFailure: errors: - AllErrors action: type: StageRollback EOT }

    ##Updating the Stable Version of the Template from v1 to v2. resource “harness.platform.Template” “template_v2” { identifier = “temp” org_id = harness_platform_organization.test.id name = “temp” comments = “comments” version = “v2” is_stable = true force_delete = true template_yaml = «-EOT template: name: “temp” identifier: “temp” versionLabel: v2 type: Pipeline orgIdentifier: ${harness_platform_organization.test.id} tags: {} spec: stages: - stage: name: dvvdvd identifier: dvvdvd description: "" type: Deployment spec: deploymentType: Kubernetes service: serviceRef: <+input> serviceInputs: <+input> environment: environmentRef: <+input> deployToAll: false environmentInputs: <+input> serviceOverrideInputs: <+input> infrastructureDefinitions: <+input> execution: steps: - step: name: Rollout Deployment identifier: rolloutDeployment type: K8sRollingDeploy timeout: 10m spec: skipDryRun: false pruningEnabled: false rollbackSteps: - step: name: Rollback Rollout Deployment identifier: rollbackRolloutDeployment type: K8sRollingRollback timeout: 10m spec: pruningEnabled: false tags: {} failureStrategies: - onFailure: errors: - AllErrors action: type: StageRollback EOT }

    resource “harness.platform.Template” “template_v1” { identifier = “temp” org_id = harness_platform_organization.test.id name = “temp” comments = “comments” version = “v1” is_stable = false force_delete = true template_yaml = «-EOT template: name: “temp” identifier: “temp” versionLabel: v1 type: Pipeline orgIdentifier: ${harness_platform_organization.test.id} tags: {} spec: stages: - stage: name: dvvdvd identifier: dvvdvd description: "" type: Deployment spec: deploymentType: Kubernetes service: serviceRef: <+input> serviceInputs: <+input> environment: environmentRef: <+input> deployToAll: false environmentInputs: <+input> serviceOverrideInputs: <+input> infrastructureDefinitions: <+input> execution: steps: - step: name: Rollout Deployment identifier: rolloutDeployment type: K8sRollingDeploy timeout: 10m spec: skipDryRun: false pruningEnabled: false rollbackSteps: - step: name: Rollback Rollout Deployment identifier: rollbackRolloutDeployment type: K8sRollingRollback timeout: 10m spec: pruningEnabled: false tags: {} failureStrategies: - onFailure: errors: - AllErrors action: type: StageRollback

      EOT
    

    depends_on = [time_sleep.wait_10_seconds] }

    resource “time_sleep” “wait_10_seconds” { depends_on = [harness_platform_template.test2] destroy_duration = “10s” }

    ##Importing Account Level Templates resource “harness.platform.Template” “test” { identifier = “accounttemplate” name = “accounttemplate” version = “v2” is_stable = false import_from_git = true git_import_details { branch_name = “main” file_path = “.harness/accounttemplate.yaml” connector_ref = “account.DoNotDeleteGithub” repo_name = “open-repo” } template_import_request { template_name = “accounttemplate” template_version = “v2” template_description = "" } }

    ##Importing Org Level Templates resource “harness.platform.Template” “test” { identifier = “orgtemplate” name = “orgtemplate” org_id = “org” version = “v2” is_stable = false import_from_git = true git_import_details { branch_name = “main” file_path = “.harness/orgtemplate.yaml” connector_ref = “account.DoNotDeleteGithub” repo_name = “open-repo” } template_import_request { template_name = “orgtemplate” template_version = “v2” template_description = "" } }

    ##Importing Project Level Templates resource “harness.platform.Template” “test” { identifier = “projecttemplate” name = “projecttemplate” org_id = “org” project_id = “project” version = “v2” is_stable = false import_from_git = true git_import_details { branch_name = “main” file_path = “.harness/projecttemplate.yaml” connector_ref = “account.DoNotDeleteGithub” repo_name = “open-repo” } template_import_request { template_name = “projecttemplate” template_version = “v2” template_description = "" } }

    
    
    
    ## Create Template Resource {#create}
    
    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see [Resources](/docs/concepts/resources/).
    
    ### Constructor syntax
    <div>
    <pulumi-chooser type="language" options="csharp,go,typescript,python,yaml,java"></pulumi-chooser>
    </div>
    
    
    <div>
    <pulumi-choosable type="language" values="javascript,typescript">
    <div class="no-copy"><div class="highlight"><pre class="chroma"><code class="language-typescript" data-lang="typescript"><span class="k">new </span><span class="nx">Template</span><span class="p">(</span><span class="nx">name</span><span class="p">:</span> <span class="nx">string</span><span class="p">,</span> <span class="nx">args</span><span class="p">:</span> <span class="nx"><a href="#inputs">TemplateArgs</a></span><span class="p">,</span> <span class="nx">opts</span><span class="p">?:</span> <span class="nx"><a href="/docs/reference/pkg/nodejs/pulumi/pulumi/#CustomResourceOptions">CustomResourceOptions</a></span><span class="p">);</span></code></pre></div>
    </div></pulumi-choosable>
    </div>
    
    <div>
    <pulumi-choosable type="language" values="python">
    <div class="no-copy"><div class="highlight"><pre class="chroma"><code class="language-python" data-lang="python"><span class=nd>@overload</span>
    <span class="k">def </span><span class="nx">Template</span><span class="p">(</span><span class="nx">resource_name</span><span class="p">:</span> <span class="nx">str</span><span class="p">,</span>
                 <span class="nx">args</span><span class="p">:</span> <span class="nx"><a href="#inputs">TemplateArgs</a></span><span class="p">,</span>
                 <span class="nx">opts</span><span class="p">:</span> <span class="nx"><a href="/docs/reference/pkg/python/pulumi/#pulumi.ResourceOptions">Optional[ResourceOptions]</a></span> = None<span class="p">)</span>
    <span></span>
    <span class=nd>@overload</span>
    <span class="k">def </span><span class="nx">Template</span><span class="p">(</span><span class="nx">resource_name</span><span class="p">:</span> <span class="nx">str</span><span class="p">,</span>
                 <span class="nx">opts</span><span class="p">:</span> <span class="nx"><a href="/docs/reference/pkg/python/pulumi/#pulumi.ResourceOptions">Optional[ResourceOptions]</a></span> = None<span class="p">,</span>
                 <span class="nx">identifier</span><span class="p">:</span> <span class="nx">Optional[str]</span> = None<span class="p">,</span>
                 <span class="nx">version</span><span class="p">:</span> <span class="nx">Optional[str]</span> = None<span class="p">,</span>
                 <span class="nx">import_from_git</span><span class="p">:</span> <span class="nx">Optional[bool]</span> = None<span class="p">,</span>
                 <span class="nx">git_details</span><span class="p">:</span> <span class="nx">Optional[TemplateGitDetailsArgs]</span> = None<span class="p">,</span>
                 <span class="nx">git_import_details</span><span class="p">:</span> <span class="nx">Optional[TemplateGitImportDetailsArgs]</span> = None<span class="p">,</span>
                 <span class="nx">force_delete</span><span class="p">:</span> <span class="nx">Optional[str]</span> = None<span class="p">,</span>
                 <span class="nx">comments</span><span class="p">:</span> <span class="nx">Optional[str]</span> = None<span class="p">,</span>
                 <span class="nx">is_stable</span><span class="p">:</span> <span class="nx">Optional[bool]</span> = None<span class="p">,</span>
                 <span class="nx">name</span><span class="p">:</span> <span class="nx">Optional[str]</span> = None<span class="p">,</span>
                 <span class="nx">org_id</span><span class="p">:</span> <span class="nx">Optional[str]</span> = None<span class="p">,</span>
                 <span class="nx">project_id</span><span class="p">:</span> <span class="nx">Optional[str]</span> = None<span class="p">,</span>
                 <span class="nx">tags</span><span class="p">:</span> <span class="nx">Optional[Sequence[str]]</span> = None<span class="p">,</span>
                 <span class="nx">template_import_request</span><span class="p">:</span> <span class="nx">Optional[TemplateTemplateImportRequestArgs]</span> = None<span class="p">,</span>
                 <span class="nx">template_yaml</span><span class="p">:</span> <span class="nx">Optional[str]</span> = None<span class="p">,</span>
                 <span class="nx">description</span><span class="p">:</span> <span class="nx">Optional[str]</span> = None<span class="p">)</span></code></pre></div>
    </div></pulumi-choosable>
    </div>
    
    <div>
    <pulumi-choosable type="language" values="go">
    <div class="no-copy"><div class="highlight"><pre class="chroma"><code class="language-go" data-lang="go"><span class="k">func </span><span class="nx">NewTemplate</span><span class="p">(</span><span class="nx">ctx</span><span class="p"> *</span><span class="nx"><a href="https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi?tab=doc#Context">Context</a></span><span class="p">,</span> <span class="nx">name</span><span class="p"> </span><span class="nx">string</span><span class="p">,</span> <span class="nx">args</span><span class="p"> </span><span class="nx"><a href="#inputs">TemplateArgs</a></span><span class="p">,</span> <span class="nx">opts</span><span class="p"> ...</span><span class="nx"><a href="https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi?tab=doc#ResourceOption">ResourceOption</a></span><span class="p">) (*<span class="nx">Template</span>, error)</span></code></pre></div>
    </div></pulumi-choosable>
    </div>
    
    <div>
    <pulumi-choosable type="language" values="csharp">
    <div class="no-copy"><div class="highlight"><pre class="chroma"><code class="language-csharp" data-lang="csharp"><span class="k">public </span><span class="nx">Template</span><span class="p">(</span><span class="nx">string</span><span class="p"> </span><span class="nx">name<span class="p">,</span> <span class="nx"><a href="#inputs">TemplateArgs</a></span><span class="p"> </span><span class="nx">args<span class="p">,</span> <span class="nx"><a href="/docs/reference/pkg/dotnet/Pulumi/Pulumi.CustomResourceOptions.html">CustomResourceOptions</a></span><span class="p">? </span><span class="nx">opts = null<span class="p">)</span></code></pre></div>
    </div></pulumi-choosable>
    </div>
    
    <div>
    <pulumi-choosable type="language" values="java">
    <div class="no-copy"><div class="highlight"><pre class="chroma">
    <code class="language-java" data-lang="java"><span class="k">public </span><span class="nx">Template</span><span class="p">(</span><span class="nx">String</span><span class="p"> </span><span class="nx">name<span class="p">,</span> <span class="nx"><a href="#inputs">TemplateArgs</a></span><span class="p"> </span><span class="nx">args<span class="p">)</span>
    <span class="k">public </span><span class="nx">Template</span><span class="p">(</span><span class="nx">String</span><span class="p"> </span><span class="nx">name<span class="p">,</span> <span class="nx"><a href="#inputs">TemplateArgs</a></span><span class="p"> </span><span class="nx">args<span class="p">,</span> <span class="nx">CustomResourceOptions</span><span class="p"> </span><span class="nx">options<span class="p">)</span>
    </code></pre></div></div>
    </pulumi-choosable>
    </div>
    
    <div>
    <pulumi-choosable type="language" values="yaml">
    <div class="no-copy"><div class="highlight"><pre class="chroma"><code class="language-yaml" data-lang="yaml">type: <span class="nx">harness:platform:Template</span><span class="p"></span>
    <span class="p">properties</span><span class="p">: </span><span class="c">#&nbsp;The arguments to resource properties.</span>
    <span class="p"></span><span class="p">options</span><span class="p">: </span><span class="c">#&nbsp;Bag of options to control resource&#39;s behavior.</span>
    <span class="p"></span>
    </code></pre></div></div>
    </pulumi-choosable>
    </div>
    
    #### Parameters
    
    <div>
    <pulumi-choosable type="language" values="javascript,typescript">
    
    <dl class="resources-properties"><dt
            class="property-required" title="Required">
            <span>name</span>
            <span class="property-indicator"></span>
            <span class="property-type">string</span>
        </dt>
        <dd>The unique name of the resource.</dd><dt
            class="property-required" title="Required">
            <span>args</span>
            <span class="property-indicator"></span>
            <span class="property-type"><a href="#inputs">TemplateArgs</a></span>
        </dt>
        <dd>The arguments to resource properties.</dd><dt
            class="property-optional" title="Optional">
            <span>opts</span>
            <span class="property-indicator"></span>
            <span class="property-type"><a href="/docs/reference/pkg/nodejs/pulumi/pulumi/#CustomResourceOptions">CustomResourceOptions</a></span>
        </dt>
        <dd>Bag of options to control resource&#39;s behavior.</dd></dl>
    
    </pulumi-choosable>
    </div>
    
    <div>
    <pulumi-choosable type="language" values="python">
    
    <dl class="resources-properties"><dt
            class="property-required" title="Required">
            <span>resource_name</span>
            <span class="property-indicator"></span>
            <span class="property-type">str</span>
        </dt>
        <dd>The unique name of the resource.</dd><dt
            class="property-required" title="Required">
            <span>args</span>
            <span class="property-indicator"></span>
            <span class="property-type"><a href="#inputs">TemplateArgs</a></span>
        </dt>
        <dd>The arguments to resource properties.</dd><dt
            class="property-optional" title="Optional">
            <span>opts</span>
            <span class="property-indicator"></span>
            <span class="property-type"><a href="/docs/reference/pkg/python/pulumi/#pulumi.ResourceOptions">ResourceOptions</a></span>
        </dt>
        <dd>Bag of options to control resource&#39;s behavior.</dd></dl>
    
    </pulumi-choosable>
    </div>
    
    <div>
    <pulumi-choosable type="language" values="go">
    
    <dl class="resources-properties"><dt
            class="property-optional" title="Optional">
            <span>ctx</span>
            <span class="property-indicator"></span>
            <span class="property-type"><a href="https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi?tab=doc#Context">Context</a></span>
        </dt>
        <dd>Context object for the current deployment.</dd><dt
            class="property-required" title="Required">
            <span>name</span>
            <span class="property-indicator"></span>
            <span class="property-type">string</span>
        </dt>
        <dd>The unique name of the resource.</dd><dt
            class="property-required" title="Required">
            <span>args</span>
            <span class="property-indicator"></span>
            <span class="property-type"><a href="#inputs">TemplateArgs</a></span>
        </dt>
        <dd>The arguments to resource properties.</dd><dt
            class="property-optional" title="Optional">
            <span>opts</span>
            <span class="property-indicator"></span>
            <span class="property-type"><a href="https://pkg.go.dev/github.com/pulumi/pulumi/sdk/v3/go/pulumi?tab=doc#ResourceOption">ResourceOption</a></span>
        </dt>
        <dd>Bag of options to control resource&#39;s behavior.</dd></dl>
    
    </pulumi-choosable>
    </div>
    
    <div>
    <pulumi-choosable type="language" values="csharp">
    
    <dl class="resources-properties"><dt
            class="property-required" title="Required">
            <span>name</span>
            <span class="property-indicator"></span>
            <span class="property-type">string</span>
        </dt>
        <dd>The unique name of the resource.</dd><dt
            class="property-required" title="Required">
            <span>args</span>
            <span class="property-indicator"></span>
            <span class="property-type"><a href="#inputs">TemplateArgs</a></span>
        </dt>
        <dd>The arguments to resource properties.</dd><dt
            class="property-optional" title="Optional">
            <span>opts</span>
            <span class="property-indicator"></span>
            <span class="property-type"><a href="/docs/reference/pkg/dotnet/Pulumi/Pulumi.CustomResourceOptions.html">CustomResourceOptions</a></span>
        </dt>
        <dd>Bag of options to control resource&#39;s behavior.</dd></dl>
    
    </pulumi-choosable>
    </div>
    
    <div>
    <pulumi-choosable type="language" values="java">
    
    <dl class="resources-properties"><dt
            class="property-required" title="Required">
            <span>name</span>
            <span class="property-indicator"></span>
            <span class="property-type">String</span>
        </dt>
        <dd>The unique name of the resource.</dd><dt
            class="property-required" title="Required">
            <span>args</span>
            <span class="property-indicator"></span>
            <span class="property-type"><a href="#inputs">TemplateArgs</a></span>
        </dt>
        <dd>The arguments to resource properties.</dd><dt
            class="property-optional" title="Optional">
            <span>options</span>
            <span class="property-indicator"></span>
            <span class="property-type">CustomResourceOptions</span>
        </dt>
        <dd>Bag of options to control resource&#39;s behavior.</dd></dl>
    
    </pulumi-choosable>
    </div>
    
    
    
    ### Constructor example
    
    The following reference example uses placeholder values for all [input properties](#inputs).
    <div>
    <pulumi-chooser type="language" options="csharp,go,typescript,python,yaml,java"></pulumi-chooser>
    </div>
    
    
    <div>
    <pulumi-choosable type="language" values="csharp">
    
    ```csharp
    var templateResource = new Harness.Platform.Template("templateResource", new()
    {
        Identifier = "string",
        Version = "string",
        ImportFromGit = false,
        GitDetails = new Harness.Platform.Inputs.TemplateGitDetailsArgs
        {
            BaseBranch = "string",
            BranchName = "string",
            CommitMessage = "string",
            ConnectorRef = "string",
            FilePath = "string",
            LastCommitId = "string",
            LastObjectId = "string",
            RepoName = "string",
            StoreType = "string",
        },
        GitImportDetails = new Harness.Platform.Inputs.TemplateGitImportDetailsArgs
        {
            BranchName = "string",
            ConnectorRef = "string",
            FilePath = "string",
            IsForceImport = false,
            RepoName = "string",
        },
        ForceDelete = "string",
        Comments = "string",
        IsStable = false,
        Name = "string",
        OrgId = "string",
        ProjectId = "string",
        Tags = new[]
        {
            "string",
        },
        TemplateImportRequest = new Harness.Platform.Inputs.TemplateTemplateImportRequestArgs
        {
            TemplateDescription = "string",
            TemplateName = "string",
            TemplateVersion = "string",
        },
        TemplateYaml = "string",
    });
    
    example, err := platform.NewTemplate(ctx, "templateResource", &platform.TemplateArgs{
    	Identifier:    pulumi.String("string"),
    	Version:       pulumi.String("string"),
    	ImportFromGit: pulumi.Bool(false),
    	GitDetails: &platform.TemplateGitDetailsArgs{
    		BaseBranch:    pulumi.String("string"),
    		BranchName:    pulumi.String("string"),
    		CommitMessage: pulumi.String("string"),
    		ConnectorRef:  pulumi.String("string"),
    		FilePath:      pulumi.String("string"),
    		LastCommitId:  pulumi.String("string"),
    		LastObjectId:  pulumi.String("string"),
    		RepoName:      pulumi.String("string"),
    		StoreType:     pulumi.String("string"),
    	},
    	GitImportDetails: &platform.TemplateGitImportDetailsArgs{
    		BranchName:    pulumi.String("string"),
    		ConnectorRef:  pulumi.String("string"),
    		FilePath:      pulumi.String("string"),
    		IsForceImport: pulumi.Bool(false),
    		RepoName:      pulumi.String("string"),
    	},
    	ForceDelete: pulumi.String("string"),
    	Comments:    pulumi.String("string"),
    	IsStable:    pulumi.Bool(false),
    	Name:        pulumi.String("string"),
    	OrgId:       pulumi.String("string"),
    	ProjectId:   pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	TemplateImportRequest: &platform.TemplateTemplateImportRequestArgs{
    		TemplateDescription: pulumi.String("string"),
    		TemplateName:        pulumi.String("string"),
    		TemplateVersion:     pulumi.String("string"),
    	},
    	TemplateYaml: pulumi.String("string"),
    })
    
    var templateResource = new Template("templateResource", TemplateArgs.builder()
        .identifier("string")
        .version("string")
        .importFromGit(false)
        .gitDetails(TemplateGitDetailsArgs.builder()
            .baseBranch("string")
            .branchName("string")
            .commitMessage("string")
            .connectorRef("string")
            .filePath("string")
            .lastCommitId("string")
            .lastObjectId("string")
            .repoName("string")
            .storeType("string")
            .build())
        .gitImportDetails(TemplateGitImportDetailsArgs.builder()
            .branchName("string")
            .connectorRef("string")
            .filePath("string")
            .isForceImport(false)
            .repoName("string")
            .build())
        .forceDelete("string")
        .comments("string")
        .isStable(false)
        .name("string")
        .orgId("string")
        .projectId("string")
        .tags("string")
        .templateImportRequest(TemplateTemplateImportRequestArgs.builder()
            .templateDescription("string")
            .templateName("string")
            .templateVersion("string")
            .build())
        .templateYaml("string")
        .build());
    
    template_resource = harness.platform.Template("templateResource",
        identifier="string",
        version="string",
        import_from_git=False,
        git_details=harness.platform.TemplateGitDetailsArgs(
            base_branch="string",
            branch_name="string",
            commit_message="string",
            connector_ref="string",
            file_path="string",
            last_commit_id="string",
            last_object_id="string",
            repo_name="string",
            store_type="string",
        ),
        git_import_details=harness.platform.TemplateGitImportDetailsArgs(
            branch_name="string",
            connector_ref="string",
            file_path="string",
            is_force_import=False,
            repo_name="string",
        ),
        force_delete="string",
        comments="string",
        is_stable=False,
        name="string",
        org_id="string",
        project_id="string",
        tags=["string"],
        template_import_request=harness.platform.TemplateTemplateImportRequestArgs(
            template_description="string",
            template_name="string",
            template_version="string",
        ),
        template_yaml="string")
    
    const templateResource = new harness.platform.Template("templateResource", {
        identifier: "string",
        version: "string",
        importFromGit: false,
        gitDetails: {
            baseBranch: "string",
            branchName: "string",
            commitMessage: "string",
            connectorRef: "string",
            filePath: "string",
            lastCommitId: "string",
            lastObjectId: "string",
            repoName: "string",
            storeType: "string",
        },
        gitImportDetails: {
            branchName: "string",
            connectorRef: "string",
            filePath: "string",
            isForceImport: false,
            repoName: "string",
        },
        forceDelete: "string",
        comments: "string",
        isStable: false,
        name: "string",
        orgId: "string",
        projectId: "string",
        tags: ["string"],
        templateImportRequest: {
            templateDescription: "string",
            templateName: "string",
            templateVersion: "string",
        },
        templateYaml: "string",
    });
    
    type: harness:platform:Template
    properties:
        comments: string
        forceDelete: string
        gitDetails:
            baseBranch: string
            branchName: string
            commitMessage: string
            connectorRef: string
            filePath: string
            lastCommitId: string
            lastObjectId: string
            repoName: string
            storeType: string
        gitImportDetails:
            branchName: string
            connectorRef: string
            filePath: string
            isForceImport: false
            repoName: string
        identifier: string
        importFromGit: false
        isStable: false
        name: string
        orgId: string
        projectId: string
        tags:
            - string
        templateImportRequest:
            templateDescription: string
            templateName: string
            templateVersion: string
        templateYaml: string
        version: string
    

    Template 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 Template resource accepts the following input properties:

    Identifier string
    Unique identifier of the resource
    Version string
    Version Label for Template.
    Comments string
    Specify comment with respect to changes.
    Description string
    Description of the entity. Description field is deprecated

    Deprecated: description field is deprecated

    ForceDelete string
    Enable this flag for force deletion of template. It will delete the Harness entity even if your pipelines or other entities reference it
    GitDetails TemplateGitDetails
    Contains parameters related to creating an Entity for Git Experience.
    GitImportDetails TemplateGitImportDetails
    Contains Git Information for importing entities from Git
    ImportFromGit bool
    Flag to set if importing from Git
    IsStable bool
    True if given version for template to be set as stable.
    Name string
    Name of the Variable
    OrgId string
    Organization Identifier for the Entity
    ProjectId string
    Project Identifier for the Entity
    Tags List<string>
    Tags to associate with the resource.
    TemplateImportRequest TemplateTemplateImportRequest
    Contains parameters for importing template.
    TemplateYaml string
    Yaml for creating new Template. 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.
    Identifier string
    Unique identifier of the resource
    Version string
    Version Label for Template.
    Comments string
    Specify comment with respect to changes.
    Description string
    Description of the entity. Description field is deprecated

    Deprecated: description field is deprecated

    ForceDelete string
    Enable this flag for force deletion of template. It will delete the Harness entity even if your pipelines or other entities reference it
    GitDetails TemplateGitDetailsArgs
    Contains parameters related to creating an Entity for Git Experience.
    GitImportDetails TemplateGitImportDetailsArgs
    Contains Git Information for importing entities from Git
    ImportFromGit bool
    Flag to set if importing from Git
    IsStable bool
    True if given version for template to be set as stable.
    Name string
    Name of the Variable
    OrgId string
    Organization Identifier for the Entity
    ProjectId string
    Project Identifier for the Entity
    Tags []string
    Tags to associate with the resource.
    TemplateImportRequest TemplateTemplateImportRequestArgs
    Contains parameters for importing template.
    TemplateYaml string
    Yaml for creating new Template. 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.
    identifier String
    Unique identifier of the resource
    version String
    Version Label for Template.
    comments String
    Specify comment with respect to changes.
    description String
    Description of the entity. Description field is deprecated

    Deprecated: description field is deprecated

    forceDelete String
    Enable this flag for force deletion of template. It will delete the Harness entity even if your pipelines or other entities reference it
    gitDetails TemplateGitDetails
    Contains parameters related to creating an Entity for Git Experience.
    gitImportDetails TemplateGitImportDetails
    Contains Git Information for importing entities from Git
    importFromGit Boolean
    Flag to set if importing from Git
    isStable Boolean
    True if given version for template to be set as stable.
    name String
    Name of the Variable
    orgId String
    Organization Identifier for the Entity
    projectId String
    Project Identifier for the Entity
    tags List<String>
    Tags to associate with the resource.
    templateImportRequest TemplateTemplateImportRequest
    Contains parameters for importing template.
    templateYaml String
    Yaml for creating new Template. 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.
    identifier string
    Unique identifier of the resource
    version string
    Version Label for Template.
    comments string
    Specify comment with respect to changes.
    description string
    Description of the entity. Description field is deprecated

    Deprecated: description field is deprecated

    forceDelete string
    Enable this flag for force deletion of template. It will delete the Harness entity even if your pipelines or other entities reference it
    gitDetails TemplateGitDetails
    Contains parameters related to creating an Entity for Git Experience.
    gitImportDetails TemplateGitImportDetails
    Contains Git Information for importing entities from Git
    importFromGit boolean
    Flag to set if importing from Git
    isStable boolean
    True if given version for template to be set as stable.
    name string
    Name of the Variable
    orgId string
    Organization Identifier for the Entity
    projectId string
    Project Identifier for the Entity
    tags string[]
    Tags to associate with the resource.
    templateImportRequest TemplateTemplateImportRequest
    Contains parameters for importing template.
    templateYaml string
    Yaml for creating new Template. 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.
    identifier str
    Unique identifier of the resource
    version str
    Version Label for Template.
    comments str
    Specify comment with respect to changes.
    description str
    Description of the entity. Description field is deprecated

    Deprecated: description field is deprecated

    force_delete str
    Enable this flag for force deletion of template. It will delete the Harness entity even if your pipelines or other entities reference it
    git_details TemplateGitDetailsArgs
    Contains parameters related to creating an Entity for Git Experience.
    git_import_details TemplateGitImportDetailsArgs
    Contains Git Information for importing entities from Git
    import_from_git bool
    Flag to set if importing from Git
    is_stable bool
    True if given version for template to be set as stable.
    name str
    Name of the Variable
    org_id str
    Organization Identifier for the Entity
    project_id str
    Project Identifier for the Entity
    tags Sequence[str]
    Tags to associate with the resource.
    template_import_request TemplateTemplateImportRequestArgs
    Contains parameters for importing template.
    template_yaml str
    Yaml for creating new Template. 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.
    identifier String
    Unique identifier of the resource
    version String
    Version Label for Template.
    comments String
    Specify comment with respect to changes.
    description String
    Description of the entity. Description field is deprecated

    Deprecated: description field is deprecated

    forceDelete String
    Enable this flag for force deletion of template. It will delete the Harness entity even if your pipelines or other entities reference it
    gitDetails Property Map
    Contains parameters related to creating an Entity for Git Experience.
    gitImportDetails Property Map
    Contains Git Information for importing entities from Git
    importFromGit Boolean
    Flag to set if importing from Git
    isStable Boolean
    True if given version for template to be set as stable.
    name String
    Name of the Variable
    orgId String
    Organization Identifier for the Entity
    projectId String
    Project Identifier for the Entity
    tags List<String>
    Tags to associate with the resource.
    templateImportRequest Property Map
    Contains parameters for importing template.
    templateYaml String
    Yaml for creating new Template. 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 Template 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 Template Resource

    Get an existing Template 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?: TemplateState, opts?: CustomResourceOptions): Template
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            comments: Optional[str] = None,
            description: Optional[str] = None,
            force_delete: Optional[str] = None,
            git_details: Optional[TemplateGitDetailsArgs] = None,
            git_import_details: Optional[TemplateGitImportDetailsArgs] = None,
            identifier: Optional[str] = None,
            import_from_git: Optional[bool] = None,
            is_stable: Optional[bool] = None,
            name: Optional[str] = None,
            org_id: Optional[str] = None,
            project_id: Optional[str] = None,
            tags: Optional[Sequence[str]] = None,
            template_import_request: Optional[TemplateTemplateImportRequestArgs] = None,
            template_yaml: Optional[str] = None,
            version: Optional[str] = None) -> Template
    func GetTemplate(ctx *Context, name string, id IDInput, state *TemplateState, opts ...ResourceOption) (*Template, error)
    public static Template Get(string name, Input<string> id, TemplateState? state, CustomResourceOptions? opts = null)
    public static Template get(String name, Output<String> id, TemplateState 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:
    Comments string
    Specify comment with respect to changes.
    Description string
    Description of the entity. Description field is deprecated

    Deprecated: description field is deprecated

    ForceDelete string
    Enable this flag for force deletion of template. It will delete the Harness entity even if your pipelines or other entities reference it
    GitDetails TemplateGitDetails
    Contains parameters related to creating an Entity for Git Experience.
    GitImportDetails TemplateGitImportDetails
    Contains Git Information for importing entities from Git
    Identifier string
    Unique identifier of the resource
    ImportFromGit bool
    Flag to set if importing from Git
    IsStable bool
    True if given version for template to be set as stable.
    Name string
    Name of the Variable
    OrgId string
    Organization Identifier for the Entity
    ProjectId string
    Project Identifier for the Entity
    Tags List<string>
    Tags to associate with the resource.
    TemplateImportRequest TemplateTemplateImportRequest
    Contains parameters for importing template.
    TemplateYaml string
    Yaml for creating new Template. 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.
    Version string
    Version Label for Template.
    Comments string
    Specify comment with respect to changes.
    Description string
    Description of the entity. Description field is deprecated

    Deprecated: description field is deprecated

    ForceDelete string
    Enable this flag for force deletion of template. It will delete the Harness entity even if your pipelines or other entities reference it
    GitDetails TemplateGitDetailsArgs
    Contains parameters related to creating an Entity for Git Experience.
    GitImportDetails TemplateGitImportDetailsArgs
    Contains Git Information for importing entities from Git
    Identifier string
    Unique identifier of the resource
    ImportFromGit bool
    Flag to set if importing from Git
    IsStable bool
    True if given version for template to be set as stable.
    Name string
    Name of the Variable
    OrgId string
    Organization Identifier for the Entity
    ProjectId string
    Project Identifier for the Entity
    Tags []string
    Tags to associate with the resource.
    TemplateImportRequest TemplateTemplateImportRequestArgs
    Contains parameters for importing template.
    TemplateYaml string
    Yaml for creating new Template. 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.
    Version string
    Version Label for Template.
    comments String
    Specify comment with respect to changes.
    description String
    Description of the entity. Description field is deprecated

    Deprecated: description field is deprecated

    forceDelete String
    Enable this flag for force deletion of template. It will delete the Harness entity even if your pipelines or other entities reference it
    gitDetails TemplateGitDetails
    Contains parameters related to creating an Entity for Git Experience.
    gitImportDetails TemplateGitImportDetails
    Contains Git Information for importing entities from Git
    identifier String
    Unique identifier of the resource
    importFromGit Boolean
    Flag to set if importing from Git
    isStable Boolean
    True if given version for template to be set as stable.
    name String
    Name of the Variable
    orgId String
    Organization Identifier for the Entity
    projectId String
    Project Identifier for the Entity
    tags List<String>
    Tags to associate with the resource.
    templateImportRequest TemplateTemplateImportRequest
    Contains parameters for importing template.
    templateYaml String
    Yaml for creating new Template. 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.
    version String
    Version Label for Template.
    comments string
    Specify comment with respect to changes.
    description string
    Description of the entity. Description field is deprecated

    Deprecated: description field is deprecated

    forceDelete string
    Enable this flag for force deletion of template. It will delete the Harness entity even if your pipelines or other entities reference it
    gitDetails TemplateGitDetails
    Contains parameters related to creating an Entity for Git Experience.
    gitImportDetails TemplateGitImportDetails
    Contains Git Information for importing entities from Git
    identifier string
    Unique identifier of the resource
    importFromGit boolean
    Flag to set if importing from Git
    isStable boolean
    True if given version for template to be set as stable.
    name string
    Name of the Variable
    orgId string
    Organization Identifier for the Entity
    projectId string
    Project Identifier for the Entity
    tags string[]
    Tags to associate with the resource.
    templateImportRequest TemplateTemplateImportRequest
    Contains parameters for importing template.
    templateYaml string
    Yaml for creating new Template. 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.
    version string
    Version Label for Template.
    comments str
    Specify comment with respect to changes.
    description str
    Description of the entity. Description field is deprecated

    Deprecated: description field is deprecated

    force_delete str
    Enable this flag for force deletion of template. It will delete the Harness entity even if your pipelines or other entities reference it
    git_details TemplateGitDetailsArgs
    Contains parameters related to creating an Entity for Git Experience.
    git_import_details TemplateGitImportDetailsArgs
    Contains Git Information for importing entities from Git
    identifier str
    Unique identifier of the resource
    import_from_git bool
    Flag to set if importing from Git
    is_stable bool
    True if given version for template to be set as stable.
    name str
    Name of the Variable
    org_id str
    Organization Identifier for the Entity
    project_id str
    Project Identifier for the Entity
    tags Sequence[str]
    Tags to associate with the resource.
    template_import_request TemplateTemplateImportRequestArgs
    Contains parameters for importing template.
    template_yaml str
    Yaml for creating new Template. 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.
    version str
    Version Label for Template.
    comments String
    Specify comment with respect to changes.
    description String
    Description of the entity. Description field is deprecated

    Deprecated: description field is deprecated

    forceDelete String
    Enable this flag for force deletion of template. It will delete the Harness entity even if your pipelines or other entities reference it
    gitDetails Property Map
    Contains parameters related to creating an Entity for Git Experience.
    gitImportDetails Property Map
    Contains Git Information for importing entities from Git
    identifier String
    Unique identifier of the resource
    importFromGit Boolean
    Flag to set if importing from Git
    isStable Boolean
    True if given version for template to be set as stable.
    name String
    Name of the Variable
    orgId String
    Organization Identifier for the Entity
    projectId String
    Project Identifier for the Entity
    tags List<String>
    Tags to associate with the resource.
    templateImportRequest Property Map
    Contains parameters for importing template.
    templateYaml String
    Yaml for creating new Template. 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.
    version String
    Version Label for Template.

    Supporting Types

    TemplateGitDetails, TemplateGitDetailsArgs

    BaseBranch string
    Name of the default branch (this checks out a new branch titled by branch_name).
    BranchName string
    Name of the branch.
    CommitMessage string
    Commit message used for the merge commit.
    ConnectorRef string
    Identifier of the Harness Connector used for CRUD operations on the 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}.
    FilePath string
    File path of the Entity in the repository.
    LastCommitId string
    Last commit identifier (for Git Repositories other than Github). To be provided only when updating Pipeline.
    LastObjectId string
    Last object identifier (for Github). To be provided only when updating Pipeline.
    RepoName string
    Name of the repository.
    StoreType string
    Specifies whether the Entity is to be stored in Git or not. Possible values: INLINE, REMOTE.
    BaseBranch string
    Name of the default branch (this checks out a new branch titled by branch_name).
    BranchName string
    Name of the branch.
    CommitMessage string
    Commit message used for the merge commit.
    ConnectorRef string
    Identifier of the Harness Connector used for CRUD operations on the 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}.
    FilePath string
    File path of the Entity in the repository.
    LastCommitId string
    Last commit identifier (for Git Repositories other than Github). To be provided only when updating Pipeline.
    LastObjectId string
    Last object identifier (for Github). To be provided only when updating Pipeline.
    RepoName string
    Name of the repository.
    StoreType string
    Specifies whether the Entity is to be stored in Git or not. Possible values: INLINE, REMOTE.
    baseBranch String
    Name of the default branch (this checks out a new branch titled by branch_name).
    branchName String
    Name of the branch.
    commitMessage String
    Commit message used for the merge commit.
    connectorRef String
    Identifier of the Harness Connector used for CRUD operations on the 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}.
    filePath String
    File path of the Entity in the repository.
    lastCommitId String
    Last commit identifier (for Git Repositories other than Github). To be provided only when updating Pipeline.
    lastObjectId String
    Last object identifier (for Github). To be provided only when updating Pipeline.
    repoName String
    Name of the repository.
    storeType String
    Specifies whether the Entity is to be stored in Git or not. Possible values: INLINE, REMOTE.
    baseBranch string
    Name of the default branch (this checks out a new branch titled by branch_name).
    branchName string
    Name of the branch.
    commitMessage string
    Commit message used for the merge commit.
    connectorRef string
    Identifier of the Harness Connector used for CRUD operations on the 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}.
    filePath string
    File path of the Entity in the repository.
    lastCommitId string
    Last commit identifier (for Git Repositories other than Github). To be provided only when updating Pipeline.
    lastObjectId string
    Last object identifier (for Github). To be provided only when updating Pipeline.
    repoName string
    Name of the repository.
    storeType string
    Specifies whether the Entity is to be stored in Git or not. Possible values: INLINE, REMOTE.
    base_branch str
    Name of the default branch (this checks out a new branch titled by branch_name).
    branch_name str
    Name of the branch.
    commit_message str
    Commit message used for the merge commit.
    connector_ref str
    Identifier of the Harness Connector used for CRUD operations on the 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}.
    file_path str
    File path of the Entity in the repository.
    last_commit_id str
    Last commit identifier (for Git Repositories other than Github). To be provided only when updating Pipeline.
    last_object_id str
    Last object identifier (for Github). To be provided only when updating Pipeline.
    repo_name str
    Name of the repository.
    store_type str
    Specifies whether the Entity is to be stored in Git or not. Possible values: INLINE, REMOTE.
    baseBranch String
    Name of the default branch (this checks out a new branch titled by branch_name).
    branchName String
    Name of the branch.
    commitMessage String
    Commit message used for the merge commit.
    connectorRef String
    Identifier of the Harness Connector used for CRUD operations on the 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}.
    filePath String
    File path of the Entity in the repository.
    lastCommitId String
    Last commit identifier (for Git Repositories other than Github). To be provided only when updating Pipeline.
    lastObjectId String
    Last object identifier (for Github). To be provided only when updating Pipeline.
    repoName String
    Name of the repository.
    storeType String
    Specifies whether the Entity is to be stored in Git or not. Possible values: INLINE, REMOTE.

    TemplateGitImportDetails, TemplateGitImportDetailsArgs

    BranchName string
    Name of the branch.
    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.
    IsForceImport bool
    RepoName string
    Name of the repository.
    BranchName string
    Name of the branch.
    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.
    IsForceImport bool
    RepoName string
    Name of the repository.
    branchName String
    Name of the branch.
    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.
    isForceImport Boolean
    repoName String
    Name of the repository.
    branchName string
    Name of the branch.
    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.
    isForceImport boolean
    repoName string
    Name of the repository.
    branch_name str
    Name of the branch.
    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.
    is_force_import bool
    repo_name str
    Name of the repository.
    branchName String
    Name of the branch.
    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.
    isForceImport Boolean
    repoName String
    Name of the repository.

    TemplateTemplateImportRequest, TemplateTemplateImportRequestArgs

    TemplateDescription string
    Description of the template.
    TemplateName string
    Name of the template.
    TemplateVersion string
    Version of the template.
    TemplateDescription string
    Description of the template.
    TemplateName string
    Name of the template.
    TemplateVersion string
    Version of the template.
    templateDescription String
    Description of the template.
    templateName String
    Name of the template.
    templateVersion String
    Version of the template.
    templateDescription string
    Description of the template.
    templateName string
    Name of the template.
    templateVersion string
    Version of the template.
    template_description str
    Description of the template.
    template_name str
    Name of the template.
    template_version str
    Version of the template.
    templateDescription String
    Description of the template.
    templateName String
    Name of the template.
    templateVersion String
    Version of the template.

    Import

    Import account level template

    $ pulumi import harness:platform/template:Template example <template_id>
    

    Import org level template

    $ pulumi import harness:platform/template:Template example <ord_id>/<template_id>
    

    Import project level template

    $ pulumi import harness:platform/template:Template example <org_id>/<project_id>/<template_id>
    

    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.
    harness logo
    Harness v0.1.2 published on Friday, Jul 19, 2024 by Pulumi