1. Packages
  2. GitHub
  3. API Docs
  4. ActionsVariable
GitHub v5.19.0 published on Friday, Sep 22, 2023 by Pulumi

github.ActionsVariable

Explore with Pulumi AI

github logo
GitHub v5.19.0 published on Friday, Sep 22, 2023 by Pulumi

    This resource allows you to create and manage GitHub Actions variables within your GitHub repositories. You must have write access to a repository to use this resource.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Github = Pulumi.Github;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleVariable = new Github.ActionsVariable("exampleVariable", new()
        {
            Repository = "example_repository",
            Value = "example_variable_value",
            VariableName = "example_variable_name",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-github/sdk/v5/go/github"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := github.NewActionsVariable(ctx, "exampleVariable", &github.ActionsVariableArgs{
    			Repository:   pulumi.String("example_repository"),
    			Value:        pulumi.String("example_variable_value"),
    			VariableName: pulumi.String("example_variable_name"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.github.ActionsVariable;
    import com.pulumi.github.ActionsVariableArgs;
    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 exampleVariable = new ActionsVariable("exampleVariable", ActionsVariableArgs.builder()        
                .repository("example_repository")
                .value("example_variable_value")
                .variableName("example_variable_name")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_github as github
    
    example_variable = github.ActionsVariable("exampleVariable",
        repository="example_repository",
        value="example_variable_value",
        variable_name="example_variable_name")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    const exampleVariable = new github.ActionsVariable("exampleVariable", {
        repository: "example_repository",
        value: "example_variable_value",
        variableName: "example_variable_name",
    });
    
    resources:
      exampleVariable:
        type: github:ActionsVariable
        properties:
          repository: example_repository
          value: example_variable_value
          variableName: example_variable_name
    

    Create ActionsVariable Resource

    new ActionsVariable(name: string, args: ActionsVariableArgs, opts?: CustomResourceOptions);
    @overload
    def ActionsVariable(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        repository: Optional[str] = None,
                        value: Optional[str] = None,
                        variable_name: Optional[str] = None)
    @overload
    def ActionsVariable(resource_name: str,
                        args: ActionsVariableArgs,
                        opts: Optional[ResourceOptions] = None)
    func NewActionsVariable(ctx *Context, name string, args ActionsVariableArgs, opts ...ResourceOption) (*ActionsVariable, error)
    public ActionsVariable(string name, ActionsVariableArgs args, CustomResourceOptions? opts = null)
    public ActionsVariable(String name, ActionsVariableArgs args)
    public ActionsVariable(String name, ActionsVariableArgs args, CustomResourceOptions options)
    
    type: github:ActionsVariable
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ActionsVariableArgs
    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 ActionsVariableArgs
    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 ActionsVariableArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ActionsVariableArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ActionsVariableArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ActionsVariable Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ActionsVariable resource accepts the following input properties:

    Repository string

    Name of the repository

    Value string

    Value of the variable

    VariableName string

    Name of the variable

    Repository string

    Name of the repository

    Value string

    Value of the variable

    VariableName string

    Name of the variable

    repository String

    Name of the repository

    value String

    Value of the variable

    variableName String

    Name of the variable

    repository string

    Name of the repository

    value string

    Value of the variable

    variableName string

    Name of the variable

    repository str

    Name of the repository

    value str

    Value of the variable

    variable_name str

    Name of the variable

    repository String

    Name of the repository

    value String

    Value of the variable

    variableName String

    Name of the variable

    Outputs

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

    CreatedAt string

    Date of actions_variable creation.

    Id string

    The provider-assigned unique ID for this managed resource.

    UpdatedAt string

    Date of actions_variable update.

    CreatedAt string

    Date of actions_variable creation.

    Id string

    The provider-assigned unique ID for this managed resource.

    UpdatedAt string

    Date of actions_variable update.

    createdAt String

    Date of actions_variable creation.

    id String

    The provider-assigned unique ID for this managed resource.

    updatedAt String

    Date of actions_variable update.

    createdAt string

    Date of actions_variable creation.

    id string

    The provider-assigned unique ID for this managed resource.

    updatedAt string

    Date of actions_variable update.

    created_at str

    Date of actions_variable creation.

    id str

    The provider-assigned unique ID for this managed resource.

    updated_at str

    Date of actions_variable update.

    createdAt String

    Date of actions_variable creation.

    id String

    The provider-assigned unique ID for this managed resource.

    updatedAt String

    Date of actions_variable update.

    Look up Existing ActionsVariable Resource

    Get an existing ActionsVariable 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?: ActionsVariableState, opts?: CustomResourceOptions): ActionsVariable
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            repository: Optional[str] = None,
            updated_at: Optional[str] = None,
            value: Optional[str] = None,
            variable_name: Optional[str] = None) -> ActionsVariable
    func GetActionsVariable(ctx *Context, name string, id IDInput, state *ActionsVariableState, opts ...ResourceOption) (*ActionsVariable, error)
    public static ActionsVariable Get(string name, Input<string> id, ActionsVariableState? state, CustomResourceOptions? opts = null)
    public static ActionsVariable get(String name, Output<String> id, ActionsVariableState 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:
    CreatedAt string

    Date of actions_variable creation.

    Repository string

    Name of the repository

    UpdatedAt string

    Date of actions_variable update.

    Value string

    Value of the variable

    VariableName string

    Name of the variable

    CreatedAt string

    Date of actions_variable creation.

    Repository string

    Name of the repository

    UpdatedAt string

    Date of actions_variable update.

    Value string

    Value of the variable

    VariableName string

    Name of the variable

    createdAt String

    Date of actions_variable creation.

    repository String

    Name of the repository

    updatedAt String

    Date of actions_variable update.

    value String

    Value of the variable

    variableName String

    Name of the variable

    createdAt string

    Date of actions_variable creation.

    repository string

    Name of the repository

    updatedAt string

    Date of actions_variable update.

    value string

    Value of the variable

    variableName string

    Name of the variable

    created_at str

    Date of actions_variable creation.

    repository str

    Name of the repository

    updated_at str

    Date of actions_variable update.

    value str

    Value of the variable

    variable_name str

    Name of the variable

    createdAt String

    Date of actions_variable creation.

    repository String

    Name of the repository

    updatedAt String

    Date of actions_variable update.

    value String

    Value of the variable

    variableName String

    Name of the variable

    Import

    GitHub Actions variables can be imported using an ID made up of repository:variable_name, e.g.

     $ pulumi import github:index/actionsVariable:ActionsVariable myvariable myrepo:myvariable
    

    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 v5.19.0 published on Friday, Sep 22, 2023 by Pulumi