published on Friday, Aug 14, 2026 by Pulumi
published on Friday, Aug 14, 2026 by Pulumi
Resource to manage GitHub repository custom properties. For more information, see the GitHub API documentation.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
// NOTE: This assumes there already is a custom property defined on the org level called `my-cool-string` of type `string`
const example = new github.Repository("example", {
name: "example",
description: "My awesome codebase",
});
const exampleRepositoryCustomProperty = new github.RepositoryCustomProperty("example", {
repository: example.name,
propertyName: "my-cool-string",
propertyType: "string",
propertyValues: ["test"],
});
import pulumi
import pulumi_github as github
# NOTE: This assumes there already is a custom property defined on the org level called `my-cool-string` of type `string`
example = github.Repository("example",
name="example",
description="My awesome codebase")
example_repository_custom_property = github.RepositoryCustomProperty("example",
repository=example.name,
property_name="my-cool-string",
property_type="string",
property_values=["test"])
package main
import (
"github.com/pulumi/pulumi-github/sdk/v6/go/github"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// NOTE: This assumes there already is a custom property defined on the org level called `my-cool-string` of type `string`
example, err := github.NewRepository(ctx, "example", &github.RepositoryArgs{
Name: pulumi.String("example"),
Description: pulumi.String("My awesome codebase"),
})
if err != nil {
return err
}
_, err = github.NewRepositoryCustomProperty(ctx, "example", &github.RepositoryCustomPropertyArgs{
Repository: example.Name,
PropertyName: pulumi.String("my-cool-string"),
PropertyType: pulumi.String("string"),
PropertyValues: pulumi.StringArray{
pulumi.String("test"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
// NOTE: This assumes there already is a custom property defined on the org level called `my-cool-string` of type `string`
var example = new Github.Repository("example", new()
{
Name = "example",
Description = "My awesome codebase",
});
var exampleRepositoryCustomProperty = new Github.RepositoryCustomProperty("example", new()
{
Repository = example.Name,
PropertyName = "my-cool-string",
PropertyType = "string",
PropertyValues = new[]
{
"test",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.Repository;
import com.pulumi.github.RepositoryArgs;
import com.pulumi.github.RepositoryCustomProperty;
import com.pulumi.github.RepositoryCustomPropertyArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
// NOTE: This assumes there already is a custom property defined on the org level called `my-cool-string` of type `string`
var example = new Repository("example", RepositoryArgs.builder()
.name("example")
.description("My awesome codebase")
.build());
var exampleRepositoryCustomProperty = new RepositoryCustomProperty("exampleRepositoryCustomProperty", RepositoryCustomPropertyArgs.builder()
.repository(example.name())
.propertyName("my-cool-string")
.propertyType("string")
.propertyValues("test")
.build());
}
}
resources:
# NOTE: This assumes there already is a custom property defined on the org level called `my-cool-string` of type `string`
example:
type: github:Repository
properties:
name: example
description: My awesome codebase
exampleRepositoryCustomProperty:
type: github:RepositoryCustomProperty
name: example
properties:
repository: ${example.name}
propertyName: my-cool-string
propertyType: string
propertyValues:
- test
pulumi {
required_providers {
github = {
source = "pulumi/github"
}
}
}
# NOTE: This assumes there already is a custom property defined on the org level called `my-cool-string` of type `string`
resource "github_repository" "example" {
name = "example"
description = "My awesome codebase"
}
resource "github_repositorycustomproperty" "example" {
repository = github_repository.example.name
property_name = "my-cool-string"
property_type = "string"
property_values = ["test"]
}
Create RepositoryCustomProperty Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RepositoryCustomProperty(name: string, args: RepositoryCustomPropertyArgs, opts?: CustomResourceOptions);@overload
def RepositoryCustomProperty(resource_name: str,
args: RepositoryCustomPropertyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RepositoryCustomProperty(resource_name: str,
opts: Optional[ResourceOptions] = None,
property_name: Optional[str] = None,
property_type: Optional[str] = None,
property_values: Optional[Sequence[str]] = None,
repository: Optional[str] = None)func NewRepositoryCustomProperty(ctx *Context, name string, args RepositoryCustomPropertyArgs, opts ...ResourceOption) (*RepositoryCustomProperty, error)public RepositoryCustomProperty(string name, RepositoryCustomPropertyArgs args, CustomResourceOptions? opts = null)
public RepositoryCustomProperty(String name, RepositoryCustomPropertyArgs args)
public RepositoryCustomProperty(String name, RepositoryCustomPropertyArgs args, CustomResourceOptions options)
type: github:RepositoryCustomProperty
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "github_repository_custom_property" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args RepositoryCustomPropertyArgs
- 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 RepositoryCustomPropertyArgs
- 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 RepositoryCustomPropertyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RepositoryCustomPropertyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RepositoryCustomPropertyArgs
- 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 repositoryCustomPropertyResource = new Github.RepositoryCustomProperty("repositoryCustomPropertyResource", new()
{
PropertyName = "string",
PropertyType = "string",
PropertyValues = new[]
{
"string",
},
Repository = "string",
});
example, err := github.NewRepositoryCustomProperty(ctx, "repositoryCustomPropertyResource", &github.RepositoryCustomPropertyArgs{
PropertyName: pulumi.String("string"),
PropertyType: pulumi.String("string"),
PropertyValues: pulumi.StringArray{
pulumi.String("string"),
},
Repository: pulumi.String("string"),
})
resource "github_repository_custom_property" "repositoryCustomPropertyResource" {
lifecycle {
create_before_destroy = true
}
property_name = "string"
property_type = "string"
property_values = ["string"]
repository = "string"
}
var repositoryCustomPropertyResource = new RepositoryCustomProperty("repositoryCustomPropertyResource", RepositoryCustomPropertyArgs.builder()
.propertyName("string")
.propertyType("string")
.propertyValues("string")
.repository("string")
.build());
repository_custom_property_resource = github.RepositoryCustomProperty("repositoryCustomPropertyResource",
property_name="string",
property_type="string",
property_values=["string"],
repository="string")
const repositoryCustomPropertyResource = new github.RepositoryCustomProperty("repositoryCustomPropertyResource", {
propertyName: "string",
propertyType: "string",
propertyValues: ["string"],
repository: "string",
});
type: github:RepositoryCustomProperty
properties:
propertyName: string
propertyType: string
propertyValues:
- string
repository: string
RepositoryCustomProperty 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 RepositoryCustomProperty resource accepts the following input properties:
- Property
Name string - Name of the custom property.
- Property
Type string - Type of the custom property. Valid values are
string,singleSelect,multiSelect,trueFalse, andurl. - Property
Values List<string> - Value of the custom property. For
string,singleSelect,trueFalse, andurlproperty types, this should be a single value. FormultiSelectproperty types, this can be multiple values. - Repository string
- Name of the repository.
- Property
Name string - Name of the custom property.
- Property
Type string - Type of the custom property. Valid values are
string,singleSelect,multiSelect,trueFalse, andurl. - Property
Values []string - Value of the custom property. For
string,singleSelect,trueFalse, andurlproperty types, this should be a single value. FormultiSelectproperty types, this can be multiple values. - Repository string
- Name of the repository.
- property_
name string - Name of the custom property.
- property_
type string - Type of the custom property. Valid values are
string,singleSelect,multiSelect,trueFalse, andurl. - property_
values list(string) - Value of the custom property. For
string,singleSelect,trueFalse, andurlproperty types, this should be a single value. FormultiSelectproperty types, this can be multiple values. - repository string
- Name of the repository.
- property
Name String - Name of the custom property.
- property
Type String - Type of the custom property. Valid values are
string,singleSelect,multiSelect,trueFalse, andurl. - property
Values List<String> - Value of the custom property. For
string,singleSelect,trueFalse, andurlproperty types, this should be a single value. FormultiSelectproperty types, this can be multiple values. - repository String
- Name of the repository.
- property
Name string - Name of the custom property.
- property
Type string - Type of the custom property. Valid values are
string,singleSelect,multiSelect,trueFalse, andurl. - property
Values string[] - Value of the custom property. For
string,singleSelect,trueFalse, andurlproperty types, this should be a single value. FormultiSelectproperty types, this can be multiple values. - repository string
- Name of the repository.
- property_
name str - Name of the custom property.
- property_
type str - Type of the custom property. Valid values are
string,singleSelect,multiSelect,trueFalse, andurl. - property_
values Sequence[str] - Value of the custom property. For
string,singleSelect,trueFalse, andurlproperty types, this should be a single value. FormultiSelectproperty types, this can be multiple values. - repository str
- Name of the repository.
- property
Name String - Name of the custom property.
- property
Type String - Type of the custom property. Valid values are
string,singleSelect,multiSelect,trueFalse, andurl. - property
Values List<String> - Value of the custom property. For
string,singleSelect,trueFalse, andurlproperty types, this should be a single value. FormultiSelectproperty types, this can be multiple values. - repository String
- Name of the repository.
Outputs
All input properties are implicitly available as output properties. Additionally, the RepositoryCustomProperty resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Repository
Id int - ID of the repository.
- Id string
- The provider-assigned unique ID for this managed resource.
- Repository
Id int - ID of the repository.
- id string
- The provider-assigned unique ID for this managed resource.
- repository_
id number - ID of the repository.
- id String
- The provider-assigned unique ID for this managed resource.
- repository
Id Integer - ID of the repository.
- id string
- The provider-assigned unique ID for this managed resource.
- repository
Id number - ID of the repository.
- id str
- The provider-assigned unique ID for this managed resource.
- repository_
id int - ID of the repository.
- id String
- The provider-assigned unique ID for this managed resource.
- repository
Id Number - ID of the repository.
Look up Existing RepositoryCustomProperty Resource
Get an existing RepositoryCustomProperty 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?: RepositoryCustomPropertyState, opts?: CustomResourceOptions): RepositoryCustomProperty@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
property_name: Optional[str] = None,
property_type: Optional[str] = None,
property_values: Optional[Sequence[str]] = None,
repository: Optional[str] = None,
repository_id: Optional[int] = None) -> RepositoryCustomPropertyfunc GetRepositoryCustomProperty(ctx *Context, name string, id IDInput, state *RepositoryCustomPropertyState, opts ...ResourceOption) (*RepositoryCustomProperty, error)public static RepositoryCustomProperty Get(string name, Input<string> id, RepositoryCustomPropertyState? state, CustomResourceOptions? opts = null)public static RepositoryCustomProperty get(String name, Output<String> id, RepositoryCustomPropertyState state, CustomResourceOptions options)resources: _: type: github:RepositoryCustomProperty get: id: ${id}import {
to = github_repository_custom_property.example
id = "${id}"
}
- 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.
- Property
Name string - Name of the custom property.
- Property
Type string - Type of the custom property. Valid values are
string,singleSelect,multiSelect,trueFalse, andurl. - Property
Values List<string> - Value of the custom property. For
string,singleSelect,trueFalse, andurlproperty types, this should be a single value. FormultiSelectproperty types, this can be multiple values. - Repository string
- Name of the repository.
- Repository
Id int - ID of the repository.
- Property
Name string - Name of the custom property.
- Property
Type string - Type of the custom property. Valid values are
string,singleSelect,multiSelect,trueFalse, andurl. - Property
Values []string - Value of the custom property. For
string,singleSelect,trueFalse, andurlproperty types, this should be a single value. FormultiSelectproperty types, this can be multiple values. - Repository string
- Name of the repository.
- Repository
Id int - ID of the repository.
- property_
name string - Name of the custom property.
- property_
type string - Type of the custom property. Valid values are
string,singleSelect,multiSelect,trueFalse, andurl. - property_
values list(string) - Value of the custom property. For
string,singleSelect,trueFalse, andurlproperty types, this should be a single value. FormultiSelectproperty types, this can be multiple values. - repository string
- Name of the repository.
- repository_
id number - ID of the repository.
- property
Name String - Name of the custom property.
- property
Type String - Type of the custom property. Valid values are
string,singleSelect,multiSelect,trueFalse, andurl. - property
Values List<String> - Value of the custom property. For
string,singleSelect,trueFalse, andurlproperty types, this should be a single value. FormultiSelectproperty types, this can be multiple values. - repository String
- Name of the repository.
- repository
Id Integer - ID of the repository.
- property
Name string - Name of the custom property.
- property
Type string - Type of the custom property. Valid values are
string,singleSelect,multiSelect,trueFalse, andurl. - property
Values string[] - Value of the custom property. For
string,singleSelect,trueFalse, andurlproperty types, this should be a single value. FormultiSelectproperty types, this can be multiple values. - repository string
- Name of the repository.
- repository
Id number - ID of the repository.
- property_
name str - Name of the custom property.
- property_
type str - Type of the custom property. Valid values are
string,singleSelect,multiSelect,trueFalse, andurl. - property_
values Sequence[str] - Value of the custom property. For
string,singleSelect,trueFalse, andurlproperty types, this should be a single value. FormultiSelectproperty types, this can be multiple values. - repository str
- Name of the repository.
- repository_
id int - ID of the repository.
- property
Name String - Name of the custom property.
- property
Type String - Type of the custom property. Valid values are
string,singleSelect,multiSelect,trueFalse, andurl. - property
Values List<String> - Value of the custom property. For
string,singleSelect,trueFalse, andurlproperty types, this should be a single value. FormultiSelectproperty types, this can be multiple values. - repository String
- Name of the repository.
- repository
Id Number - ID of the repository.
Import
The pulumi import command can be used, for example:
$ pulumi import github:index/repositoryCustomProperty:RepositoryCustomProperty example organization-name:repo-name:custom-property-name
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- GitHub pulumi/pulumi-github
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
githubTerraform Provider.
published on Friday, Aug 14, 2026 by Pulumi