com.pulumi.gitlab.kotlin.ProjectComplianceFrameworkArgs.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.ProjectComplianceFrameworkArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* The `gitlab.ProjectComplianceFramework` resource allows to manage the lifecycle of a compliance framework on a project.
* > This resource requires a GitLab Enterprise instance with a Premium license to set the compliance framework on a project.
* **Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#mutationprojectsetcomplianceframework)
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gitlab from "@pulumi/gitlab";
* const sample = new gitlab.ComplianceFramework("sample", {
* namespacePath: "top-level-group",
* name: "HIPAA",
* description: "A HIPAA Compliance Framework",
* color: "#87BEEF",
* "default": false,
* pipelineConfigurationFullPath: ".hipaa.yml@top-level-group/compliance-frameworks",
* });
* const sampleProjectComplianceFramework = new gitlab.ProjectComplianceFramework("sample", {
* complianceFrameworkId: sample.frameworkId,
* project: "12345678",
* });
* ```
* ```python
* import pulumi
* import pulumi_gitlab as gitlab
* sample = gitlab.ComplianceFramework("sample",
* namespace_path="top-level-group",
* name="HIPAA",
* description="A HIPAA Compliance Framework",
* color="#87BEEF",
* default=False,
* pipeline_configuration_full_path=".hipaa.yml@top-level-group/compliance-frameworks")
* sample_project_compliance_framework = gitlab.ProjectComplianceFramework("sample",
* compliance_framework_id=sample.framework_id,
* project="12345678")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using GitLab = Pulumi.GitLab;
* return await Deployment.RunAsync(() =>
* {
* var sample = new GitLab.ComplianceFramework("sample", new()
* {
* NamespacePath = "top-level-group",
* Name = "HIPAA",
* Description = "A HIPAA Compliance Framework",
* Color = "#87BEEF",
* Default = false,
* PipelineConfigurationFullPath = ".hipaa.yml@top-level-group/compliance-frameworks",
* });
* var sampleProjectComplianceFramework = new GitLab.ProjectComplianceFramework("sample", new()
* {
* ComplianceFrameworkId = sample.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 {
* sample, err := gitlab.NewComplianceFramework(ctx, "sample", &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),
* PipelineConfigurationFullPath: pulumi.String(".hipaa.yml@top-level-group/compliance-frameworks"),
* })
* if err != nil {
* return err
* }
* _, err = gitlab.NewProjectComplianceFramework(ctx, "sample", &gitlab.ProjectComplianceFrameworkArgs{
* ComplianceFrameworkId: sample.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.ProjectComplianceFramework;
* import com.pulumi.gitlab.ProjectComplianceFrameworkArgs;
* 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 sample = new ComplianceFramework("sample", ComplianceFrameworkArgs.builder()
* .namespacePath("top-level-group")
* .name("HIPAA")
* .description("A HIPAA Compliance Framework")
* .color("#87BEEF")
* .default_(false)
* .pipelineConfigurationFullPath(".hipaa.yml@top-level-group/compliance-frameworks")
* .build());
* var sampleProjectComplianceFramework = new ProjectComplianceFramework("sampleProjectComplianceFramework", ProjectComplianceFrameworkArgs.builder()
* .complianceFrameworkId(sample.frameworkId())
* .project("12345678")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* sample:
* type: gitlab:ComplianceFramework
* properties:
* namespacePath: top-level-group
* name: HIPAA
* description: A HIPAA Compliance Framework
* color: '#87BEEF'
* default: false
* pipelineConfigurationFullPath: .hipaa.yml@top-level-group/compliance-frameworks
* sampleProjectComplianceFramework:
* type: gitlab:ProjectComplianceFramework
* name: sample
* properties:
* complianceFrameworkId: ${sample.frameworkId}
* project: '12345678'
* ```
*
* ## Import
* Gitlab project compliance frameworks can be imported with a key composed of ``, e.g.
* ```sh
* $ pulumi import gitlab:index/projectComplianceFramework:ProjectComplianceFramework sample "42"
* ```
* @property complianceFrameworkId Globally unique ID of the compliance framework to assign to the project.
* @property project The ID or full path of the project to change the compliance framework of.
*/
public data class ProjectComplianceFrameworkArgs(
public val complianceFrameworkId: Output? = null,
public val project: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gitlab.ProjectComplianceFrameworkArgs =
com.pulumi.gitlab.ProjectComplianceFrameworkArgs.builder()
.complianceFrameworkId(complianceFrameworkId?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ProjectComplianceFrameworkArgs].
*/
@PulumiTagMarker
public class ProjectComplianceFrameworkArgsBuilder internal constructor() {
private var complianceFrameworkId: Output? = null
private var project: Output? = null
/**
* @param value Globally unique ID of the compliance framework to assign to the project.
*/
@JvmName("jqhkulqtpoqkfbiq")
public suspend fun complianceFrameworkId(`value`: Output) {
this.complianceFrameworkId = value
}
/**
* @param value The ID or full path of the project to change the compliance framework of.
*/
@JvmName("hcrtaiuxupwoygbg")
public suspend fun project(`value`: Output) {
this.project = value
}
/**
* @param value Globally unique ID of the compliance framework to assign to the project.
*/
@JvmName("hhcqivwmnfviwpwn")
public suspend fun complianceFrameworkId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.complianceFrameworkId = mapped
}
/**
* @param value The ID or full path of the project to change the compliance framework of.
*/
@JvmName("lxsvvkdqcbbgnxwk")
public suspend fun project(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.project = mapped
}
internal fun build(): ProjectComplianceFrameworkArgs = ProjectComplianceFrameworkArgs(
complianceFrameworkId = complianceFrameworkId,
project = project,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy