All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.gitlab.kotlin.ProjectComplianceFrameworksArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

The newest version!
@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.ProjectComplianceFrameworksArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The `gitlab.ProjectComplianceFrameworks` resource allows to manage the lifecycle of compliance frameworks on a project.
 * > This resource requires a GitLab Enterprise instance with a Premium license to set the compliance frameworks on a project.
 * **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#mutationprojectupdatecomplianceframeworks)
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gitlab from "@pulumi/gitlab";
 * const alpha = new gitlab.ComplianceFramework("alpha", {
 *     namespacePath: "top-level-group",
 *     name: "HIPAA",
 *     description: "A HIPAA Compliance Framework",
 *     color: "#87BEEF",
 *     "default": false,
 * });
 * const beta = new gitlab.ComplianceFramework("beta", {
 *     namespacePath: "top-level-group",
 *     name: "SOC",
 *     description: "A SOC Compliance Framework",
 *     color: "#223344",
 *     "default": false,
 * });
 * const sample = new gitlab.ProjectComplianceFrameworks("sample", {
 *     complianceFrameworkIds: [
 *         alpha.frameworkId,
 *         beta.frameworkId,
 *     ],
 *     project: "12345678",
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gitlab as gitlab
 * alpha = gitlab.ComplianceFramework("alpha",
 *     namespace_path="top-level-group",
 *     name="HIPAA",
 *     description="A HIPAA Compliance Framework",
 *     color="#87BEEF",
 *     default=False)
 * beta = gitlab.ComplianceFramework("beta",
 *     namespace_path="top-level-group",
 *     name="SOC",
 *     description="A SOC Compliance Framework",
 *     color="#223344",
 *     default=False)
 * sample = gitlab.ProjectComplianceFrameworks("sample",
 *     compliance_framework_ids=[
 *         alpha.framework_id,
 *         beta.framework_id,
 *     ],
 *     project="12345678")
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using GitLab = Pulumi.GitLab;
 * return await Deployment.RunAsync(() =>
 * {
 *     var alpha = new GitLab.ComplianceFramework("alpha", new()
 *     {
 *         NamespacePath = "top-level-group",
 *         Name = "HIPAA",
 *         Description = "A HIPAA Compliance Framework",
 *         Color = "#87BEEF",
 *         Default = false,
 *     });
 *     var beta = new GitLab.ComplianceFramework("beta", new()
 *     {
 *         NamespacePath = "top-level-group",
 *         Name = "SOC",
 *         Description = "A SOC Compliance Framework",
 *         Color = "#223344",
 *         Default = false,
 *     });
 *     var sample = new GitLab.ProjectComplianceFrameworks("sample", new()
 *     {
 *         ComplianceFrameworkIds = new[]
 *         {
 *             alpha.FrameworkId,
 *             beta.FrameworkId,
 *         },
 *         Project = "12345678",
 *     });
 * });
 * ```
 * ```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 {
 * 		alpha, err := gitlab.NewComplianceFramework(ctx, "alpha", &gitlab.ComplianceFrameworkArgs{
 * 			NamespacePath: pulumi.String("top-level-group"),
 * 			Name:          pulumi.String("HIPAA"),
 * 			Description:   pulumi.String("A HIPAA Compliance Framework"),
 * 			Color:         pulumi.String("#87BEEF"),
 * 			Default:       pulumi.Bool(false),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		beta, err := gitlab.NewComplianceFramework(ctx, "beta", &gitlab.ComplianceFrameworkArgs{
 * 			NamespacePath: pulumi.String("top-level-group"),
 * 			Name:          pulumi.String("SOC"),
 * 			Description:   pulumi.String("A SOC Compliance Framework"),
 * 			Color:         pulumi.String("#223344"),
 * 			Default:       pulumi.Bool(false),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = gitlab.NewProjectComplianceFrameworks(ctx, "sample", &gitlab.ProjectComplianceFrameworksArgs{
 * 			ComplianceFrameworkIds: pulumi.StringArray{
 * 				alpha.FrameworkId,
 * 				beta.FrameworkId,
 * 			},
 * 			Project: pulumi.String("12345678"),
 * 		})
 * 		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.ComplianceFramework;
 * import com.pulumi.gitlab.ComplianceFrameworkArgs;
 * import com.pulumi.gitlab.ProjectComplianceFrameworks;
 * import com.pulumi.gitlab.ProjectComplianceFrameworksArgs;
 * 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 alpha = new ComplianceFramework("alpha", ComplianceFrameworkArgs.builder()
 *             .namespacePath("top-level-group")
 *             .name("HIPAA")
 *             .description("A HIPAA Compliance Framework")
 *             .color("#87BEEF")
 *             .default_(false)
 *             .build());
 *         var beta = new ComplianceFramework("beta", ComplianceFrameworkArgs.builder()
 *             .namespacePath("top-level-group")
 *             .name("SOC")
 *             .description("A SOC Compliance Framework")
 *             .color("#223344")
 *             .default_(false)
 *             .build());
 *         var sample = new ProjectComplianceFrameworks("sample", ProjectComplianceFrameworksArgs.builder()
 *             .complianceFrameworkIds(
 *                 alpha.frameworkId(),
 *                 beta.frameworkId())
 *             .project("12345678")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   alpha:
 *     type: gitlab:ComplianceFramework
 *     properties:
 *       namespacePath: top-level-group
 *       name: HIPAA
 *       description: A HIPAA Compliance Framework
 *       color: '#87BEEF'
 *       default: false
 *   beta:
 *     type: gitlab:ComplianceFramework
 *     properties:
 *       namespacePath: top-level-group
 *       name: SOC
 *       description: A SOC Compliance Framework
 *       color: '#223344'
 *       default: false
 *   sample:
 *     type: gitlab:ProjectComplianceFrameworks
 *     properties:
 *       complianceFrameworkIds:
 *         - ${alpha.frameworkId}
 *         - ${beta.frameworkId}
 *       project: '12345678'
 * ```
 * 
 * ## Import
 * Starting in Terraform v1.5.0 you can use an import block to import `gitlab_project_compliance_frameworks`. For example:
 * terraform
 * import {
 *   to = gitlab_project_compliance_frameworks.example
 *   id = "see CLI command below for ID"
 * }
 * Import using the CLI is supported using the following syntax:
 * Gitlab project compliance frameworks can be imported with a key composed of ``, e.g.
 * ```sh
 * $ pulumi import gitlab:index/projectComplianceFrameworks:ProjectComplianceFrameworks sample "42"
 * ```
 * @property complianceFrameworkIds Globally unique IDs of the compliance frameworks to assign to the project.
 * @property project The ID or full path of the project to change the compliance frameworks of.
 */
public data class ProjectComplianceFrameworksArgs(
    public val complianceFrameworkIds: Output>? = null,
    public val project: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gitlab.ProjectComplianceFrameworksArgs =
        com.pulumi.gitlab.ProjectComplianceFrameworksArgs.builder()
            .complianceFrameworkIds(
                complianceFrameworkIds?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .project(project?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ProjectComplianceFrameworksArgs].
 */
@PulumiTagMarker
public class ProjectComplianceFrameworksArgsBuilder internal constructor() {
    private var complianceFrameworkIds: Output>? = null

    private var project: Output? = null

    /**
     * @param value Globally unique IDs of the compliance frameworks to assign to the project.
     */
    @JvmName("jabfhijxugdvowti")
    public suspend fun complianceFrameworkIds(`value`: Output>) {
        this.complianceFrameworkIds = value
    }

    @JvmName("xioelymoysrpkiau")
    public suspend fun complianceFrameworkIds(vararg values: Output) {
        this.complianceFrameworkIds = Output.all(values.asList())
    }

    /**
     * @param values Globally unique IDs of the compliance frameworks to assign to the project.
     */
    @JvmName("oynhckjogvkxdbhv")
    public suspend fun complianceFrameworkIds(values: List>) {
        this.complianceFrameworkIds = Output.all(values)
    }

    /**
     * @param value The ID or full path of the project to change the compliance frameworks of.
     */
    @JvmName("hgflifogqopubknd")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value Globally unique IDs of the compliance frameworks to assign to the project.
     */
    @JvmName("kmyskgywhfxoiuqc")
    public suspend fun complianceFrameworkIds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.complianceFrameworkIds = mapped
    }

    /**
     * @param values Globally unique IDs of the compliance frameworks to assign to the project.
     */
    @JvmName("oerubnpxopyuoyjy")
    public suspend fun complianceFrameworkIds(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.complianceFrameworkIds = mapped
    }

    /**
     * @param value The ID or full path of the project to change the compliance frameworks of.
     */
    @JvmName("ljiksvvcbitkwqgr")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    internal fun build(): ProjectComplianceFrameworksArgs = ProjectComplianceFrameworksArgs(
        complianceFrameworkIds = complianceFrameworkIds,
        project = project,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy