1. Packages
  2. GitHub
  3. API Docs
  4. ActionsRepositoryOidcSubjectClaimCustomizationTemplate
GitHub v5.22.0 published on Tuesday, Oct 31, 2023 by Pulumi

github.ActionsRepositoryOidcSubjectClaimCustomizationTemplate

Explore with Pulumi AI

github logo
GitHub v5.22.0 published on Tuesday, Oct 31, 2023 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

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

    Create ActionsRepositoryOidcSubjectClaimCustomizationTemplate Resource

    new ActionsRepositoryOidcSubjectClaimCustomizationTemplate(name: string, args: ActionsRepositoryOidcSubjectClaimCustomizationTemplateArgs, opts?: CustomResourceOptions);
    @overload
    def ActionsRepositoryOidcSubjectClaimCustomizationTemplate(resource_name: str,
                                                               opts: Optional[ResourceOptions] = None,
                                                               include_claim_keys: Optional[Sequence[str]] = None,
                                                               repository: Optional[str] = None,
                                                               use_default: Optional[bool] = None)
    @overload
    def ActionsRepositoryOidcSubjectClaimCustomizationTemplate(resource_name: str,
                                                               args: ActionsRepositoryOidcSubjectClaimCustomizationTemplateArgs,
                                                               opts: Optional[ResourceOptions] = 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.
    
    
    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.

    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
    

    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.22.0 published on Tuesday, Oct 31, 2023 by Pulumi