harness.platform.Repo
Explore with Pulumi AI
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)
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.
- Default
Branch string - Default branch of the repository (Applicate only for create).
- Description string
- Description of the repository.
- Git
Ignore string - Repository should be created with specified predefined gitignore file.
- License string
- Repository should be created with specified predefined license file.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- Readme bool
- Repository should be created with readme file.
- Sources
List<Repo
Source> - Configuration for importing an existing repository from SCM provider.
- Identifier string
- Identifier of the repository.
- Default
Branch string - Default branch of the repository (Applicate only for create).
- Description string
- Description of the repository.
- Git
Ignore string - Repository should be created with specified predefined gitignore file.
- License string
- Repository should be created with specified predefined license file.
- Org
Id string - Unique identifier of the organization.
- Project
Id string - Unique identifier of the project.
- Readme bool
- Repository should be created with readme file.
- Sources
[]Repo
Source Args - Configuration for importing an existing repository from SCM provider.
- identifier String
- Identifier of the repository.
- default
Branch String - Default branch of the repository (Applicate only for create).
- description String
- Description of the repository.
- git
Ignore String - Repository should be created with specified predefined gitignore file.
- license String
- Repository should be created with specified predefined license file.
- org
Id String - Unique identifier of the organization.
- project
Id String - Unique identifier of the project.
- readme Boolean
- Repository should be created with readme file.
- sources
List<Repo
Source> - Configuration for importing an existing repository from SCM provider.
- identifier string
- Identifier of the repository.
- default
Branch string - Default branch of the repository (Applicate only for create).
- description string
- Description of the repository.
- git
Ignore string - Repository should be created with specified predefined gitignore file.
- license string
- Repository should be created with specified predefined license file.
- org
Id string - Unique identifier of the organization.
- project
Id string - Unique identifier of the project.
- readme boolean
- Repository should be created with readme file.
- sources
Repo
Source[] - 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[Repo
Source Args] - Configuration for importing an existing repository from SCM provider.
- identifier String
- Identifier of the repository.
- default
Branch String - Default branch of the repository (Applicate only for create).
- description String
- Description of the repository.
- git
Ignore String - Repository should be created with specified predefined gitignore file.
- license String
- Repository should be created with specified predefined license file.
- org
Id String - Unique identifier of the organization.
- project
Id 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.
- Created
By int - ID of the user who created the repository.
- Git
Url 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.
- Created
By int - ID of the user who created the repository.
- Git
Url 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.
- created
By Integer - ID of the user who created the repository.
- git
Url 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.
- created
By number - ID of the user who created the repository.
- git
Url 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.
- created
By Number - ID of the user who created the repository.
- git
Url 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.
- Created int
- Timestamp when the repository was created.
- Created
By int - ID of the user who created the repository.
- Default
Branch string - Default branch of the repository (Applicate only for create).
- Description string
- Description of the repository.
- Git
Ignore string - Repository should be created with specified predefined gitignore file.
- Git
Url 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.
- Org
Id string - Unique identifier of the organization.
- Path string
- Path of the repository.
- Project
Id string - Unique identifier of the project.
- Readme bool
- Repository should be created with readme file.
- Sources
List<Repo
Source> - 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.
- Created
By int - ID of the user who created the repository.
- Default
Branch string - Default branch of the repository (Applicate only for create).
- Description string
- Description of the repository.
- Git
Ignore string - Repository should be created with specified predefined gitignore file.
- Git
Url 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.
- Org
Id string - Unique identifier of the organization.
- Path string
- Path of the repository.
- Project
Id string - Unique identifier of the project.
- Readme bool
- Repository should be created with readme file.
- Sources
[]Repo
Source Args - 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.
- created
By Integer - ID of the user who created the repository.
- default
Branch String - Default branch of the repository (Applicate only for create).
- description String
- Description of the repository.
- git
Ignore String - Repository should be created with specified predefined gitignore file.
- git
Url 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.
- org
Id String - Unique identifier of the organization.
- path String
- Path of the repository.
- project
Id String - Unique identifier of the project.
- readme Boolean
- Repository should be created with readme file.
- sources
List<Repo
Source> - 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.
- created
By number - ID of the user who created the repository.
- default
Branch string - Default branch of the repository (Applicate only for create).
- description string
- Description of the repository.
- git
Ignore string - Repository should be created with specified predefined gitignore file.
- git
Url 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.
- org
Id string - Unique identifier of the organization.
- path string
- Path of the repository.
- project
Id string - Unique identifier of the project.
- readme boolean
- Repository should be created with readme file.
- sources
Repo
Source[] - 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[Repo
Source Args] - 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.
- created
By Number - ID of the user who created the repository.
- default
Branch String - Default branch of the repository (Applicate only for create).
- description String
- Description of the repository.
- git
Ignore String - Repository should be created with specified predefined gitignore file.
- git
Url 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.
- org
Id String - Unique identifier of the organization.
- path String
- Path of the repository.
- project
Id 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.