published on Wednesday, Apr 29, 2026 by Pulumi
published on Wednesday, Apr 29, 2026 by Pulumi
This resource allows you to manage vulnerability alerts for a GitHub repository. See the documentation for details of usage and how this will impact your repository.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = new github.Repository("example", {
name: "my-repo",
description: "GitHub repo managed by Terraform",
visibility: "private",
});
const exampleRepositoryVulnerabilityAlerts = new github.RepositoryVulnerabilityAlerts("example", {
repository: example.name,
enabled: true,
});
import pulumi
import pulumi_github as github
example = github.Repository("example",
name="my-repo",
description="GitHub repo managed by Terraform",
visibility="private")
example_repository_vulnerability_alerts = github.RepositoryVulnerabilityAlerts("example",
repository=example.name,
enabled=True)
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 {
example, err := github.NewRepository(ctx, "example", &github.RepositoryArgs{
Name: pulumi.String("my-repo"),
Description: pulumi.String("GitHub repo managed by Terraform"),
Visibility: pulumi.String("private"),
})
if err != nil {
return err
}
_, err = github.NewRepositoryVulnerabilityAlerts(ctx, "example", &github.RepositoryVulnerabilityAlertsArgs{
Repository: example.Name,
Enabled: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
var example = new Github.Index.Repository("example", new()
{
Name = "my-repo",
Description = "GitHub repo managed by Terraform",
Visibility = "private",
});
var exampleRepositoryVulnerabilityAlerts = new Github.Index.RepositoryVulnerabilityAlerts("example", new()
{
Repository = example.Name,
Enabled = true,
});
});
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.RepositoryVulnerabilityAlerts;
import com.pulumi.github.RepositoryVulnerabilityAlertsArgs;
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) {
var example = new Repository("example", RepositoryArgs.builder()
.name("my-repo")
.description("GitHub repo managed by Terraform")
.visibility("private")
.build());
var exampleRepositoryVulnerabilityAlerts = new RepositoryVulnerabilityAlerts("exampleRepositoryVulnerabilityAlerts", RepositoryVulnerabilityAlertsArgs.builder()
.repository(example.name())
.enabled(true)
.build());
}
}
resources:
example:
type: github:Repository
properties:
name: my-repo
description: GitHub repo managed by Terraform
visibility: private
exampleRepositoryVulnerabilityAlerts:
type: github:RepositoryVulnerabilityAlerts
name: example
properties:
repository: ${example.name}
enabled: true
Create RepositoryVulnerabilityAlerts Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RepositoryVulnerabilityAlerts(name: string, args: RepositoryVulnerabilityAlertsArgs, opts?: CustomResourceOptions);@overload
def RepositoryVulnerabilityAlerts(resource_name: str,
args: RepositoryVulnerabilityAlertsArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RepositoryVulnerabilityAlerts(resource_name: str,
opts: Optional[ResourceOptions] = None,
repository: Optional[str] = None,
enabled: Optional[bool] = None)func NewRepositoryVulnerabilityAlerts(ctx *Context, name string, args RepositoryVulnerabilityAlertsArgs, opts ...ResourceOption) (*RepositoryVulnerabilityAlerts, error)public RepositoryVulnerabilityAlerts(string name, RepositoryVulnerabilityAlertsArgs args, CustomResourceOptions? opts = null)
public RepositoryVulnerabilityAlerts(String name, RepositoryVulnerabilityAlertsArgs args)
public RepositoryVulnerabilityAlerts(String name, RepositoryVulnerabilityAlertsArgs args, CustomResourceOptions options)
type: github:RepositoryVulnerabilityAlerts
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 RepositoryVulnerabilityAlertsArgs
- 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 RepositoryVulnerabilityAlertsArgs
- 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 RepositoryVulnerabilityAlertsArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RepositoryVulnerabilityAlertsArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RepositoryVulnerabilityAlertsArgs
- 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 repositoryVulnerabilityAlertsResource = new Github.RepositoryVulnerabilityAlerts("repositoryVulnerabilityAlertsResource", new()
{
Repository = "string",
Enabled = false,
});
example, err := github.NewRepositoryVulnerabilityAlerts(ctx, "repositoryVulnerabilityAlertsResource", &github.RepositoryVulnerabilityAlertsArgs{
Repository: pulumi.String("string"),
Enabled: pulumi.Bool(false),
})
var repositoryVulnerabilityAlertsResource = new RepositoryVulnerabilityAlerts("repositoryVulnerabilityAlertsResource", RepositoryVulnerabilityAlertsArgs.builder()
.repository("string")
.enabled(false)
.build());
repository_vulnerability_alerts_resource = github.RepositoryVulnerabilityAlerts("repositoryVulnerabilityAlertsResource",
repository="string",
enabled=False)
const repositoryVulnerabilityAlertsResource = new github.RepositoryVulnerabilityAlerts("repositoryVulnerabilityAlertsResource", {
repository: "string",
enabled: false,
});
type: github:RepositoryVulnerabilityAlerts
properties:
enabled: false
repository: string
RepositoryVulnerabilityAlerts 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 RepositoryVulnerabilityAlerts resource accepts the following input properties:
- Repository string
- The name of the repository to configure vulnerability alerts for.
- Enabled bool
- Whether vulnerability alerts are enabled for the repository. Defaults to
true.
- Repository string
- The name of the repository to configure vulnerability alerts for.
- Enabled bool
- Whether vulnerability alerts are enabled for the repository. Defaults to
true.
- repository String
- The name of the repository to configure vulnerability alerts for.
- enabled Boolean
- Whether vulnerability alerts are enabled for the repository. Defaults to
true.
- repository string
- The name of the repository to configure vulnerability alerts for.
- enabled boolean
- Whether vulnerability alerts are enabled for the repository. Defaults to
true.
- repository str
- The name of the repository to configure vulnerability alerts for.
- enabled bool
- Whether vulnerability alerts are enabled for the repository. Defaults to
true.
- repository String
- The name of the repository to configure vulnerability alerts for.
- enabled Boolean
- Whether vulnerability alerts are enabled for the repository. Defaults to
true.
Outputs
All input properties are implicitly available as output properties. Additionally, the RepositoryVulnerabilityAlerts resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Repository
Id int - The ID of the repository.
- Id string
- The provider-assigned unique ID for this managed resource.
- Repository
Id int - The ID of the repository.
- id String
- The provider-assigned unique ID for this managed resource.
- repository
Id Integer - The ID of the repository.
- id string
- The provider-assigned unique ID for this managed resource.
- repository
Id number - The ID of the repository.
- id str
- The provider-assigned unique ID for this managed resource.
- repository_
id int - The ID of the repository.
- id String
- The provider-assigned unique ID for this managed resource.
- repository
Id Number - The ID of the repository.
Look up Existing RepositoryVulnerabilityAlerts Resource
Get an existing RepositoryVulnerabilityAlerts 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?: RepositoryVulnerabilityAlertsState, opts?: CustomResourceOptions): RepositoryVulnerabilityAlerts@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
enabled: Optional[bool] = None,
repository: Optional[str] = None,
repository_id: Optional[int] = None) -> RepositoryVulnerabilityAlertsfunc GetRepositoryVulnerabilityAlerts(ctx *Context, name string, id IDInput, state *RepositoryVulnerabilityAlertsState, opts ...ResourceOption) (*RepositoryVulnerabilityAlerts, error)public static RepositoryVulnerabilityAlerts Get(string name, Input<string> id, RepositoryVulnerabilityAlertsState? state, CustomResourceOptions? opts = null)public static RepositoryVulnerabilityAlerts get(String name, Output<String> id, RepositoryVulnerabilityAlertsState state, CustomResourceOptions options)resources: _: type: github:RepositoryVulnerabilityAlerts get: 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.
- Enabled bool
- Whether vulnerability alerts are enabled for the repository. Defaults to
true. - Repository string
- The name of the repository to configure vulnerability alerts for.
- Repository
Id int - The ID of the repository.
- Enabled bool
- Whether vulnerability alerts are enabled for the repository. Defaults to
true. - Repository string
- The name of the repository to configure vulnerability alerts for.
- Repository
Id int - The ID of the repository.
- enabled Boolean
- Whether vulnerability alerts are enabled for the repository. Defaults to
true. - repository String
- The name of the repository to configure vulnerability alerts for.
- repository
Id Integer - The ID of the repository.
- enabled boolean
- Whether vulnerability alerts are enabled for the repository. Defaults to
true. - repository string
- The name of the repository to configure vulnerability alerts for.
- repository
Id number - The ID of the repository.
- enabled bool
- Whether vulnerability alerts are enabled for the repository. Defaults to
true. - repository str
- The name of the repository to configure vulnerability alerts for.
- repository_
id int - The ID of the repository.
- enabled Boolean
- Whether vulnerability alerts are enabled for the repository. Defaults to
true. - repository String
- The name of the repository to configure vulnerability alerts for.
- repository
Id Number - The ID of the repository.
Import
Repository vulnerability alerts can be imported using the repositoryName:
$ pulumi import github:index/repositoryVulnerabilityAlerts:RepositoryVulnerabilityAlerts example my-repo
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 Wednesday, Apr 29, 2026 by Pulumi
