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

gitlab.ComplianceFramework

Explore with Pulumi AI

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

    The gitlab.ComplianceFramework resource allows to manage the lifecycle of a compliance framework on top-level groups.

    There can be only one default compliance framework. Of all the configured compliance frameworks marked as default, the last one applied will be the default compliance framework.

    This resource requires a GitLab Enterprise instance with a Premium license to create the compliance framework.

    This resource requires a GitLab Enterprise instance with an Ultimate license to specify a compliance pipeline configuration in the compliance framework.

    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", {
        color: "#87BEEF",
        "default": false,
        description: "A HIPAA Compliance Framework",
        namespacePath: "top-level-group",
        pipelineConfigurationFullPath: ".hipaa.yml@top-level-group/compliance-frameworks",
    });
    
    import pulumi
    import pulumi_gitlab as gitlab
    
    sample = gitlab.ComplianceFramework("sample",
        color="#87BEEF",
        default=False,
        description="A HIPAA Compliance Framework",
        namespace_path="top-level-group",
        pipeline_configuration_full_path=".hipaa.yml@top-level-group/compliance-frameworks")
    
    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 {
    		_, err := gitlab.NewComplianceFramework(ctx, "sample", &gitlab.ComplianceFrameworkArgs{
    			Color:                         pulumi.String("#87BEEF"),
    			Default:                       pulumi.Bool(false),
    			Description:                   pulumi.String("A HIPAA Compliance Framework"),
    			NamespacePath:                 pulumi.String("top-level-group"),
    			PipelineConfigurationFullPath: pulumi.String(".hipaa.yml@top-level-group/compliance-frameworks"),
    		})
    		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()
        {
            Color = "#87BEEF",
            Default = false,
            Description = "A HIPAA Compliance Framework",
            NamespacePath = "top-level-group",
            PipelineConfigurationFullPath = ".hipaa.yml@top-level-group/compliance-frameworks",
        });
    
    });
    
    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 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()        
                .color("#87BEEF")
                .default_(false)
                .description("A HIPAA Compliance Framework")
                .namespacePath("top-level-group")
                .pipelineConfigurationFullPath(".hipaa.yml@top-level-group/compliance-frameworks")
                .build());
    
        }
    }
    
    resources:
      sample:
        type: gitlab:ComplianceFramework
        properties:
          color: '#87BEEF'
          default: false
          description: A HIPAA Compliance Framework
          namespacePath: top-level-group
          pipelineConfigurationFullPath: .hipaa.yml@top-level-group/compliance-frameworks
    

    Create ComplianceFramework Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ComplianceFramework(name: string, args: ComplianceFrameworkArgs, opts?: CustomResourceOptions);
    @overload
    def ComplianceFramework(resource_name: str,
                            args: ComplianceFrameworkArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def ComplianceFramework(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            color: Optional[str] = None,
                            description: Optional[str] = None,
                            namespace_path: Optional[str] = None,
                            default: Optional[bool] = None,
                            name: Optional[str] = None,
                            pipeline_configuration_full_path: Optional[str] = None)
    func NewComplianceFramework(ctx *Context, name string, args ComplianceFrameworkArgs, opts ...ResourceOption) (*ComplianceFramework, error)
    public ComplianceFramework(string name, ComplianceFrameworkArgs args, CustomResourceOptions? opts = null)
    public ComplianceFramework(String name, ComplianceFrameworkArgs args)
    public ComplianceFramework(String name, ComplianceFrameworkArgs args, CustomResourceOptions options)
    
    type: gitlab:ComplianceFramework
    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 ComplianceFrameworkArgs
    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 ComplianceFrameworkArgs
    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 ComplianceFrameworkArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ComplianceFrameworkArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ComplianceFrameworkArgs
    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 complianceFrameworkResource = new GitLab.ComplianceFramework("complianceFrameworkResource", new()
    {
        Color = "string",
        Description = "string",
        NamespacePath = "string",
        Default = false,
        Name = "string",
        PipelineConfigurationFullPath = "string",
    });
    
    example, err := gitlab.NewComplianceFramework(ctx, "complianceFrameworkResource", &gitlab.ComplianceFrameworkArgs{
    	Color:                         pulumi.String("string"),
    	Description:                   pulumi.String("string"),
    	NamespacePath:                 pulumi.String("string"),
    	Default:                       pulumi.Bool(false),
    	Name:                          pulumi.String("string"),
    	PipelineConfigurationFullPath: pulumi.String("string"),
    })
    
    var complianceFrameworkResource = new ComplianceFramework("complianceFrameworkResource", ComplianceFrameworkArgs.builder()        
        .color("string")
        .description("string")
        .namespacePath("string")
        .default_(false)
        .name("string")
        .pipelineConfigurationFullPath("string")
        .build());
    
    compliance_framework_resource = gitlab.ComplianceFramework("complianceFrameworkResource",
        color="string",
        description="string",
        namespace_path="string",
        default=False,
        name="string",
        pipeline_configuration_full_path="string")
    
    const complianceFrameworkResource = new gitlab.ComplianceFramework("complianceFrameworkResource", {
        color: "string",
        description: "string",
        namespacePath: "string",
        "default": false,
        name: "string",
        pipelineConfigurationFullPath: "string",
    });
    
    type: gitlab:ComplianceFramework
    properties:
        color: string
        default: false
        description: string
        name: string
        namespacePath: string
        pipelineConfigurationFullPath: string
    

    ComplianceFramework 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 ComplianceFramework resource accepts the following input properties:

    Color string
    New color representation of the compliance framework in hex format. e.g. #FCA121.
    Description string
    Description for the compliance framework.
    NamespacePath string
    Full path of the namespace to add the compliance framework to.
    Default bool
    Set this compliance framework as the default framework for the group. Default: false
    Name string
    Name for the compliance framework.
    PipelineConfigurationFullPath string
    Full path of the compliance pipeline configuration stored in a project repository, such as .gitlab/.compliance-gitlab-ci.yml@compliance/hipaa. Required format: path/file.y[a]ml@group-name/project-name Note: Ultimate license required.
    Color string
    New color representation of the compliance framework in hex format. e.g. #FCA121.
    Description string
    Description for the compliance framework.
    NamespacePath string
    Full path of the namespace to add the compliance framework to.
    Default bool
    Set this compliance framework as the default framework for the group. Default: false
    Name string
    Name for the compliance framework.
    PipelineConfigurationFullPath string
    Full path of the compliance pipeline configuration stored in a project repository, such as .gitlab/.compliance-gitlab-ci.yml@compliance/hipaa. Required format: path/file.y[a]ml@group-name/project-name Note: Ultimate license required.
    color String
    New color representation of the compliance framework in hex format. e.g. #FCA121.
    description String
    Description for the compliance framework.
    namespacePath String
    Full path of the namespace to add the compliance framework to.
    default_ Boolean
    Set this compliance framework as the default framework for the group. Default: false
    name String
    Name for the compliance framework.
    pipelineConfigurationFullPath String
    Full path of the compliance pipeline configuration stored in a project repository, such as .gitlab/.compliance-gitlab-ci.yml@compliance/hipaa. Required format: path/file.y[a]ml@group-name/project-name Note: Ultimate license required.
    color string
    New color representation of the compliance framework in hex format. e.g. #FCA121.
    description string
    Description for the compliance framework.
    namespacePath string
    Full path of the namespace to add the compliance framework to.
    default boolean
    Set this compliance framework as the default framework for the group. Default: false
    name string
    Name for the compliance framework.
    pipelineConfigurationFullPath string
    Full path of the compliance pipeline configuration stored in a project repository, such as .gitlab/.compliance-gitlab-ci.yml@compliance/hipaa. Required format: path/file.y[a]ml@group-name/project-name Note: Ultimate license required.
    color str
    New color representation of the compliance framework in hex format. e.g. #FCA121.
    description str
    Description for the compliance framework.
    namespace_path str
    Full path of the namespace to add the compliance framework to.
    default bool
    Set this compliance framework as the default framework for the group. Default: false
    name str
    Name for the compliance framework.
    pipeline_configuration_full_path str
    Full path of the compliance pipeline configuration stored in a project repository, such as .gitlab/.compliance-gitlab-ci.yml@compliance/hipaa. Required format: path/file.y[a]ml@group-name/project-name Note: Ultimate license required.
    color String
    New color representation of the compliance framework in hex format. e.g. #FCA121.
    description String
    Description for the compliance framework.
    namespacePath String
    Full path of the namespace to add the compliance framework to.
    default Boolean
    Set this compliance framework as the default framework for the group. Default: false
    name String
    Name for the compliance framework.
    pipelineConfigurationFullPath String
    Full path of the compliance pipeline configuration stored in a project repository, such as .gitlab/.compliance-gitlab-ci.yml@compliance/hipaa. Required format: path/file.y[a]ml@group-name/project-name Note: Ultimate license required.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ComplianceFramework resource produces the following output properties:

    FrameworkId string
    Globally unique ID of the compliance framework.
    Id string
    The provider-assigned unique ID for this managed resource.
    FrameworkId string
    Globally unique ID of the compliance framework.
    Id string
    The provider-assigned unique ID for this managed resource.
    frameworkId String
    Globally unique ID of the compliance framework.
    id String
    The provider-assigned unique ID for this managed resource.
    frameworkId string
    Globally unique ID of the compliance framework.
    id string
    The provider-assigned unique ID for this managed resource.
    framework_id str
    Globally unique ID of the compliance framework.
    id str
    The provider-assigned unique ID for this managed resource.
    frameworkId String
    Globally unique ID of the compliance framework.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ComplianceFramework Resource

    Get an existing ComplianceFramework 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?: ComplianceFrameworkState, opts?: CustomResourceOptions): ComplianceFramework
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            color: Optional[str] = None,
            default: Optional[bool] = None,
            description: Optional[str] = None,
            framework_id: Optional[str] = None,
            name: Optional[str] = None,
            namespace_path: Optional[str] = None,
            pipeline_configuration_full_path: Optional[str] = None) -> ComplianceFramework
    func GetComplianceFramework(ctx *Context, name string, id IDInput, state *ComplianceFrameworkState, opts ...ResourceOption) (*ComplianceFramework, error)
    public static ComplianceFramework Get(string name, Input<string> id, ComplianceFrameworkState? state, CustomResourceOptions? opts = null)
    public static ComplianceFramework get(String name, Output<String> id, ComplianceFrameworkState 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:
    Color string
    New color representation of the compliance framework in hex format. e.g. #FCA121.
    Default bool
    Set this compliance framework as the default framework for the group. Default: false
    Description string
    Description for the compliance framework.
    FrameworkId string
    Globally unique ID of the compliance framework.
    Name string
    Name for the compliance framework.
    NamespacePath string
    Full path of the namespace to add the compliance framework to.
    PipelineConfigurationFullPath string
    Full path of the compliance pipeline configuration stored in a project repository, such as .gitlab/.compliance-gitlab-ci.yml@compliance/hipaa. Required format: path/file.y[a]ml@group-name/project-name Note: Ultimate license required.
    Color string
    New color representation of the compliance framework in hex format. e.g. #FCA121.
    Default bool
    Set this compliance framework as the default framework for the group. Default: false
    Description string
    Description for the compliance framework.
    FrameworkId string
    Globally unique ID of the compliance framework.
    Name string
    Name for the compliance framework.
    NamespacePath string
    Full path of the namespace to add the compliance framework to.
    PipelineConfigurationFullPath string
    Full path of the compliance pipeline configuration stored in a project repository, such as .gitlab/.compliance-gitlab-ci.yml@compliance/hipaa. Required format: path/file.y[a]ml@group-name/project-name Note: Ultimate license required.
    color String
    New color representation of the compliance framework in hex format. e.g. #FCA121.
    default_ Boolean
    Set this compliance framework as the default framework for the group. Default: false
    description String
    Description for the compliance framework.
    frameworkId String
    Globally unique ID of the compliance framework.
    name String
    Name for the compliance framework.
    namespacePath String
    Full path of the namespace to add the compliance framework to.
    pipelineConfigurationFullPath String
    Full path of the compliance pipeline configuration stored in a project repository, such as .gitlab/.compliance-gitlab-ci.yml@compliance/hipaa. Required format: path/file.y[a]ml@group-name/project-name Note: Ultimate license required.
    color string
    New color representation of the compliance framework in hex format. e.g. #FCA121.
    default boolean
    Set this compliance framework as the default framework for the group. Default: false
    description string
    Description for the compliance framework.
    frameworkId string
    Globally unique ID of the compliance framework.
    name string
    Name for the compliance framework.
    namespacePath string
    Full path of the namespace to add the compliance framework to.
    pipelineConfigurationFullPath string
    Full path of the compliance pipeline configuration stored in a project repository, such as .gitlab/.compliance-gitlab-ci.yml@compliance/hipaa. Required format: path/file.y[a]ml@group-name/project-name Note: Ultimate license required.
    color str
    New color representation of the compliance framework in hex format. e.g. #FCA121.
    default bool
    Set this compliance framework as the default framework for the group. Default: false
    description str
    Description for the compliance framework.
    framework_id str
    Globally unique ID of the compliance framework.
    name str
    Name for the compliance framework.
    namespace_path str
    Full path of the namespace to add the compliance framework to.
    pipeline_configuration_full_path str
    Full path of the compliance pipeline configuration stored in a project repository, such as .gitlab/.compliance-gitlab-ci.yml@compliance/hipaa. Required format: path/file.y[a]ml@group-name/project-name Note: Ultimate license required.
    color String
    New color representation of the compliance framework in hex format. e.g. #FCA121.
    default Boolean
    Set this compliance framework as the default framework for the group. Default: false
    description String
    Description for the compliance framework.
    frameworkId String
    Globally unique ID of the compliance framework.
    name String
    Name for the compliance framework.
    namespacePath String
    Full path of the namespace to add the compliance framework to.
    pipelineConfigurationFullPath String
    Full path of the compliance pipeline configuration stored in a project repository, such as .gitlab/.compliance-gitlab-ci.yml@compliance/hipaa. Required format: path/file.y[a]ml@group-name/project-name Note: Ultimate license required.

    Import

    Gitlab compliance frameworks can be imported with a key composed of <namespace_path>:<framework_id>, e.g.

    $ pulumi import gitlab:index/complianceFramework:ComplianceFramework sample "top-level-group:gid://gitlab/ComplianceManagement::Framework/12345"
    

    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