Application Args
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
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"],
});
import pulumi
import pulumi_gitlab as gitlab
oidc = gitlab.Application("oidc",
confidential=True,
redirect_url="https://mycompany.com",
scopes=["openid"])
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());
}
}
resources:
oidc:
type: gitlab:Application
properties:
confidential: true
redirectUrl: https://mycompany.com
scopes:
- openid
Import
Gitlab applications can be imported with their id, e.g.
$ pulumi import gitlab:index/application:Application example "1"
NOTE: the secret and scopes cannot be imported
Constructors
Properties
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
The URL gitlab should send the user to after authentication.
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