com.pulumi.gitlab.kotlin.ApplicationArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gitlab-kotlin Show documentation
Show all versions of pulumi-gitlab-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gitlab.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gitlab.ApplicationArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* 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](https://docs.gitlab.com/ee/api/applications.html)
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gitlab from "@pulumi/gitlab";
* const oidc = new gitlab.Application("oidc", {
* confidential: true,
* scopes: ["openid"],
* name: "company_oidc",
* redirectUrl: "https://mycompany.com",
* });
* ```
* ```python
* import pulumi
* import pulumi_gitlab as gitlab
* oidc = gitlab.Application("oidc",
* confidential=True,
* scopes=["openid"],
* name="company_oidc",
* redirect_url="https://mycompany.com")
* ```
* ```csharp
* 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,
* Scopes = new[]
* {
* "openid",
* },
* Name = "company_oidc",
* RedirectUrl = "https://mycompany.com",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-gitlab/sdk/v8/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),
* Scopes: pulumi.StringArray{
* pulumi.String("openid"),
* },
* Name: pulumi.String("company_oidc"),
* RedirectUrl: pulumi.String("https://mycompany.com"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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)
* .scopes("openid")
* .name("company_oidc")
* .redirectUrl("https://mycompany.com")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* oidc:
* type: gitlab:Application
* properties:
* confidential: true
* scopes:
* - openid
* name: company_oidc
* redirectUrl: https://mycompany.com
* ```
*
* ## Import
* Gitlab applications can be imported with their id, e.g.
* ```sh
* $ pulumi import gitlab:index/application:Application example "1"
* ```
* NOTE: the secret and scopes cannot be imported
* @property confidential 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
* @property name Name of the application.
* @property redirectUrl The URL gitlab should send the user to after authentication.
* @property scopes 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
*/
public data class ApplicationArgs(
public val confidential: Output? = null,
public val name: Output? = null,
public val redirectUrl: Output? = null,
public val scopes: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gitlab.ApplicationArgs =
com.pulumi.gitlab.ApplicationArgs.builder()
.confidential(confidential?.applyValue({ args0 -> args0 }))
.name(name?.applyValue({ args0 -> args0 }))
.redirectUrl(redirectUrl?.applyValue({ args0 -> args0 }))
.scopes(scopes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}
/**
* Builder for [ApplicationArgs].
*/
@PulumiTagMarker
public class ApplicationArgsBuilder internal constructor() {
private var confidential: Output? = null
private var name: Output? = null
private var redirectUrl: Output? = null
private var scopes: Output>? = null
/**
* @param value 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
*/
@JvmName("gtgmmwvxbrkrmuab")
public suspend fun confidential(`value`: Output) {
this.confidential = value
}
/**
* @param value Name of the application.
*/
@JvmName("kfypuirnxqxupjan")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The URL gitlab should send the user to after authentication.
*/
@JvmName("offwrdftuofpgifg")
public suspend fun redirectUrl(`value`: Output) {
this.redirectUrl = value
}
/**
* @param value 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
*/
@JvmName("rooovpvfpirwliqe")
public suspend fun scopes(`value`: Output>) {
this.scopes = value
}
@JvmName("xcjfqtrxakpoirau")
public suspend fun scopes(vararg values: Output) {
this.scopes = Output.all(values.asList())
}
/**
* @param values 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
*/
@JvmName("mnlekmqdqlnjfepc")
public suspend fun scopes(values: List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy