GitLab v6.0.0, Jun 1 23
GitLab v6.0.0, Jun 1 23
gitlab.Application
Explore with Pulumi AI
The gitlab.Application
resource allows to manage the lifecycle of applications in gitlab.
In order to use a user for a user to create an application, they must have admin privileges at the instance level. To create an OIDC application, a scope of “openid”.
Upstream API: GitLab REST API docs
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var oidc = new GitLab.Application("oidc", new()
{
Confidential = true,
RedirectUrl = "https://mycompany.com",
Scopes = new[]
{
"openid",
},
});
});
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gitlab.NewApplication(ctx, "oidc", &gitlab.ApplicationArgs{
Confidential: pulumi.Bool(true),
RedirectUrl: pulumi.String("https://mycompany.com"),
Scopes: pulumi.StringArray{
pulumi.String("openid"),
},
})
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.gitlab.Application;
import com.pulumi.gitlab.ApplicationArgs;
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 oidc = new Application("oidc", ApplicationArgs.builder()
.confidential(true)
.redirectUrl("https://mycompany.com")
.scopes("openid")
.build());
}
}
import pulumi
import pulumi_gitlab as gitlab
oidc = gitlab.Application("oidc",
confidential=True,
redirect_url="https://mycompany.com",
scopes=["openid"])
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const oidc = new gitlab.Application("oidc", {
confidential: true,
redirectUrl: "https://mycompany.com",
scopes: ["openid"],
});
resources:
oidc:
type: gitlab:Application
properties:
confidential: true
redirectUrl: https://mycompany.com
scopes:
- openid
Create Application Resource
new Application(name: string, args: ApplicationArgs, opts?: CustomResourceOptions);
@overload
def Application(resource_name: str,
opts: Optional[ResourceOptions] = None,
confidential: Optional[bool] = None,
name: Optional[str] = None,
redirect_url: Optional[str] = None,
scopes: Optional[Sequence[str]] = None)
@overload
def Application(resource_name: str,
args: ApplicationArgs,
opts: Optional[ResourceOptions] = None)
func NewApplication(ctx *Context, name string, args ApplicationArgs, opts ...ResourceOption) (*Application, error)
public Application(string name, ApplicationArgs args, CustomResourceOptions? opts = null)
public Application(String name, ApplicationArgs args)
public Application(String name, ApplicationArgs args, CustomResourceOptions options)
type: gitlab:Application
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApplicationArgs
- 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 ApplicationArgs
- 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 ApplicationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApplicationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApplicationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Application 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 Application resource accepts the following input properties:
- Redirect
Url string The URL gitlab should send the user to after authentication.
- Scopes List<string>
Scopes of the application. Use "openid" if you plan to use this as an oidc authentication application. Valid options are:
api
,read_api
,read_user
,read_repository
,write_repository
,read_registry
,write_registry
,sudo
,admin_mode
,openid
,profile
,email
. This is only populated when creating a new application. This attribute is not available for imported resources- Confidential bool
The application is used where the client secret can be kept confidential. Native mobile apps and Single Page Apps are considered non-confidential. Defaults to true if not supplied
- Name string
Name of the application.
- Redirect
Url string The URL gitlab should send the user to after authentication.
- Scopes []string
Scopes of the application. Use "openid" if you plan to use this as an oidc authentication application. Valid options are:
api
,read_api
,read_user
,read_repository
,write_repository
,read_registry
,write_registry
,sudo
,admin_mode
,openid
,profile
,email
. This is only populated when creating a new application. This attribute is not available for imported resources- Confidential bool
The application is used where the client secret can be kept confidential. Native mobile apps and Single Page Apps are considered non-confidential. Defaults to true if not supplied
- Name string
Name of the application.
- redirect
Url String The URL gitlab should send the user to after authentication.
- scopes List<String>
Scopes of the application. Use "openid" if you plan to use this as an oidc authentication application. Valid options are:
api
,read_api
,read_user
,read_repository
,write_repository
,read_registry
,write_registry
,sudo
,admin_mode
,openid
,profile
,email
. This is only populated when creating a new application. This attribute is not available for imported resources- confidential Boolean
The application is used where the client secret can be kept confidential. Native mobile apps and Single Page Apps are considered non-confidential. Defaults to true if not supplied
- name String
Name of the application.
- redirect
Url string The URL gitlab should send the user to after authentication.
- scopes string[]
Scopes of the application. Use "openid" if you plan to use this as an oidc authentication application. Valid options are:
api
,read_api
,read_user
,read_repository
,write_repository
,read_registry
,write_registry
,sudo
,admin_mode
,openid
,profile
,email
. This is only populated when creating a new application. This attribute is not available for imported resources- confidential boolean
The application is used where the client secret can be kept confidential. Native mobile apps and Single Page Apps are considered non-confidential. Defaults to true if not supplied
- name string
Name of the application.
- redirect_
url str The URL gitlab should send the user to after authentication.
- scopes Sequence[str]
Scopes of the application. Use "openid" if you plan to use this as an oidc authentication application. Valid options are:
api
,read_api
,read_user
,read_repository
,write_repository
,read_registry
,write_registry
,sudo
,admin_mode
,openid
,profile
,email
. This is only populated when creating a new application. This attribute is not available for imported resources- confidential bool
The application is used where the client secret can be kept confidential. Native mobile apps and Single Page Apps are considered non-confidential. Defaults to true if not supplied
- name str
Name of the application.
- redirect
Url String The URL gitlab should send the user to after authentication.
- scopes List<String>
Scopes of the application. Use "openid" if you plan to use this as an oidc authentication application. Valid options are:
api
,read_api
,read_user
,read_repository
,write_repository
,read_registry
,write_registry
,sudo
,admin_mode
,openid
,profile
,email
. This is only populated when creating a new application. This attribute is not available for imported resources- confidential Boolean
The application is used where the client secret can be kept confidential. Native mobile apps and Single Page Apps are considered non-confidential. Defaults to true if not supplied
- name String
Name of the application.
Outputs
All input properties are implicitly available as output properties. Additionally, the Application resource produces the following output properties:
- Application
Id string Internal name of the application.
- Id string
The provider-assigned unique ID for this managed resource.
- Secret string
Application secret. Sensitive and must be kept secret. This is only populated when creating a new application. This attribute is not available for imported resources.
- Application
Id string Internal name of the application.
- Id string
The provider-assigned unique ID for this managed resource.
- Secret string
Application secret. Sensitive and must be kept secret. This is only populated when creating a new application. This attribute is not available for imported resources.
- application
Id String Internal name of the application.
- id String
The provider-assigned unique ID for this managed resource.
- secret String
Application secret. Sensitive and must be kept secret. This is only populated when creating a new application. This attribute is not available for imported resources.
- application
Id string Internal name of the application.
- id string
The provider-assigned unique ID for this managed resource.
- secret string
Application secret. Sensitive and must be kept secret. This is only populated when creating a new application. This attribute is not available for imported resources.
- application_
id str Internal name of the application.
- id str
The provider-assigned unique ID for this managed resource.
- secret str
Application secret. Sensitive and must be kept secret. This is only populated when creating a new application. This attribute is not available for imported resources.
- application
Id String Internal name of the application.
- id String
The provider-assigned unique ID for this managed resource.
- secret String
Application secret. Sensitive and must be kept secret. This is only populated when creating a new application. This attribute is not available for imported resources.
Look up Existing Application Resource
Get an existing Application 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?: ApplicationState, opts?: CustomResourceOptions): Application
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
application_id: Optional[str] = None,
confidential: Optional[bool] = None,
name: Optional[str] = None,
redirect_url: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
secret: Optional[str] = None) -> Application
func GetApplication(ctx *Context, name string, id IDInput, state *ApplicationState, opts ...ResourceOption) (*Application, error)
public static Application Get(string name, Input<string> id, ApplicationState? state, CustomResourceOptions? opts = null)
public static Application get(String name, Output<String> id, ApplicationState 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.
- Application
Id string Internal name of the application.
- Confidential bool
The application is used where the client secret can be kept confidential. Native mobile apps and Single Page Apps are considered non-confidential. Defaults to true if not supplied
- Name string
Name of the application.
- Redirect
Url string The URL gitlab should send the user to after authentication.
- Scopes List<string>
Scopes of the application. Use "openid" if you plan to use this as an oidc authentication application. Valid options are:
api
,read_api
,read_user
,read_repository
,write_repository
,read_registry
,write_registry
,sudo
,admin_mode
,openid
,profile
,email
. This is only populated when creating a new application. This attribute is not available for imported resources- Secret string
Application secret. Sensitive and must be kept secret. This is only populated when creating a new application. This attribute is not available for imported resources.
- Application
Id string Internal name of the application.
- Confidential bool
The application is used where the client secret can be kept confidential. Native mobile apps and Single Page Apps are considered non-confidential. Defaults to true if not supplied
- Name string
Name of the application.
- Redirect
Url string The URL gitlab should send the user to after authentication.
- Scopes []string
Scopes of the application. Use "openid" if you plan to use this as an oidc authentication application. Valid options are:
api
,read_api
,read_user
,read_repository
,write_repository
,read_registry
,write_registry
,sudo
,admin_mode
,openid
,profile
,email
. This is only populated when creating a new application. This attribute is not available for imported resources- Secret string
Application secret. Sensitive and must be kept secret. This is only populated when creating a new application. This attribute is not available for imported resources.
- application
Id String Internal name of the application.
- confidential Boolean
The application is used where the client secret can be kept confidential. Native mobile apps and Single Page Apps are considered non-confidential. Defaults to true if not supplied
- name String
Name of the application.
- redirect
Url String The URL gitlab should send the user to after authentication.
- scopes List<String>
Scopes of the application. Use "openid" if you plan to use this as an oidc authentication application. Valid options are:
api
,read_api
,read_user
,read_repository
,write_repository
,read_registry
,write_registry
,sudo
,admin_mode
,openid
,profile
,email
. This is only populated when creating a new application. This attribute is not available for imported resources- secret String
Application secret. Sensitive and must be kept secret. This is only populated when creating a new application. This attribute is not available for imported resources.
- application
Id string Internal name of the application.
- confidential boolean
The application is used where the client secret can be kept confidential. Native mobile apps and Single Page Apps are considered non-confidential. Defaults to true if not supplied
- name string
Name of the application.
- redirect
Url string The URL gitlab should send the user to after authentication.
- scopes string[]
Scopes of the application. Use "openid" if you plan to use this as an oidc authentication application. Valid options are:
api
,read_api
,read_user
,read_repository
,write_repository
,read_registry
,write_registry
,sudo
,admin_mode
,openid
,profile
,email
. This is only populated when creating a new application. This attribute is not available for imported resources- secret string
Application secret. Sensitive and must be kept secret. This is only populated when creating a new application. This attribute is not available for imported resources.
- application_
id str Internal name of the application.
- confidential bool
The application is used where the client secret can be kept confidential. Native mobile apps and Single Page Apps are considered non-confidential. Defaults to true if not supplied
- name str
Name of the application.
- redirect_
url str The URL gitlab should send the user to after authentication.
- scopes Sequence[str]
Scopes of the application. Use "openid" if you plan to use this as an oidc authentication application. Valid options are:
api
,read_api
,read_user
,read_repository
,write_repository
,read_registry
,write_registry
,sudo
,admin_mode
,openid
,profile
,email
. This is only populated when creating a new application. This attribute is not available for imported resources- secret str
Application secret. Sensitive and must be kept secret. This is only populated when creating a new application. This attribute is not available for imported resources.
- application
Id String Internal name of the application.
- confidential Boolean
The application is used where the client secret can be kept confidential. Native mobile apps and Single Page Apps are considered non-confidential. Defaults to true if not supplied
- name String
Name of the application.
- redirect
Url String The URL gitlab should send the user to after authentication.
- scopes List<String>
Scopes of the application. Use "openid" if you plan to use this as an oidc authentication application. Valid options are:
api
,read_api
,read_user
,read_repository
,write_repository
,read_registry
,write_registry
,sudo
,admin_mode
,openid
,profile
,email
. This is only populated when creating a new application. This attribute is not available for imported resources- secret String
Application secret. Sensitive and must be kept secret. This is only populated when creating a new application. This attribute is not available for imported resources.
Import
Gitlab applications can be imported with their id, e.g.
$ pulumi import gitlab:index/application:Application example "1"
NOTEthe secret and scopes cannot be imported
Package Details
- Repository
- GitLab pulumi/pulumi-gitlab
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
gitlab
Terraform Provider.