1. Packages
  2. Github Provider
  3. API Docs
  4. RepositoryDependabotSecurityUpdates
GitHub v6.3.2 published on Friday, Oct 11, 2024 by Pulumi

github.RepositoryDependabotSecurityUpdates

Explore with Pulumi AI

github logo
GitHub v6.3.2 published on Friday, Oct 11, 2024 by Pulumi

    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.id,
        enabled: true,
    });
    
    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["id"],
        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 {
    		_, 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.Id),
    			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 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.Id,
            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.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.id())
                .enabled(true)
                .build());
    
        }
    }
    
    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.id}
          enabled: true
    

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

    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 bool
    The state of the automated security fixes.
    Repository string
    The repository to manage.
    Enabled bool
    The state of the automated security fixes.
    Repository string
    The repository to manage.
    enabled Boolean
    The state of the automated security fixes.
    repository String
    The repository to manage.
    enabled boolean
    The state of the automated security fixes.
    repository string
    The repository to manage.
    enabled bool
    The state of the automated security fixes.
    repository str
    The repository to manage.
    enabled Boolean
    The state of the automated security fixes.
    repository String
    The repository to manage.

    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)
    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:
    Enabled bool
    The state of the automated security fixes.
    Repository string
    The repository to manage.
    Enabled bool
    The state of the automated security fixes.
    Repository string
    The repository to manage.
    enabled Boolean
    The state of the automated security fixes.
    repository String
    The repository to manage.
    enabled boolean
    The state of the automated security fixes.
    repository string
    The repository to manage.
    enabled bool
    The state of the automated security fixes.
    repository str
    The repository to manage.
    enabled Boolean
    The state of the automated security fixes.
    repository String
    The repository to manage.

    Import

    Import by name

    $ pulumi import github:index/repositoryDependabotSecurityUpdates:RepositoryDependabotSecurityUpdates 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 github Terraform Provider.
    github logo
    GitHub v6.3.2 published on Friday, Oct 11, 2024 by Pulumi