harness.platform.Template
Explore with Pulumi AI
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 }
Create Template Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Template(name: string, args: TemplateArgs, opts?: CustomResourceOptions);
@overload
def Template(resource_name: str,
args: TemplateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Template(resource_name: str,
opts: Optional[ResourceOptions] = None,
identifier: Optional[str] = None,
template_yaml: Optional[str] = None,
version: Optional[str] = None,
comments: Optional[str] = None,
description: Optional[str] = None,
force_delete: Optional[str] = None,
git_details: Optional[TemplateGitDetailsArgs] = 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)
func NewTemplate(ctx *Context, name string, args TemplateArgs, opts ...ResourceOption) (*Template, error)
public Template(string name, TemplateArgs args, CustomResourceOptions? opts = null)
public Template(String name, TemplateArgs args)
public Template(String name, TemplateArgs args, CustomResourceOptions options)
type: harness:platform:Template
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 TemplateArgs
- 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 TemplateArgs
- 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 TemplateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args TemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args TemplateArgs
- 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 templateResource = new Harness.Platform.Template("templateResource", new()
{
Identifier = "string",
TemplateYaml = "string",
Version = "string",
Comments = "string",
ForceDelete = "string",
GitDetails = new Harness.Platform.Inputs.TemplateGitDetailsArgs
{
BaseBranch = "string",
BranchName = "string",
CommitMessage = "string",
ConnectorRef = "string",
FilePath = "string",
LastCommitId = "string",
LastObjectId = "string",
RepoName = "string",
StoreType = "string",
},
IsStable = false,
Name = "string",
OrgId = "string",
ProjectId = "string",
Tags = new[]
{
"string",
},
});
example, err := platform.NewTemplate(ctx, "templateResource", &platform.TemplateArgs{
Identifier: pulumi.String("string"),
TemplateYaml: pulumi.String("string"),
Version: pulumi.String("string"),
Comments: pulumi.String("string"),
ForceDelete: pulumi.String("string"),
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"),
},
IsStable: pulumi.Bool(false),
Name: pulumi.String("string"),
OrgId: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
})
var templateResource = new Template("templateResource", TemplateArgs.builder()
.identifier("string")
.templateYaml("string")
.version("string")
.comments("string")
.forceDelete("string")
.gitDetails(TemplateGitDetailsArgs.builder()
.baseBranch("string")
.branchName("string")
.commitMessage("string")
.connectorRef("string")
.filePath("string")
.lastCommitId("string")
.lastObjectId("string")
.repoName("string")
.storeType("string")
.build())
.isStable(false)
.name("string")
.orgId("string")
.projectId("string")
.tags("string")
.build());
template_resource = harness.platform.Template("templateResource",
identifier="string",
template_yaml="string",
version="string",
comments="string",
force_delete="string",
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",
),
is_stable=False,
name="string",
org_id="string",
project_id="string",
tags=["string"])
const templateResource = new harness.platform.Template("templateResource", {
identifier: "string",
templateYaml: "string",
version: "string",
comments: "string",
forceDelete: "string",
gitDetails: {
baseBranch: "string",
branchName: "string",
commitMessage: "string",
connectorRef: "string",
filePath: "string",
lastCommitId: "string",
lastObjectId: "string",
repoName: "string",
storeType: "string",
},
isStable: false,
name: "string",
orgId: "string",
projectId: "string",
tags: ["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
identifier: string
isStable: false
name: string
orgId: string
projectId: string
tags:
- 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
- Template
Yaml 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
- Force
Delete string - Enable this flag for force deletion of template
- Git
Details Lbrlabs.Pulumi Package. Harness. Platform. Inputs. Template Git Details - Contains parameters related to creating an Entity for Git Experience.
- Is
Stable bool - True if given version for template to be set as stable.
- Name string
- Name of the Variable
- Org
Id string - Organization Identifier for the Entity
- Project
Id string - Project Identifier for the Entity
- List<string>
- Tags to associate with the resource.
- Identifier string
- Unique identifier of the resource
- Template
Yaml 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
- Force
Delete string - Enable this flag for force deletion of template
- Git
Details TemplateGit Details Args - Contains parameters related to creating an Entity for Git Experience.
- Is
Stable bool - True if given version for template to be set as stable.
- Name string
- Name of the Variable
- Org
Id string - Organization Identifier for the Entity
- Project
Id string - Project Identifier for the Entity
- []string
- Tags to associate with the resource.
- identifier String
- Unique identifier of the resource
- template
Yaml 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
- force
Delete String - Enable this flag for force deletion of template
- git
Details TemplateGit Details - Contains parameters related to creating an Entity for Git Experience.
- is
Stable Boolean - True if given version for template to be set as stable.
- name String
- Name of the Variable
- org
Id String - Organization Identifier for the Entity
- project
Id String - Project Identifier for the Entity
- List<String>
- Tags to associate with the resource.
- identifier string
- Unique identifier of the resource
- template
Yaml 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
- force
Delete string - Enable this flag for force deletion of template
- git
Details TemplateGit Details - Contains parameters related to creating an Entity for Git Experience.
- is
Stable boolean - True if given version for template to be set as stable.
- name string
- Name of the Variable
- org
Id string - Organization Identifier for the Entity
- project
Id string - Project Identifier for the Entity
- string[]
- Tags to associate with the resource.
- identifier str
- Unique identifier of the resource
- 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 str
- Specify comment with respect to changes.
- description str
- Description of the entity. Description field is deprecated
- force_
delete str - Enable this flag for force deletion of template
- git_
details TemplateGit Details Args - Contains parameters related to creating an Entity for Git Experience.
- 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
- Sequence[str]
- Tags to associate with the resource.
- identifier String
- Unique identifier of the resource
- template
Yaml 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
- force
Delete String - Enable this flag for force deletion of template
- git
Details Property Map - Contains parameters related to creating an Entity for Git Experience.
- is
Stable Boolean - True if given version for template to be set as stable.
- name String
- Name of the Variable
- org
Id String - Organization Identifier for the Entity
- project
Id String - Project Identifier for the Entity
- List<String>
- Tags to associate with the resource.
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,
identifier: Optional[str] = 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_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.
- Comments string
- Specify comment with respect to changes.
- Description string
- Description of the entity. Description field is deprecated
- Force
Delete string - Enable this flag for force deletion of template
- Git
Details Lbrlabs.Pulumi Package. Harness. Platform. Inputs. Template Git Details - Contains parameters related to creating an Entity for Git Experience.
- Identifier string
- Unique identifier of the resource
- Is
Stable bool - True if given version for template to be set as stable.
- Name string
- Name of the Variable
- Org
Id string - Organization Identifier for the Entity
- Project
Id string - Project Identifier for the Entity
- List<string>
- Tags to associate with the resource.
- Template
Yaml 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
- Force
Delete string - Enable this flag for force deletion of template
- Git
Details TemplateGit Details Args - Contains parameters related to creating an Entity for Git Experience.
- Identifier string
- Unique identifier of the resource
- Is
Stable bool - True if given version for template to be set as stable.
- Name string
- Name of the Variable
- Org
Id string - Organization Identifier for the Entity
- Project
Id string - Project Identifier for the Entity
- []string
- Tags to associate with the resource.
- Template
Yaml 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
- force
Delete String - Enable this flag for force deletion of template
- git
Details TemplateGit Details - Contains parameters related to creating an Entity for Git Experience.
- identifier String
- Unique identifier of the resource
- is
Stable Boolean - True if given version for template to be set as stable.
- name String
- Name of the Variable
- org
Id String - Organization Identifier for the Entity
- project
Id String - Project Identifier for the Entity
- List<String>
- Tags to associate with the resource.
- template
Yaml 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
- force
Delete string - Enable this flag for force deletion of template
- git
Details TemplateGit Details - Contains parameters related to creating an Entity for Git Experience.
- identifier string
- Unique identifier of the resource
- is
Stable boolean - True if given version for template to be set as stable.
- name string
- Name of the Variable
- org
Id string - Organization Identifier for the Entity
- project
Id string - Project Identifier for the Entity
- string[]
- Tags to associate with the resource.
- template
Yaml 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
- force_
delete str - Enable this flag for force deletion of template
- git_
details TemplateGit Details Args - Contains parameters related to creating an Entity for Git Experience.
- identifier str
- Unique identifier of the resource
- 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
- Sequence[str]
- Tags to associate with the resource.
- 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
- force
Delete String - Enable this flag for force deletion of template
- git
Details Property Map - Contains parameters related to creating an Entity for Git Experience.
- identifier String
- Unique identifier of the resource
- is
Stable Boolean - True if given version for template to be set as stable.
- name String
- Name of the Variable
- org
Id String - Organization Identifier for the Entity
- project
Id String - Project Identifier for the Entity
- List<String>
- Tags to associate with the resource.
- template
Yaml 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
- Base
Branch string - Name of the default branch (this checks out a new branch titled by branch_name).
- Branch
Name string - Name of the branch.
- Commit
Message string - Commit message used for the merge commit.
- Connector
Ref 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}.
- File
Path string - File path of the Entity in the repository.
- Last
Commit stringId - Last commit identifier (for Git Repositories other than Github). To be provided only when updating Pipeline.
- Last
Object stringId - Last object identifier (for Github). To be provided only when updating Pipeline.
- Repo
Name string - Name of the repository.
- Store
Type string - Specifies whether the Entity is to be stored in Git or not. Possible values: INLINE, REMOTE.
- Base
Branch string - Name of the default branch (this checks out a new branch titled by branch_name).
- Branch
Name string - Name of the branch.
- Commit
Message string - Commit message used for the merge commit.
- Connector
Ref 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}.
- File
Path string - File path of the Entity in the repository.
- Last
Commit stringId - Last commit identifier (for Git Repositories other than Github). To be provided only when updating Pipeline.
- Last
Object stringId - Last object identifier (for Github). To be provided only when updating Pipeline.
- Repo
Name string - Name of the repository.
- Store
Type string - Specifies whether the Entity is to be stored in Git or not. Possible values: INLINE, REMOTE.
- base
Branch String - Name of the default branch (this checks out a new branch titled by branch_name).
- branch
Name String - Name of the branch.
- commit
Message String - Commit message used for the merge commit.
- connector
Ref 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}.
- file
Path String - File path of the Entity in the repository.
- last
Commit StringId - Last commit identifier (for Git Repositories other than Github). To be provided only when updating Pipeline.
- last
Object StringId - Last object identifier (for Github). To be provided only when updating Pipeline.
- repo
Name String - Name of the repository.
- store
Type String - Specifies whether the Entity is to be stored in Git or not. Possible values: INLINE, REMOTE.
- base
Branch string - Name of the default branch (this checks out a new branch titled by branch_name).
- branch
Name string - Name of the branch.
- commit
Message string - Commit message used for the merge commit.
- connector
Ref 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}.
- file
Path string - File path of the Entity in the repository.
- last
Commit stringId - Last commit identifier (for Git Repositories other than Github). To be provided only when updating Pipeline.
- last
Object stringId - Last object identifier (for Github). To be provided only when updating Pipeline.
- repo
Name string - Name of the repository.
- store
Type 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_ strid - Last commit identifier (for Git Repositories other than Github). To be provided only when updating Pipeline.
- last_
object_ strid - 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.
- base
Branch String - Name of the default branch (this checks out a new branch titled by branch_name).
- branch
Name String - Name of the branch.
- commit
Message String - Commit message used for the merge commit.
- connector
Ref 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}.
- file
Path String - File path of the Entity in the repository.
- last
Commit StringId - Last commit identifier (for Git Repositories other than Github). To be provided only when updating Pipeline.
- last
Object StringId - Last object identifier (for Github). To be provided only when updating Pipeline.
- repo
Name String - Name of the repository.
- store
Type String - Specifies whether the Entity is to be stored in Git or not. Possible values: INLINE, REMOTE.
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 lbrlabs/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harness
Terraform Provider.