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

github.ActionsRepositoryOidcSubjectClaimCustomizationTemplate

Explore with Pulumi AI

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

    This resource allows you to create and manage an OpenID Connect subject claim customization template for a GitHub repository.

    More information on integrating GitHub with cloud providers using OpenID Connect and a list of available claims is available in the Actions documentation.

    The following table lists the behaviour of use_default:

    use_defaultinclude_claim_keysTemplate used
    trueUnsetGitHub’s default
    falseSetinclude_claim_keys
    falseUnsetOrganization’s default if set, otherwise GitHub’s default

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as github from "@pulumi/github";
    
    const example = new github.Repository("example", {name: "example-repository"});
    const exampleTemplate = new github.ActionsRepositoryOidcSubjectClaimCustomizationTemplate("example_template", {
        repository: example.name,
        useDefault: false,
        includeClaimKeys: [
            "actor",
            "context",
            "repository_owner",
        ],
    });
    
    import pulumi
    import pulumi_github as github
    
    example = github.Repository("example", name="example-repository")
    example_template = github.ActionsRepositoryOidcSubjectClaimCustomizationTemplate("example_template",
        repository=example.name,
        use_default=False,
        include_claim_keys=[
            "actor",
            "context",
            "repository_owner",
        ])
    
    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("example-repository"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = github.NewActionsRepositoryOidcSubjectClaimCustomizationTemplate(ctx, "example_template", &github.ActionsRepositoryOidcSubjectClaimCustomizationTemplateArgs{
    			Repository: example.Name,
    			UseDefault: pulumi.Bool(false),
    			IncludeClaimKeys: pulumi.StringArray{
    				pulumi.String("actor"),
    				pulumi.String("context"),
    				pulumi.String("repository_owner"),
    			},
    		})
    		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.Repository("example", new()
        {
            Name = "example-repository",
        });
    
        var exampleTemplate = new Github.ActionsRepositoryOidcSubjectClaimCustomizationTemplate("example_template", new()
        {
            Repository = example.Name,
            UseDefault = false,
            IncludeClaimKeys = new[]
            {
                "actor",
                "context",
                "repository_owner",
            },
        });
    
    });
    
    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.ActionsRepositoryOidcSubjectClaimCustomizationTemplate;
    import com.pulumi.github.ActionsRepositoryOidcSubjectClaimCustomizationTemplateArgs;
    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("example-repository")
                .build());
    
            var exampleTemplate = new ActionsRepositoryOidcSubjectClaimCustomizationTemplate("exampleTemplate", ActionsRepositoryOidcSubjectClaimCustomizationTemplateArgs.builder()
                .repository(example.name())
                .useDefault(false)
                .includeClaimKeys(            
                    "actor",
                    "context",
                    "repository_owner")
                .build());
    
        }
    }
    
    resources:
      example:
        type: github:Repository
        properties:
          name: example-repository
      exampleTemplate:
        type: github:ActionsRepositoryOidcSubjectClaimCustomizationTemplate
        name: example_template
        properties:
          repository: ${example.name}
          useDefault: false
          includeClaimKeys:
            - actor
            - context
            - repository_owner
    

    Create ActionsRepositoryOidcSubjectClaimCustomizationTemplate Resource

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

    Constructor syntax

    new ActionsRepositoryOidcSubjectClaimCustomizationTemplate(name: string, args: ActionsRepositoryOidcSubjectClaimCustomizationTemplateArgs, opts?: CustomResourceOptions);
    @overload
    def ActionsRepositoryOidcSubjectClaimCustomizationTemplate(resource_name: str,
                                                               args: ActionsRepositoryOidcSubjectClaimCustomizationTemplateArgs,
                                                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def ActionsRepositoryOidcSubjectClaimCustomizationTemplate(resource_name: str,
                                                               opts: Optional[ResourceOptions] = None,
                                                               repository: Optional[str] = None,
                                                               use_default: Optional[bool] = None,
                                                               include_claim_keys: Optional[Sequence[str]] = None)
    func NewActionsRepositoryOidcSubjectClaimCustomizationTemplate(ctx *Context, name string, args ActionsRepositoryOidcSubjectClaimCustomizationTemplateArgs, opts ...ResourceOption) (*ActionsRepositoryOidcSubjectClaimCustomizationTemplate, error)
    public ActionsRepositoryOidcSubjectClaimCustomizationTemplate(string name, ActionsRepositoryOidcSubjectClaimCustomizationTemplateArgs args, CustomResourceOptions? opts = null)
    public ActionsRepositoryOidcSubjectClaimCustomizationTemplate(String name, ActionsRepositoryOidcSubjectClaimCustomizationTemplateArgs args)
    public ActionsRepositoryOidcSubjectClaimCustomizationTemplate(String name, ActionsRepositoryOidcSubjectClaimCustomizationTemplateArgs args, CustomResourceOptions options)
    
    type: github:ActionsRepositoryOidcSubjectClaimCustomizationTemplate
    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 ActionsRepositoryOidcSubjectClaimCustomizationTemplateArgs
    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 ActionsRepositoryOidcSubjectClaimCustomizationTemplateArgs
    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 ActionsRepositoryOidcSubjectClaimCustomizationTemplateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ActionsRepositoryOidcSubjectClaimCustomizationTemplateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ActionsRepositoryOidcSubjectClaimCustomizationTemplateArgs
    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 actionsRepositoryOidcSubjectClaimCustomizationTemplateResource = new Github.ActionsRepositoryOidcSubjectClaimCustomizationTemplate("actionsRepositoryOidcSubjectClaimCustomizationTemplateResource", new()
    {
        Repository = "string",
        UseDefault = false,
        IncludeClaimKeys = new[]
        {
            "string",
        },
    });
    
    example, err := github.NewActionsRepositoryOidcSubjectClaimCustomizationTemplate(ctx, "actionsRepositoryOidcSubjectClaimCustomizationTemplateResource", &github.ActionsRepositoryOidcSubjectClaimCustomizationTemplateArgs{
    	Repository: pulumi.String("string"),
    	UseDefault: pulumi.Bool(false),
    	IncludeClaimKeys: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var actionsRepositoryOidcSubjectClaimCustomizationTemplateResource = new ActionsRepositoryOidcSubjectClaimCustomizationTemplate("actionsRepositoryOidcSubjectClaimCustomizationTemplateResource", ActionsRepositoryOidcSubjectClaimCustomizationTemplateArgs.builder()
        .repository("string")
        .useDefault(false)
        .includeClaimKeys("string")
        .build());
    
    actions_repository_oidc_subject_claim_customization_template_resource = github.ActionsRepositoryOidcSubjectClaimCustomizationTemplate("actionsRepositoryOidcSubjectClaimCustomizationTemplateResource",
        repository="string",
        use_default=False,
        include_claim_keys=["string"])
    
    const actionsRepositoryOidcSubjectClaimCustomizationTemplateResource = new github.ActionsRepositoryOidcSubjectClaimCustomizationTemplate("actionsRepositoryOidcSubjectClaimCustomizationTemplateResource", {
        repository: "string",
        useDefault: false,
        includeClaimKeys: ["string"],
    });
    
    type: github:ActionsRepositoryOidcSubjectClaimCustomizationTemplate
    properties:
        includeClaimKeys:
            - string
        repository: string
        useDefault: false
    

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

    Repository string
    The name of the repository.
    UseDefault bool
    Whether to use the default template or not. If true, include_claim_keys must not be set.
    IncludeClaimKeys List<string>
    A list of OpenID Connect claims.
    Repository string
    The name of the repository.
    UseDefault bool
    Whether to use the default template or not. If true, include_claim_keys must not be set.
    IncludeClaimKeys []string
    A list of OpenID Connect claims.
    repository String
    The name of the repository.
    useDefault Boolean
    Whether to use the default template or not. If true, include_claim_keys must not be set.
    includeClaimKeys List<String>
    A list of OpenID Connect claims.
    repository string
    The name of the repository.
    useDefault boolean
    Whether to use the default template or not. If true, include_claim_keys must not be set.
    includeClaimKeys string[]
    A list of OpenID Connect claims.
    repository str
    The name of the repository.
    use_default bool
    Whether to use the default template or not. If true, include_claim_keys must not be set.
    include_claim_keys Sequence[str]
    A list of OpenID Connect claims.
    repository String
    The name of the repository.
    useDefault Boolean
    Whether to use the default template or not. If true, include_claim_keys must not be set.
    includeClaimKeys List<String>
    A list of OpenID Connect claims.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ActionsRepositoryOidcSubjectClaimCustomizationTemplate 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 ActionsRepositoryOidcSubjectClaimCustomizationTemplate Resource

    Get an existing ActionsRepositoryOidcSubjectClaimCustomizationTemplate 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?: ActionsRepositoryOidcSubjectClaimCustomizationTemplateState, opts?: CustomResourceOptions): ActionsRepositoryOidcSubjectClaimCustomizationTemplate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            include_claim_keys: Optional[Sequence[str]] = None,
            repository: Optional[str] = None,
            use_default: Optional[bool] = None) -> ActionsRepositoryOidcSubjectClaimCustomizationTemplate
    func GetActionsRepositoryOidcSubjectClaimCustomizationTemplate(ctx *Context, name string, id IDInput, state *ActionsRepositoryOidcSubjectClaimCustomizationTemplateState, opts ...ResourceOption) (*ActionsRepositoryOidcSubjectClaimCustomizationTemplate, error)
    public static ActionsRepositoryOidcSubjectClaimCustomizationTemplate Get(string name, Input<string> id, ActionsRepositoryOidcSubjectClaimCustomizationTemplateState? state, CustomResourceOptions? opts = null)
    public static ActionsRepositoryOidcSubjectClaimCustomizationTemplate get(String name, Output<String> id, ActionsRepositoryOidcSubjectClaimCustomizationTemplateState 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:
    IncludeClaimKeys List<string>
    A list of OpenID Connect claims.
    Repository string
    The name of the repository.
    UseDefault bool
    Whether to use the default template or not. If true, include_claim_keys must not be set.
    IncludeClaimKeys []string
    A list of OpenID Connect claims.
    Repository string
    The name of the repository.
    UseDefault bool
    Whether to use the default template or not. If true, include_claim_keys must not be set.
    includeClaimKeys List<String>
    A list of OpenID Connect claims.
    repository String
    The name of the repository.
    useDefault Boolean
    Whether to use the default template or not. If true, include_claim_keys must not be set.
    includeClaimKeys string[]
    A list of OpenID Connect claims.
    repository string
    The name of the repository.
    useDefault boolean
    Whether to use the default template or not. If true, include_claim_keys must not be set.
    include_claim_keys Sequence[str]
    A list of OpenID Connect claims.
    repository str
    The name of the repository.
    use_default bool
    Whether to use the default template or not. If true, include_claim_keys must not be set.
    includeClaimKeys List<String>
    A list of OpenID Connect claims.
    repository String
    The name of the repository.
    useDefault Boolean
    Whether to use the default template or not. If true, include_claim_keys must not be set.

    Import

    This resource can be imported using the repository’s name.

    $ pulumi import github:index/actionsRepositoryOidcSubjectClaimCustomizationTemplate:ActionsRepositoryOidcSubjectClaimCustomizationTemplate test example_repository
    

    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