1. Packages
  2. Github Provider
  3. API Docs
  4. RepositoryDependabotSecurityUpdates
GitHub v6.7.0 published on Friday, Feb 28, 2025 by Pulumi

github.RepositoryDependabotSecurityUpdates

Explore with Pulumi AI

This resource allows you to manage dependabot automated security fixes for a single 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 repo = new github.Repository("repo", {
    name: "my-repo",
    description: "GitHub repo managed by Terraform",
    "private": false,
    vulnerabilityAlerts: true,
});
const example = new github.RepositoryDependabotSecurityUpdates("example", {
    repository: test.name,
    enabled: true,
});
Copy
import pulumi
import pulumi_github as github

repo = github.Repository("repo",
    name="my-repo",
    description="GitHub repo managed by Terraform",
    private=False,
    vulnerability_alerts=True)
example = github.RepositoryDependabotSecurityUpdates("example",
    repository=test["name"],
    enabled=True)
Copy
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 {
		_, err := github.NewRepository(ctx, "repo", &github.RepositoryArgs{
			Name:                pulumi.String("my-repo"),
			Description:         pulumi.String("GitHub repo managed by Terraform"),
			Private:             pulumi.Bool(false),
			VulnerabilityAlerts: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = github.NewRepositoryDependabotSecurityUpdates(ctx, "example", &github.RepositoryDependabotSecurityUpdatesArgs{
			Repository: pulumi.Any(test.Name),
			Enabled:    pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;

return await Deployment.RunAsync(() => 
{
    var repo = new Github.Repository("repo", new()
    {
        Name = "my-repo",
        Description = "GitHub repo managed by Terraform",
        Private = false,
        VulnerabilityAlerts = true,
    });

    var example = new Github.RepositoryDependabotSecurityUpdates("example", new()
    {
        Repository = test.Name,
        Enabled = true,
    });

});
Copy
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.RepositoryDependabotSecurityUpdates;
import com.pulumi.github.RepositoryDependabotSecurityUpdatesArgs;
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 repo = new Repository("repo", RepositoryArgs.builder()
            .name("my-repo")
            .description("GitHub repo managed by Terraform")
            .private_(false)
            .vulnerabilityAlerts(true)
            .build());

        var example = new RepositoryDependabotSecurityUpdates("example", RepositoryDependabotSecurityUpdatesArgs.builder()
            .repository(test.name())
            .enabled(true)
            .build());

    }
}
Copy
resources:
  repo:
    type: github:Repository
    properties:
      name: my-repo
      description: GitHub repo managed by Terraform
      private: false
      vulnerabilityAlerts: true
  example:
    type: github:RepositoryDependabotSecurityUpdates
    properties:
      repository: ${test.name}
      enabled: true
Copy

Create RepositoryDependabotSecurityUpdates Resource

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

Constructor syntax

new RepositoryDependabotSecurityUpdates(name: string, args: RepositoryDependabotSecurityUpdatesArgs, opts?: CustomResourceOptions);
@overload
def RepositoryDependabotSecurityUpdates(resource_name: str,
                                        args: RepositoryDependabotSecurityUpdatesArgs,
                                        opts: Optional[ResourceOptions] = None)

@overload
def RepositoryDependabotSecurityUpdates(resource_name: str,
                                        opts: Optional[ResourceOptions] = None,
                                        enabled: Optional[bool] = None,
                                        repository: Optional[str] = None)
func NewRepositoryDependabotSecurityUpdates(ctx *Context, name string, args RepositoryDependabotSecurityUpdatesArgs, opts ...ResourceOption) (*RepositoryDependabotSecurityUpdates, error)
public RepositoryDependabotSecurityUpdates(string name, RepositoryDependabotSecurityUpdatesArgs args, CustomResourceOptions? opts = null)
public RepositoryDependabotSecurityUpdates(String name, RepositoryDependabotSecurityUpdatesArgs args)
public RepositoryDependabotSecurityUpdates(String name, RepositoryDependabotSecurityUpdatesArgs args, CustomResourceOptions options)
type: github:RepositoryDependabotSecurityUpdates
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. RepositoryDependabotSecurityUpdatesArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. RepositoryDependabotSecurityUpdatesArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. RepositoryDependabotSecurityUpdatesArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. RepositoryDependabotSecurityUpdatesArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. RepositoryDependabotSecurityUpdatesArgs
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 repositoryDependabotSecurityUpdatesResource = new Github.RepositoryDependabotSecurityUpdates("repositoryDependabotSecurityUpdatesResource", new()
{
    Enabled = false,
    Repository = "string",
});
Copy
example, err := github.NewRepositoryDependabotSecurityUpdates(ctx, "repositoryDependabotSecurityUpdatesResource", &github.RepositoryDependabotSecurityUpdatesArgs{
	Enabled:    pulumi.Bool(false),
	Repository: pulumi.String("string"),
})
Copy
var repositoryDependabotSecurityUpdatesResource = new RepositoryDependabotSecurityUpdates("repositoryDependabotSecurityUpdatesResource", RepositoryDependabotSecurityUpdatesArgs.builder()
    .enabled(false)
    .repository("string")
    .build());
Copy
repository_dependabot_security_updates_resource = github.RepositoryDependabotSecurityUpdates("repositoryDependabotSecurityUpdatesResource",
    enabled=False,
    repository="string")
Copy
const repositoryDependabotSecurityUpdatesResource = new github.RepositoryDependabotSecurityUpdates("repositoryDependabotSecurityUpdatesResource", {
    enabled: false,
    repository: "string",
});
Copy
type: github:RepositoryDependabotSecurityUpdates
properties:
    enabled: false
    repository: string
Copy

RepositoryDependabotSecurityUpdates 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 RepositoryDependabotSecurityUpdates resource accepts the following input properties:

Enabled This property is required. bool
The state of the automated security fixes.
Repository
This property is required.
Changes to this property will trigger replacement.
string
The name of the GitHub repository.
Enabled This property is required. bool
The state of the automated security fixes.
Repository
This property is required.
Changes to this property will trigger replacement.
string
The name of the GitHub repository.
enabled This property is required. Boolean
The state of the automated security fixes.
repository
This property is required.
Changes to this property will trigger replacement.
String
The name of the GitHub repository.
enabled This property is required. boolean
The state of the automated security fixes.
repository
This property is required.
Changes to this property will trigger replacement.
string
The name of the GitHub repository.
enabled This property is required. bool
The state of the automated security fixes.
repository
This property is required.
Changes to this property will trigger replacement.
str
The name of the GitHub repository.
enabled This property is required. Boolean
The state of the automated security fixes.
repository
This property is required.
Changes to this property will trigger replacement.
String
The name of the GitHub repository.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing RepositoryDependabotSecurityUpdates Resource

Get an existing RepositoryDependabotSecurityUpdates 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?: RepositoryDependabotSecurityUpdatesState, opts?: CustomResourceOptions): RepositoryDependabotSecurityUpdates
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        enabled: Optional[bool] = None,
        repository: Optional[str] = None) -> RepositoryDependabotSecurityUpdates
func GetRepositoryDependabotSecurityUpdates(ctx *Context, name string, id IDInput, state *RepositoryDependabotSecurityUpdatesState, opts ...ResourceOption) (*RepositoryDependabotSecurityUpdates, error)
public static RepositoryDependabotSecurityUpdates Get(string name, Input<string> id, RepositoryDependabotSecurityUpdatesState? state, CustomResourceOptions? opts = null)
public static RepositoryDependabotSecurityUpdates get(String name, Output<String> id, RepositoryDependabotSecurityUpdatesState state, CustomResourceOptions options)
resources:  _:    type: github:RepositoryDependabotSecurityUpdates    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Enabled bool
The state of the automated security fixes.
Repository Changes to this property will trigger replacement. string
The name of the GitHub repository.
Enabled bool
The state of the automated security fixes.
Repository Changes to this property will trigger replacement. string
The name of the GitHub repository.
enabled Boolean
The state of the automated security fixes.
repository Changes to this property will trigger replacement. String
The name of the GitHub repository.
enabled boolean
The state of the automated security fixes.
repository Changes to this property will trigger replacement. string
The name of the GitHub repository.
enabled bool
The state of the automated security fixes.
repository Changes to this property will trigger replacement. str
The name of the GitHub repository.
enabled Boolean
The state of the automated security fixes.
repository Changes to this property will trigger replacement. String
The name of the GitHub repository.

Import

Import by name

$ pulumi import github:index/repositoryDependabotSecurityUpdates:RepositoryDependabotSecurityUpdates example my-repo
Copy

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 github Terraform Provider.