gitlab.ProjectComplianceFramework
Explore with Pulumi AI
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
Example Usage
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",
});
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")
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
})
}
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",
});
});
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());
}
}
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'
Create ProjectComplianceFramework Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ProjectComplianceFramework(name: string, args: ProjectComplianceFrameworkArgs, opts?: CustomResourceOptions);
@overload
def ProjectComplianceFramework(resource_name: str,
args: ProjectComplianceFrameworkArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ProjectComplianceFramework(resource_name: str,
opts: Optional[ResourceOptions] = None,
compliance_framework_id: Optional[str] = None,
project: Optional[str] = None)
func NewProjectComplianceFramework(ctx *Context, name string, args ProjectComplianceFrameworkArgs, opts ...ResourceOption) (*ProjectComplianceFramework, error)
public ProjectComplianceFramework(string name, ProjectComplianceFrameworkArgs args, CustomResourceOptions? opts = null)
public ProjectComplianceFramework(String name, ProjectComplianceFrameworkArgs args)
public ProjectComplianceFramework(String name, ProjectComplianceFrameworkArgs args, CustomResourceOptions options)
type: gitlab:ProjectComplianceFramework
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ProjectComplianceFrameworkArgs
- 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 ProjectComplianceFrameworkArgs
- 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 ProjectComplianceFrameworkArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProjectComplianceFrameworkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProjectComplianceFrameworkArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var projectComplianceFrameworkResource = new GitLab.ProjectComplianceFramework("projectComplianceFrameworkResource", new()
{
ComplianceFrameworkId = "string",
Project = "string",
});
example, err := gitlab.NewProjectComplianceFramework(ctx, "projectComplianceFrameworkResource", &gitlab.ProjectComplianceFrameworkArgs{
ComplianceFrameworkId: pulumi.String("string"),
Project: pulumi.String("string"),
})
var projectComplianceFrameworkResource = new ProjectComplianceFramework("projectComplianceFrameworkResource", ProjectComplianceFrameworkArgs.builder()
.complianceFrameworkId("string")
.project("string")
.build());
project_compliance_framework_resource = gitlab.ProjectComplianceFramework("projectComplianceFrameworkResource",
compliance_framework_id="string",
project="string")
const projectComplianceFrameworkResource = new gitlab.ProjectComplianceFramework("projectComplianceFrameworkResource", {
complianceFrameworkId: "string",
project: "string",
});
type: gitlab:ProjectComplianceFramework
properties:
complianceFrameworkId: string
project: string
ProjectComplianceFramework Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ProjectComplianceFramework resource accepts the following input properties:
- Compliance
Framework stringId - Globally unique ID of the compliance framework to assign to the project.
- Project string
- The ID or full path of the project to change the compliance framework of.
- Compliance
Framework stringId - Globally unique ID of the compliance framework to assign to the project.
- Project string
- The ID or full path of the project to change the compliance framework of.
- compliance
Framework StringId - Globally unique ID of the compliance framework to assign to the project.
- project String
- The ID or full path of the project to change the compliance framework of.
- compliance
Framework stringId - Globally unique ID of the compliance framework to assign to the project.
- project string
- The ID or full path of the project to change the compliance framework of.
- compliance_
framework_ strid - Globally unique ID of the compliance framework to assign to the project.
- project str
- The ID or full path of the project to change the compliance framework of.
- compliance
Framework StringId - Globally unique ID of the compliance framework to assign to the project.
- project String
- The ID or full path of the project to change the compliance framework of.
Outputs
All input properties are implicitly available as output properties. Additionally, the ProjectComplianceFramework resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ProjectComplianceFramework Resource
Get an existing ProjectComplianceFramework 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?: ProjectComplianceFrameworkState, opts?: CustomResourceOptions): ProjectComplianceFramework
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
compliance_framework_id: Optional[str] = None,
project: Optional[str] = None) -> ProjectComplianceFramework
func GetProjectComplianceFramework(ctx *Context, name string, id IDInput, state *ProjectComplianceFrameworkState, opts ...ResourceOption) (*ProjectComplianceFramework, error)
public static ProjectComplianceFramework Get(string name, Input<string> id, ProjectComplianceFrameworkState? state, CustomResourceOptions? opts = null)
public static ProjectComplianceFramework get(String name, Output<String> id, ProjectComplianceFrameworkState 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.
- Compliance
Framework stringId - Globally unique ID of the compliance framework to assign to the project.
- Project string
- The ID or full path of the project to change the compliance framework of.
- Compliance
Framework stringId - Globally unique ID of the compliance framework to assign to the project.
- Project string
- The ID or full path of the project to change the compliance framework of.
- compliance
Framework StringId - Globally unique ID of the compliance framework to assign to the project.
- project String
- The ID or full path of the project to change the compliance framework of.
- compliance
Framework stringId - Globally unique ID of the compliance framework to assign to the project.
- project string
- The ID or full path of the project to change the compliance framework of.
- compliance_
framework_ strid - Globally unique ID of the compliance framework to assign to the project.
- project str
- The ID or full path of the project to change the compliance framework of.
- compliance
Framework StringId - Globally unique ID of the compliance framework to assign to the project.
- project String
- The ID or full path of the project to change the compliance framework of.
Import
Gitlab project compliance frameworks can be imported with a key composed of <project_id>
, e.g.
$ pulumi import gitlab:index/projectComplianceFramework:ProjectComplianceFramework sample "42"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- GitLab pulumi/pulumi-gitlab
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
gitlab
Terraform Provider.