1. Packages
  2. Harness Provider
  3. API Docs
  4. platform
  5. Repo
Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi

harness.platform.Repo

Explore with Pulumi AI

harness logo
Harness v0.4.4 published on Tuesday, Nov 12, 2024 by Pulumi

    Resource for creating a Harness Repo.

    Example Usage

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    resources:
      test:
        type: harness:platform:Repo
        properties:
          identifier: test_repo_123
          name: test_repo_123
          orgId: test_org_123
          projectId: test_project_123
          defaultBranch: main
          description: test_description_123
          sources:
            - repo: octocat/hello-worId
              type: github
    

    Create Repo Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Repo(name: string, args: RepoArgs, opts?: CustomResourceOptions);
    @overload
    def Repo(resource_name: str,
             args: RepoArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Repo(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             identifier: Optional[str] = None,
             default_branch: Optional[str] = None,
             description: Optional[str] = None,
             git_ignore: Optional[str] = None,
             license: Optional[str] = None,
             org_id: Optional[str] = None,
             project_id: Optional[str] = None,
             readme: Optional[bool] = None,
             sources: Optional[Sequence[RepoSourceArgs]] = None)
    func NewRepo(ctx *Context, name string, args RepoArgs, opts ...ResourceOption) (*Repo, error)
    public Repo(string name, RepoArgs args, CustomResourceOptions? opts = null)
    public Repo(String name, RepoArgs args)
    public Repo(String name, RepoArgs args, CustomResourceOptions options)
    
    type: harness:platform:Repo
    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 RepoArgs
    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 RepoArgs
    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 RepoArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RepoArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RepoArgs
    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 repoResource = new Harness.Platform.Repo("repoResource", new()
    {
        Identifier = "string",
        DefaultBranch = "string",
        Description = "string",
        GitIgnore = "string",
        License = "string",
        OrgId = "string",
        ProjectId = "string",
        Readme = false,
        Sources = new[]
        {
            new Harness.Platform.Inputs.RepoSourceArgs
            {
                Host = "string",
                Password = "string",
                Repo = "string",
                Type = "string",
                Username = "string",
            },
        },
    });
    
    example, err := platform.NewRepo(ctx, "repoResource", &platform.RepoArgs{
    	Identifier:    pulumi.String("string"),
    	DefaultBranch: pulumi.String("string"),
    	Description:   pulumi.String("string"),
    	GitIgnore:     pulumi.String("string"),
    	License:       pulumi.String("string"),
    	OrgId:         pulumi.String("string"),
    	ProjectId:     pulumi.String("string"),
    	Readme:        pulumi.Bool(false),
    	Sources: platform.RepoSourceArray{
    		&platform.RepoSourceArgs{
    			Host:     pulumi.String("string"),
    			Password: pulumi.String("string"),
    			Repo:     pulumi.String("string"),
    			Type:     pulumi.String("string"),
    			Username: pulumi.String("string"),
    		},
    	},
    })
    
    var repoResource = new Repo("repoResource", RepoArgs.builder()
        .identifier("string")
        .defaultBranch("string")
        .description("string")
        .gitIgnore("string")
        .license("string")
        .orgId("string")
        .projectId("string")
        .readme(false)
        .sources(RepoSourceArgs.builder()
            .host("string")
            .password("string")
            .repo("string")
            .type("string")
            .username("string")
            .build())
        .build());
    
    repo_resource = harness.platform.Repo("repoResource",
        identifier="string",
        default_branch="string",
        description="string",
        git_ignore="string",
        license="string",
        org_id="string",
        project_id="string",
        readme=False,
        sources=[{
            "host": "string",
            "password": "string",
            "repo": "string",
            "type": "string",
            "username": "string",
        }])
    
    const repoResource = new harness.platform.Repo("repoResource", {
        identifier: "string",
        defaultBranch: "string",
        description: "string",
        gitIgnore: "string",
        license: "string",
        orgId: "string",
        projectId: "string",
        readme: false,
        sources: [{
            host: "string",
            password: "string",
            repo: "string",
            type: "string",
            username: "string",
        }],
    });
    
    type: harness:platform:Repo
    properties:
        defaultBranch: string
        description: string
        gitIgnore: string
        identifier: string
        license: string
        orgId: string
        projectId: string
        readme: false
        sources:
            - host: string
              password: string
              repo: string
              type: string
              username: string
    

    Repo Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Repo resource accepts the following input properties:

    Identifier string
    Identifier of the repository.
    DefaultBranch string
    Default branch of the repository (Applicate only for create).
    Description string
    Description of the repository.
    GitIgnore string
    Repository should be created with specified predefined gitignore file.
    License string
    Repository should be created with specified predefined license file.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    Readme bool
    Repository should be created with readme file.
    Sources List<RepoSource>
    Configuration for importing an existing repository from SCM provider.
    Identifier string
    Identifier of the repository.
    DefaultBranch string
    Default branch of the repository (Applicate only for create).
    Description string
    Description of the repository.
    GitIgnore string
    Repository should be created with specified predefined gitignore file.
    License string
    Repository should be created with specified predefined license file.
    OrgId string
    Unique identifier of the organization.
    ProjectId string
    Unique identifier of the project.
    Readme bool
    Repository should be created with readme file.
    Sources []RepoSourceArgs
    Configuration for importing an existing repository from SCM provider.
    identifier String
    Identifier of the repository.
    defaultBranch String
    Default branch of the repository (Applicate only for create).
    description String
    Description of the repository.
    gitIgnore String
    Repository should be created with specified predefined gitignore file.
    license String
    Repository should be created with specified predefined license file.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    readme Boolean
    Repository should be created with readme file.
    sources List<RepoSource>
    Configuration for importing an existing repository from SCM provider.
    identifier string
    Identifier of the repository.
    defaultBranch string
    Default branch of the repository (Applicate only for create).
    description string
    Description of the repository.
    gitIgnore string
    Repository should be created with specified predefined gitignore file.
    license string
    Repository should be created with specified predefined license file.
    orgId string
    Unique identifier of the organization.
    projectId string
    Unique identifier of the project.
    readme boolean
    Repository should be created with readme file.
    sources RepoSource[]
    Configuration for importing an existing repository from SCM provider.
    identifier str
    Identifier of the repository.
    default_branch str
    Default branch of the repository (Applicate only for create).
    description str
    Description of the repository.
    git_ignore str
    Repository should be created with specified predefined gitignore file.
    license str
    Repository should be created with specified predefined license file.
    org_id str
    Unique identifier of the organization.
    project_id str
    Unique identifier of the project.
    readme bool
    Repository should be created with readme file.
    sources Sequence[RepoSourceArgs]
    Configuration for importing an existing repository from SCM provider.
    identifier String
    Identifier of the repository.
    defaultBranch String
    Default branch of the repository (Applicate only for create).
    description String
    Description of the repository.
    gitIgnore String
    Repository should be created with specified predefined gitignore file.
    license String
    Repository should be created with specified predefined license file.
    orgId String
    Unique identifier of the organization.
    projectId String
    Unique identifier of the project.
    readme Boolean
    Repository should be created with readme file.
    sources List<Property Map>
    Configuration for importing an existing repository from SCM provider.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Repo resource produces the following output properties:

    Created int
    Timestamp when the repository was created.
    CreatedBy int
    ID of the user who created the repository.
    GitUrl string
    Git URL of the repository.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name of the repository.
    Path string
    Path of the repository.
    Updated int
    Timestamp when the repository was last updated.
    Created int
    Timestamp when the repository was created.
    CreatedBy int
    ID of the user who created the repository.
    GitUrl string
    Git URL of the repository.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    Name of the repository.
    Path string
    Path of the repository.
    Updated int
    Timestamp when the repository was last updated.
    created Integer
    Timestamp when the repository was created.
    createdBy Integer
    ID of the user who created the repository.
    gitUrl String
    Git URL of the repository.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name of the repository.
    path String
    Path of the repository.
    updated Integer
    Timestamp when the repository was last updated.
    created number
    Timestamp when the repository was created.
    createdBy number
    ID of the user who created the repository.
    gitUrl string
    Git URL of the repository.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    Name of the repository.
    path string
    Path of the repository.
    updated number
    Timestamp when the repository was last updated.
    created int
    Timestamp when the repository was created.
    created_by int
    ID of the user who created the repository.
    git_url str
    Git URL of the repository.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    Name of the repository.
    path str
    Path of the repository.
    updated int
    Timestamp when the repository was last updated.
    created Number
    Timestamp when the repository was created.
    createdBy Number
    ID of the user who created the repository.
    gitUrl String
    Git URL of the repository.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    Name of the repository.
    path String
    Path of the repository.
    updated Number
    Timestamp when the repository was last updated.

    Look up Existing Repo Resource

    Get an existing Repo 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?: RepoState, opts?: CustomResourceOptions): Repo
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created: Optional[int] = None,
            created_by: Optional[int] = None,
            default_branch: Optional[str] = None,
            description: Optional[str] = None,
            git_ignore: Optional[str] = None,
            git_url: Optional[str] = None,
            identifier: Optional[str] = None,
            license: Optional[str] = None,
            name: Optional[str] = None,
            org_id: Optional[str] = None,
            path: Optional[str] = None,
            project_id: Optional[str] = None,
            readme: Optional[bool] = None,
            sources: Optional[Sequence[RepoSourceArgs]] = None,
            updated: Optional[int] = None) -> Repo
    func GetRepo(ctx *Context, name string, id IDInput, state *RepoState, opts ...ResourceOption) (*Repo, error)
    public static Repo Get(string name, Input<string> id, RepoState? state, CustomResourceOptions? opts = null)
    public static Repo get(String name, Output<String> id, RepoState 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:
    Created int
    Timestamp when the repository was created.
    CreatedBy int
    ID of the user who created the repository.
    DefaultBranch string
    Default branch of the repository (Applicate only for create).
    Description string
    Description of the repository.
    GitIgnore string
    Repository should be created with specified predefined gitignore file.
    GitUrl string
    Git URL of the repository.
    Identifier string
    Identifier of the repository.
    License string
    Repository should be created with specified predefined license file.
    Name string
    Name of the repository.
    OrgId string
    Unique identifier of the organization.
    Path string
    Path of the repository.
    ProjectId string
    Unique identifier of the project.
    Readme bool
    Repository should be created with readme file.
    Sources List<RepoSource>
    Configuration for importing an existing repository from SCM provider.
    Updated int
    Timestamp when the repository was last updated.
    Created int
    Timestamp when the repository was created.
    CreatedBy int
    ID of the user who created the repository.
    DefaultBranch string
    Default branch of the repository (Applicate only for create).
    Description string
    Description of the repository.
    GitIgnore string
    Repository should be created with specified predefined gitignore file.
    GitUrl string
    Git URL of the repository.
    Identifier string
    Identifier of the repository.
    License string
    Repository should be created with specified predefined license file.
    Name string
    Name of the repository.
    OrgId string
    Unique identifier of the organization.
    Path string
    Path of the repository.
    ProjectId string
    Unique identifier of the project.
    Readme bool
    Repository should be created with readme file.
    Sources []RepoSourceArgs
    Configuration for importing an existing repository from SCM provider.
    Updated int
    Timestamp when the repository was last updated.
    created Integer
    Timestamp when the repository was created.
    createdBy Integer
    ID of the user who created the repository.
    defaultBranch String
    Default branch of the repository (Applicate only for create).
    description String
    Description of the repository.
    gitIgnore String
    Repository should be created with specified predefined gitignore file.
    gitUrl String
    Git URL of the repository.
    identifier String
    Identifier of the repository.
    license String
    Repository should be created with specified predefined license file.
    name String
    Name of the repository.
    orgId String
    Unique identifier of the organization.
    path String
    Path of the repository.
    projectId String
    Unique identifier of the project.
    readme Boolean
    Repository should be created with readme file.
    sources List<RepoSource>
    Configuration for importing an existing repository from SCM provider.
    updated Integer
    Timestamp when the repository was last updated.
    created number
    Timestamp when the repository was created.
    createdBy number
    ID of the user who created the repository.
    defaultBranch string
    Default branch of the repository (Applicate only for create).
    description string
    Description of the repository.
    gitIgnore string
    Repository should be created with specified predefined gitignore file.
    gitUrl string
    Git URL of the repository.
    identifier string
    Identifier of the repository.
    license string
    Repository should be created with specified predefined license file.
    name string
    Name of the repository.
    orgId string
    Unique identifier of the organization.
    path string
    Path of the repository.
    projectId string
    Unique identifier of the project.
    readme boolean
    Repository should be created with readme file.
    sources RepoSource[]
    Configuration for importing an existing repository from SCM provider.
    updated number
    Timestamp when the repository was last updated.
    created int
    Timestamp when the repository was created.
    created_by int
    ID of the user who created the repository.
    default_branch str
    Default branch of the repository (Applicate only for create).
    description str
    Description of the repository.
    git_ignore str
    Repository should be created with specified predefined gitignore file.
    git_url str
    Git URL of the repository.
    identifier str
    Identifier of the repository.
    license str
    Repository should be created with specified predefined license file.
    name str
    Name of the repository.
    org_id str
    Unique identifier of the organization.
    path str
    Path of the repository.
    project_id str
    Unique identifier of the project.
    readme bool
    Repository should be created with readme file.
    sources Sequence[RepoSourceArgs]
    Configuration for importing an existing repository from SCM provider.
    updated int
    Timestamp when the repository was last updated.
    created Number
    Timestamp when the repository was created.
    createdBy Number
    ID of the user who created the repository.
    defaultBranch String
    Default branch of the repository (Applicate only for create).
    description String
    Description of the repository.
    gitIgnore String
    Repository should be created with specified predefined gitignore file.
    gitUrl String
    Git URL of the repository.
    identifier String
    Identifier of the repository.
    license String
    Repository should be created with specified predefined license file.
    name String
    Name of the repository.
    orgId String
    Unique identifier of the organization.
    path String
    Path of the repository.
    projectId String
    Unique identifier of the project.
    readme Boolean
    Repository should be created with readme file.
    sources List<Property Map>
    Configuration for importing an existing repository from SCM provider.
    updated Number
    Timestamp when the repository was last updated.

    Supporting Types

    RepoSource, RepoSourceArgs

    Host string
    The host URL for the import source.
    Password string
    The password for authentication when importing.
    Repo string
    The full identifier of the repository on the SCM provider's platform.
    Type string
    The type of SCM provider (github, gitlab, bitbucket, stash, gitea, gogs) when importing.
    Username string
    The username for authentication when importing.
    Host string
    The host URL for the import source.
    Password string
    The password for authentication when importing.
    Repo string
    The full identifier of the repository on the SCM provider's platform.
    Type string
    The type of SCM provider (github, gitlab, bitbucket, stash, gitea, gogs) when importing.
    Username string
    The username for authentication when importing.
    host String
    The host URL for the import source.
    password String
    The password for authentication when importing.
    repo String
    The full identifier of the repository on the SCM provider's platform.
    type String
    The type of SCM provider (github, gitlab, bitbucket, stash, gitea, gogs) when importing.
    username String
    The username for authentication when importing.
    host string
    The host URL for the import source.
    password string
    The password for authentication when importing.
    repo string
    The full identifier of the repository on the SCM provider's platform.
    type string
    The type of SCM provider (github, gitlab, bitbucket, stash, gitea, gogs) when importing.
    username string
    The username for authentication when importing.
    host str
    The host URL for the import source.
    password str
    The password for authentication when importing.
    repo str
    The full identifier of the repository on the SCM provider's platform.
    type str
    The type of SCM provider (github, gitlab, bitbucket, stash, gitea, gogs) when importing.
    username str
    The username for authentication when importing.
    host String
    The host URL for the import source.
    password String
    The password for authentication when importing.
    repo String
    The full identifier of the repository on the SCM provider's platform.
    type String
    The type of SCM provider (github, gitlab, bitbucket, stash, gitea, gogs) when importing.
    username String
    The username for authentication when importing.

    Import

    Import

    $ pulumi import harness:platform/repo:Repo example <identifier>
    

    Import using the organization id

    $ pulumi import harness:platform/repo:Repo example <org_id>/<identifier>
    

    Import using the organization id and the project id

    $ pulumi import harness:platform/repo:Repo example <org_id>/<project_id>/<identifier>
    

    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.4.4 published on Tuesday, Nov 12, 2024 by Pulumi