1. Packages
  2. Ibm Provider
  3. API Docs
  4. getCdTektonPipelineDefinition
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getCdTektonPipelineDefinition

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Provides a read-only data source to retrieve information about a cd_tekton_pipeline_definition. You can then reference the fields of the data source in other resources within the same configuration by using interpolation syntax.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const cdTektonPipelineDefinition = ibm.getCdTektonPipelineDefinition({
        definitionId: ibm_cd_tekton_pipeline_definition.cd_tekton_pipeline_definition_instance.definition_id,
        pipelineId: ibm_cd_tekton_pipeline_definition.cd_tekton_pipeline_definition_instance.pipeline_id,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    cd_tekton_pipeline_definition = ibm.get_cd_tekton_pipeline_definition(definition_id=ibm_cd_tekton_pipeline_definition["cd_tekton_pipeline_definition_instance"]["definition_id"],
        pipeline_id=ibm_cd_tekton_pipeline_definition["cd_tekton_pipeline_definition_instance"]["pipeline_id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.LookupCdTektonPipelineDefinition(ctx, &ibm.LookupCdTektonPipelineDefinitionArgs{
    			DefinitionId: ibm_cd_tekton_pipeline_definition.Cd_tekton_pipeline_definition_instance.Definition_id,
    			PipelineId:   ibm_cd_tekton_pipeline_definition.Cd_tekton_pipeline_definition_instance.Pipeline_id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var cdTektonPipelineDefinition = Ibm.GetCdTektonPipelineDefinition.Invoke(new()
        {
            DefinitionId = ibm_cd_tekton_pipeline_definition.Cd_tekton_pipeline_definition_instance.Definition_id,
            PipelineId = ibm_cd_tekton_pipeline_definition.Cd_tekton_pipeline_definition_instance.Pipeline_id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetCdTektonPipelineDefinitionArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var cdTektonPipelineDefinition = IbmFunctions.getCdTektonPipelineDefinition(GetCdTektonPipelineDefinitionArgs.builder()
                .definitionId(ibm_cd_tekton_pipeline_definition.cd_tekton_pipeline_definition_instance().definition_id())
                .pipelineId(ibm_cd_tekton_pipeline_definition.cd_tekton_pipeline_definition_instance().pipeline_id())
                .build());
    
        }
    }
    
    variables:
      cdTektonPipelineDefinition:
        fn::invoke:
          function: ibm:getCdTektonPipelineDefinition
          arguments:
            definitionId: ${ibm_cd_tekton_pipeline_definition.cd_tekton_pipeline_definition_instance.definition_id}
            pipelineId: ${ibm_cd_tekton_pipeline_definition.cd_tekton_pipeline_definition_instance.pipeline_id}
    

    Using getCdTektonPipelineDefinition

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getCdTektonPipelineDefinition(args: GetCdTektonPipelineDefinitionArgs, opts?: InvokeOptions): Promise<GetCdTektonPipelineDefinitionResult>
    function getCdTektonPipelineDefinitionOutput(args: GetCdTektonPipelineDefinitionOutputArgs, opts?: InvokeOptions): Output<GetCdTektonPipelineDefinitionResult>
    def get_cd_tekton_pipeline_definition(definition_id: Optional[str] = None,
                                          id: Optional[str] = None,
                                          pipeline_id: Optional[str] = None,
                                          opts: Optional[InvokeOptions] = None) -> GetCdTektonPipelineDefinitionResult
    def get_cd_tekton_pipeline_definition_output(definition_id: Optional[pulumi.Input[str]] = None,
                                          id: Optional[pulumi.Input[str]] = None,
                                          pipeline_id: Optional[pulumi.Input[str]] = None,
                                          opts: Optional[InvokeOptions] = None) -> Output[GetCdTektonPipelineDefinitionResult]
    func LookupCdTektonPipelineDefinition(ctx *Context, args *LookupCdTektonPipelineDefinitionArgs, opts ...InvokeOption) (*LookupCdTektonPipelineDefinitionResult, error)
    func LookupCdTektonPipelineDefinitionOutput(ctx *Context, args *LookupCdTektonPipelineDefinitionOutputArgs, opts ...InvokeOption) LookupCdTektonPipelineDefinitionResultOutput

    > Note: This function is named LookupCdTektonPipelineDefinition in the Go SDK.

    public static class GetCdTektonPipelineDefinition 
    {
        public static Task<GetCdTektonPipelineDefinitionResult> InvokeAsync(GetCdTektonPipelineDefinitionArgs args, InvokeOptions? opts = null)
        public static Output<GetCdTektonPipelineDefinitionResult> Invoke(GetCdTektonPipelineDefinitionInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCdTektonPipelineDefinitionResult> getCdTektonPipelineDefinition(GetCdTektonPipelineDefinitionArgs args, InvokeOptions options)
    public static Output<GetCdTektonPipelineDefinitionResult> getCdTektonPipelineDefinition(GetCdTektonPipelineDefinitionArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getCdTektonPipelineDefinition:getCdTektonPipelineDefinition
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DefinitionId string
    The definition ID.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    PipelineId string
    The Tekton pipeline ID.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    Id string
    (String) ID of the repository tool instance in the parent toolchain.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    DefinitionId string
    The definition ID.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    PipelineId string
    The Tekton pipeline ID.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    Id string
    (String) ID of the repository tool instance in the parent toolchain.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    definitionId String
    The definition ID.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    pipelineId String
    The Tekton pipeline ID.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    id String
    (String) ID of the repository tool instance in the parent toolchain.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    definitionId string
    The definition ID.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    pipelineId string
    The Tekton pipeline ID.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    id string
    (String) ID of the repository tool instance in the parent toolchain.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    definition_id str
    The definition ID.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    pipeline_id str
    The Tekton pipeline ID.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    id str
    (String) ID of the repository tool instance in the parent toolchain.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    definitionId String
    The definition ID.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    pipelineId String
    The Tekton pipeline ID.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    id String
    (String) ID of the repository tool instance in the parent toolchain.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.

    getCdTektonPipelineDefinition Result

    The following output properties are available:

    DefinitionId string
    Href string
    (String) API URL for interacting with the definition.

    • Constraints: The maximum length is 2048 characters. The minimum length is 10 characters. The value must match regular expression /^http(s)?:\/\/([^\/?#]*)([^?#]*)(\\?([^#]*))?(#(.*))?$/.
    Id string
    (String) ID of the repository tool instance in the parent toolchain.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    PipelineId string
    Sources List<GetCdTektonPipelineDefinitionSource>
    (List) Source repository containing the Tekton pipeline definition. Nested schema for source:
    DefinitionId string
    Href string
    (String) API URL for interacting with the definition.

    • Constraints: The maximum length is 2048 characters. The minimum length is 10 characters. The value must match regular expression /^http(s)?:\/\/([^\/?#]*)([^?#]*)(\\?([^#]*))?(#(.*))?$/.
    Id string
    (String) ID of the repository tool instance in the parent toolchain.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    PipelineId string
    Sources []GetCdTektonPipelineDefinitionSource
    (List) Source repository containing the Tekton pipeline definition. Nested schema for source:
    definitionId String
    href String
    (String) API URL for interacting with the definition.

    • Constraints: The maximum length is 2048 characters. The minimum length is 10 characters. The value must match regular expression /^http(s)?:\/\/([^\/?#]*)([^?#]*)(\\?([^#]*))?(#(.*))?$/.
    id String
    (String) ID of the repository tool instance in the parent toolchain.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    pipelineId String
    sources List<GetCdTektonPipelineDefinitionSource>
    (List) Source repository containing the Tekton pipeline definition. Nested schema for source:
    definitionId string
    href string
    (String) API URL for interacting with the definition.

    • Constraints: The maximum length is 2048 characters. The minimum length is 10 characters. The value must match regular expression /^http(s)?:\/\/([^\/?#]*)([^?#]*)(\\?([^#]*))?(#(.*))?$/.
    id string
    (String) ID of the repository tool instance in the parent toolchain.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    pipelineId string
    sources GetCdTektonPipelineDefinitionSource[]
    (List) Source repository containing the Tekton pipeline definition. Nested schema for source:
    definition_id str
    href str
    (String) API URL for interacting with the definition.

    • Constraints: The maximum length is 2048 characters. The minimum length is 10 characters. The value must match regular expression /^http(s)?:\/\/([^\/?#]*)([^?#]*)(\\?([^#]*))?(#(.*))?$/.
    id str
    (String) ID of the repository tool instance in the parent toolchain.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    pipeline_id str
    sources Sequence[GetCdTektonPipelineDefinitionSource]
    (List) Source repository containing the Tekton pipeline definition. Nested schema for source:
    definitionId String
    href String
    (String) API URL for interacting with the definition.

    • Constraints: The maximum length is 2048 characters. The minimum length is 10 characters. The value must match regular expression /^http(s)?:\/\/([^\/?#]*)([^?#]*)(\\?([^#]*))?(#(.*))?$/.
    id String
    (String) ID of the repository tool instance in the parent toolchain.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    pipelineId String
    sources List<Property Map>
    (List) Source repository containing the Tekton pipeline definition. Nested schema for source:

    Supporting Types

    GetCdTektonPipelineDefinitionSource

    Properties List<GetCdTektonPipelineDefinitionSourceProperty>
    (List) Properties of the source, which define the URL of the repository and a branch or tag. Nested schema for properties:
    Type string
    (String) The only supported source type is "git", indicating that the source is a git repository.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^git$/.
    Properties []GetCdTektonPipelineDefinitionSourceProperty
    (List) Properties of the source, which define the URL of the repository and a branch or tag. Nested schema for properties:
    Type string
    (String) The only supported source type is "git", indicating that the source is a git repository.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^git$/.
    properties List<GetCdTektonPipelineDefinitionSourceProperty>
    (List) Properties of the source, which define the URL of the repository and a branch or tag. Nested schema for properties:
    type String
    (String) The only supported source type is "git", indicating that the source is a git repository.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^git$/.
    properties GetCdTektonPipelineDefinitionSourceProperty[]
    (List) Properties of the source, which define the URL of the repository and a branch or tag. Nested schema for properties:
    type string
    (String) The only supported source type is "git", indicating that the source is a git repository.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^git$/.
    properties Sequence[GetCdTektonPipelineDefinitionSourceProperty]
    (List) Properties of the source, which define the URL of the repository and a branch or tag. Nested schema for properties:
    type str
    (String) The only supported source type is "git", indicating that the source is a git repository.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^git$/.
    properties List<Property Map>
    (List) Properties of the source, which define the URL of the repository and a branch or tag. Nested schema for properties:
    type String
    (String) The only supported source type is "git", indicating that the source is a git repository.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^git$/.

    GetCdTektonPipelineDefinitionSourceProperty

    Branch string
    (String) A branch from the repo, specify one of branch or tag only.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^[-0-9a-zA-Z_.]{1,253}$/.
    Path string
    (String) The path to the definition's YAML files.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^[-0-9a-zA-Z_.]{1,253}$/.
    Tag string
    (String) A tag from the repo, specify one of branch or tag only.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^[-0-9a-zA-Z_]{1,253}$/.
    Tools List<GetCdTektonPipelineDefinitionSourcePropertyTool>
    (List) Reference to the repository tool in the parent toolchain. Nested schema for tool:
    Url string
    (Forces new resource, String) URL of the definition repository.

    • Constraints: The maximum length is 2048 characters. The minimum length is 10 characters. The value must match regular expression /^http(s)?:\/\/([^\/?#]*)([^?#]*)(\\?([^#]*))?(#(.*))?$/.
    Branch string
    (String) A branch from the repo, specify one of branch or tag only.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^[-0-9a-zA-Z_.]{1,253}$/.
    Path string
    (String) The path to the definition's YAML files.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^[-0-9a-zA-Z_.]{1,253}$/.
    Tag string
    (String) A tag from the repo, specify one of branch or tag only.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^[-0-9a-zA-Z_]{1,253}$/.
    Tools []GetCdTektonPipelineDefinitionSourcePropertyTool
    (List) Reference to the repository tool in the parent toolchain. Nested schema for tool:
    Url string
    (Forces new resource, String) URL of the definition repository.

    • Constraints: The maximum length is 2048 characters. The minimum length is 10 characters. The value must match regular expression /^http(s)?:\/\/([^\/?#]*)([^?#]*)(\\?([^#]*))?(#(.*))?$/.
    branch String
    (String) A branch from the repo, specify one of branch or tag only.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^[-0-9a-zA-Z_.]{1,253}$/.
    path String
    (String) The path to the definition's YAML files.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^[-0-9a-zA-Z_.]{1,253}$/.
    tag String
    (String) A tag from the repo, specify one of branch or tag only.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^[-0-9a-zA-Z_]{1,253}$/.
    tools List<GetCdTektonPipelineDefinitionSourcePropertyTool>
    (List) Reference to the repository tool in the parent toolchain. Nested schema for tool:
    url String
    (Forces new resource, String) URL of the definition repository.

    • Constraints: The maximum length is 2048 characters. The minimum length is 10 characters. The value must match regular expression /^http(s)?:\/\/([^\/?#]*)([^?#]*)(\\?([^#]*))?(#(.*))?$/.
    branch string
    (String) A branch from the repo, specify one of branch or tag only.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^[-0-9a-zA-Z_.]{1,253}$/.
    path string
    (String) The path to the definition's YAML files.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^[-0-9a-zA-Z_.]{1,253}$/.
    tag string
    (String) A tag from the repo, specify one of branch or tag only.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^[-0-9a-zA-Z_]{1,253}$/.
    tools GetCdTektonPipelineDefinitionSourcePropertyTool[]
    (List) Reference to the repository tool in the parent toolchain. Nested schema for tool:
    url string
    (Forces new resource, String) URL of the definition repository.

    • Constraints: The maximum length is 2048 characters. The minimum length is 10 characters. The value must match regular expression /^http(s)?:\/\/([^\/?#]*)([^?#]*)(\\?([^#]*))?(#(.*))?$/.
    branch str
    (String) A branch from the repo, specify one of branch or tag only.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^[-0-9a-zA-Z_.]{1,253}$/.
    path str
    (String) The path to the definition's YAML files.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^[-0-9a-zA-Z_.]{1,253}$/.
    tag str
    (String) A tag from the repo, specify one of branch or tag only.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^[-0-9a-zA-Z_]{1,253}$/.
    tools Sequence[GetCdTektonPipelineDefinitionSourcePropertyTool]
    (List) Reference to the repository tool in the parent toolchain. Nested schema for tool:
    url str
    (Forces new resource, String) URL of the definition repository.

    • Constraints: The maximum length is 2048 characters. The minimum length is 10 characters. The value must match regular expression /^http(s)?:\/\/([^\/?#]*)([^?#]*)(\\?([^#]*))?(#(.*))?$/.
    branch String
    (String) A branch from the repo, specify one of branch or tag only.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^[-0-9a-zA-Z_.]{1,253}$/.
    path String
    (String) The path to the definition's YAML files.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^[-0-9a-zA-Z_.]{1,253}$/.
    tag String
    (String) A tag from the repo, specify one of branch or tag only.

    • Constraints: The maximum length is 253 characters. The minimum length is 1 character. The value must match regular expression /^[-0-9a-zA-Z_]{1,253}$/.
    tools List<Property Map>
    (List) Reference to the repository tool in the parent toolchain. Nested schema for tool:
    url String
    (Forces new resource, String) URL of the definition repository.

    • Constraints: The maximum length is 2048 characters. The minimum length is 10 characters. The value must match regular expression /^http(s)?:\/\/([^\/?#]*)([^?#]*)(\\?([^#]*))?(#(.*))?$/.

    GetCdTektonPipelineDefinitionSourcePropertyTool

    Id string
    (String) ID of the repository tool instance in the parent toolchain.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    Id string
    (String) ID of the repository tool instance in the parent toolchain.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    id String
    (String) ID of the repository tool instance in the parent toolchain.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    id string
    (String) ID of the repository tool instance in the parent toolchain.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    id str
    (String) ID of the repository tool instance in the parent toolchain.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.
    id String
    (String) ID of the repository tool instance in the parent toolchain.

    • Constraints: The maximum length is 36 characters. The minimum length is 36 characters. The value must match regular expression /^[-0-9a-z]+$/.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud