1. Packages
  2. GitLab
  3. API Docs
  4. ProjectComplianceFramework
GitLab v6.11.0 published on Friday, Apr 19, 2024 by Pulumi

gitlab.ProjectComplianceFramework

Explore with Pulumi AI

gitlab logo
GitLab v6.11.0 published on Friday, Apr 19, 2024 by Pulumi

    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 sampleComplianceFramework = new gitlab.ComplianceFramework("sampleComplianceFramework", {
        namespacePath: "top-level-group",
        description: "A HIPAA Compliance Framework",
        color: "#87BEEF",
        "default": false,
        pipelineConfigurationFullPath: ".hipaa.yml@top-level-group/compliance-frameworks",
    });
    const sampleProjectComplianceFramework = new gitlab.ProjectComplianceFramework("sampleProjectComplianceFramework", {
        complianceFrameworkId: sampleComplianceFramework.frameworkId,
        project: "12345678",
    });
    
    import pulumi
    import pulumi_gitlab as gitlab
    
    sample_compliance_framework = gitlab.ComplianceFramework("sampleComplianceFramework",
        namespace_path="top-level-group",
        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("sampleProjectComplianceFramework",
        compliance_framework_id=sample_compliance_framework.framework_id,
        project="12345678")
    
    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 {
    		sampleComplianceFramework, err := gitlab.NewComplianceFramework(ctx, "sampleComplianceFramework", &gitlab.ComplianceFrameworkArgs{
    			NamespacePath:                 pulumi.String("top-level-group"),
    			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, "sampleProjectComplianceFramework", &gitlab.ProjectComplianceFrameworkArgs{
    			ComplianceFrameworkId: sampleComplianceFramework.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 sampleComplianceFramework = new GitLab.ComplianceFramework("sampleComplianceFramework", new()
        {
            NamespacePath = "top-level-group",
            Description = "A HIPAA Compliance Framework",
            Color = "#87BEEF",
            Default = false,
            PipelineConfigurationFullPath = ".hipaa.yml@top-level-group/compliance-frameworks",
        });
    
        var sampleProjectComplianceFramework = new GitLab.ProjectComplianceFramework("sampleProjectComplianceFramework", new()
        {
            ComplianceFrameworkId = sampleComplianceFramework.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 sampleComplianceFramework = new ComplianceFramework("sampleComplianceFramework", ComplianceFrameworkArgs.builder()        
                .namespacePath("top-level-group")
                .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(sampleComplianceFramework.frameworkId())
                .project("12345678")
                .build());
    
        }
    }
    
    resources:
      sampleComplianceFramework:
        type: gitlab:ComplianceFramework
        properties:
          namespacePath: top-level-group
          description: A HIPAA Compliance Framework
          color: '#87BEEF'
          default: false
          pipelineConfigurationFullPath: .hipaa.yml@top-level-group/compliance-frameworks
      sampleProjectComplianceFramework:
        type: gitlab:ProjectComplianceFramework
        properties:
          complianceFrameworkId: ${sampleComplianceFramework.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.

    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

    The ProjectComplianceFramework resource accepts the following input properties:

    ComplianceFrameworkId string
    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.
    ComplianceFrameworkId string
    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.
    complianceFrameworkId String
    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.
    complianceFrameworkId string
    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_id str
    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.
    complianceFrameworkId String
    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.
    The following state arguments are supported:
    ComplianceFrameworkId string
    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.
    ComplianceFrameworkId string
    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.
    complianceFrameworkId String
    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.
    complianceFrameworkId string
    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_id str
    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.
    complianceFrameworkId String
    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.
    gitlab logo
    GitLab v6.11.0 published on Friday, Apr 19, 2024 by Pulumi