published on Saturday, Sep 19, 2026 by Pulumi
published on Saturday, Sep 19, 2026 by Pulumi
The gitlab.ComplianceFrameworkFromTemplate resource manages the lifecycle of a compliance framework created from a template 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 may be a different framework with every apply, so you should only use the default once per config.
This resource requires a GitLab Enterprise instance with an Ultimate license.
Upstream API: GitLab GraphQL API docs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const sample = new gitlab.ComplianceFrameworkFromTemplate("sample", {
namespacePath: "top-level-group",
templateId: "gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/soc2",
});
// Example: create from template and override template defaults
const sampleWithOverrides = new gitlab.ComplianceFrameworkFromTemplate("sample_with_overrides", {
namespacePath: "top-level-group",
templateId: "gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/iso_27001-2022",
name: "HIPAA",
description: "A HIPAA Compliance Framework",
color: "#87BEEF",
"default": false,
});
import pulumi
import pulumi_gitlab as gitlab
sample = gitlab.ComplianceFrameworkFromTemplate("sample",
namespace_path="top-level-group",
template_id="gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/soc2")
# Example: create from template and override template defaults
sample_with_overrides = gitlab.ComplianceFrameworkFromTemplate("sample_with_overrides",
namespace_path="top-level-group",
template_id="gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/iso_27001-2022",
name="HIPAA",
description="A HIPAA Compliance Framework",
color="#87BEEF",
default=False)
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v10/go/gitlab"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gitlab.NewComplianceFrameworkFromTemplate(ctx, "sample", &gitlab.ComplianceFrameworkFromTemplateArgs{
NamespacePath: pulumi.String("top-level-group"),
TemplateId: pulumi.String("gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/soc2"),
})
if err != nil {
return err
}
// Example: create from template and override template defaults
_, err = gitlab.NewComplianceFrameworkFromTemplate(ctx, "sample_with_overrides", &gitlab.ComplianceFrameworkFromTemplateArgs{
NamespacePath: pulumi.String("top-level-group"),
TemplateId: pulumi.String("gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/iso_27001-2022"),
Name: pulumi.String("HIPAA"),
Description: pulumi.String("A HIPAA Compliance Framework"),
Color: pulumi.String("#87BEEF"),
Default: pulumi.Bool(false),
})
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.ComplianceFrameworkFromTemplate("sample", new()
{
NamespacePath = "top-level-group",
TemplateId = "gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/soc2",
});
// Example: create from template and override template defaults
var sampleWithOverrides = new GitLab.ComplianceFrameworkFromTemplate("sample_with_overrides", new()
{
NamespacePath = "top-level-group",
TemplateId = "gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/iso_27001-2022",
Name = "HIPAA",
Description = "A HIPAA Compliance Framework",
Color = "#87BEEF",
Default = false,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.ComplianceFrameworkFromTemplate;
import com.pulumi.gitlab.ComplianceFrameworkFromTemplateArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 ComplianceFrameworkFromTemplate("sample", ComplianceFrameworkFromTemplateArgs.builder()
.namespacePath("top-level-group")
.templateId("gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/soc2")
.build());
// Example: create from template and override template defaults
var sampleWithOverrides = new ComplianceFrameworkFromTemplate("sampleWithOverrides", ComplianceFrameworkFromTemplateArgs.builder()
.namespacePath("top-level-group")
.templateId("gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/iso_27001-2022")
.name("HIPAA")
.description("A HIPAA Compliance Framework")
.color("#87BEEF")
.default_(false)
.build());
}
}
resources:
sample:
type: gitlab:ComplianceFrameworkFromTemplate
properties:
namespacePath: top-level-group
templateId: gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/soc2
# Example: create from template and override template defaults
sampleWithOverrides:
type: gitlab:ComplianceFrameworkFromTemplate
name: sample_with_overrides
properties:
namespacePath: top-level-group
templateId: gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/iso_27001-2022
name: HIPAA
description: A HIPAA Compliance Framework
color: '#87BEEF'
default: false
pulumi {
required_providers {
gitlab = {
source = "pulumi/gitlab"
}
}
}
resource "gitlab_complianceframeworkfromtemplate" "sample" {
namespace_path = "top-level-group"
template_id = "gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/soc2"
}
# Example: create from template and override template defaults
resource "gitlab_complianceframeworkfromtemplate" "sample_with_overrides" {
namespace_path = "top-level-group"
template_id = "gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/iso_27001-2022"
name = "HIPAA"
description = "A HIPAA Compliance Framework"
color = "#87BEEF"
default = false
}
Create ComplianceFrameworkFromTemplate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ComplianceFrameworkFromTemplate(name: string, args: ComplianceFrameworkFromTemplateArgs, opts?: CustomResourceOptions);@overload
def ComplianceFrameworkFromTemplate(resource_name: str,
args: ComplianceFrameworkFromTemplateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ComplianceFrameworkFromTemplate(resource_name: str,
opts: Optional[ResourceOptions] = None,
namespace_path: Optional[str] = None,
template_id: Optional[str] = None,
color: Optional[str] = None,
default: Optional[bool] = None,
description: Optional[str] = None,
name: Optional[str] = None)func NewComplianceFrameworkFromTemplate(ctx *Context, name string, args ComplianceFrameworkFromTemplateArgs, opts ...ResourceOption) (*ComplianceFrameworkFromTemplate, error)public ComplianceFrameworkFromTemplate(string name, ComplianceFrameworkFromTemplateArgs args, CustomResourceOptions? opts = null)
public ComplianceFrameworkFromTemplate(String name, ComplianceFrameworkFromTemplateArgs args)
public ComplianceFrameworkFromTemplate(String name, ComplianceFrameworkFromTemplateArgs args, CustomResourceOptions options)
type: gitlab:ComplianceFrameworkFromTemplate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "gitlab_compliance_framework_from_template" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args ComplianceFrameworkFromTemplateArgs
- 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 ComplianceFrameworkFromTemplateArgs
- 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 ComplianceFrameworkFromTemplateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ComplianceFrameworkFromTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ComplianceFrameworkFromTemplateArgs
- 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 complianceFrameworkFromTemplateResource = new GitLab.ComplianceFrameworkFromTemplate("complianceFrameworkFromTemplateResource", new()
{
NamespacePath = "string",
TemplateId = "string",
Color = "string",
Default = false,
Description = "string",
Name = "string",
});
example, err := gitlab.NewComplianceFrameworkFromTemplate(ctx, "complianceFrameworkFromTemplateResource", &gitlab.ComplianceFrameworkFromTemplateArgs{
NamespacePath: pulumi.String("string"),
TemplateId: pulumi.String("string"),
Color: pulumi.String("string"),
Default: pulumi.Bool(false),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
})
resource "gitlab_compliance_framework_from_template" "complianceFrameworkFromTemplateResource" {
lifecycle {
create_before_destroy = true
}
namespace_path = "string"
template_id = "string"
color = "string"
default = false
description = "string"
name = "string"
}
var complianceFrameworkFromTemplateResource = new ComplianceFrameworkFromTemplate("complianceFrameworkFromTemplateResource", ComplianceFrameworkFromTemplateArgs.builder()
.namespacePath("string")
.templateId("string")
.color("string")
.default_(false)
.description("string")
.name("string")
.build());
compliance_framework_from_template_resource = gitlab.ComplianceFrameworkFromTemplate("complianceFrameworkFromTemplateResource",
namespace_path="string",
template_id="string",
color="string",
default=False,
description="string",
name="string")
const complianceFrameworkFromTemplateResource = new gitlab.ComplianceFrameworkFromTemplate("complianceFrameworkFromTemplateResource", {
namespacePath: "string",
templateId: "string",
color: "string",
"default": false,
description: "string",
name: "string",
});
type: gitlab:ComplianceFrameworkFromTemplate
properties:
color: string
default: false
description: string
name: string
namespacePath: string
templateId: string
ComplianceFrameworkFromTemplate 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 ComplianceFrameworkFromTemplate resource accepts the following input properties:
- Namespace
Path string - Full path of the namespace to add the compliance framework to.
- Template
Id string - Unique identifier of the template to create the framework from. In the format of:
gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/<template id> - Color string
- Override the color 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
- Override the description of the compliance framework.
- Name string
- Override the name of the compliance framework.
- Namespace
Path string - Full path of the namespace to add the compliance framework to.
- Template
Id string - Unique identifier of the template to create the framework from. In the format of:
gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/<template id> - Color string
- Override the color 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
- Override the description of the compliance framework.
- Name string
- Override the name of the compliance framework.
- namespace_
path string - Full path of the namespace to add the compliance framework to.
- template_
id string - Unique identifier of the template to create the framework from. In the format of:
gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/<template id> - color string
- Override the color 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
- Override the description of the compliance framework.
- name string
- Override the name of the compliance framework.
- namespace
Path String - Full path of the namespace to add the compliance framework to.
- template
Id String - Unique identifier of the template to create the framework from. In the format of:
gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/<template id> - color String
- Override the color 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
- Override the description of the compliance framework.
- name String
- Override the name of the compliance framework.
- namespace
Path string - Full path of the namespace to add the compliance framework to.
- template
Id string - Unique identifier of the template to create the framework from. In the format of:
gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/<template id> - color string
- Override the color 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
- Override the description of the compliance framework.
- name string
- Override the name of the compliance framework.
- namespace_
path str - Full path of the namespace to add the compliance framework to.
- template_
id str - Unique identifier of the template to create the framework from. In the format of:
gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/<template id> - color str
- Override the color 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
- Override the description of the compliance framework.
- name str
- Override the name of the compliance framework.
- namespace
Path String - Full path of the namespace to add the compliance framework to.
- template
Id String - Unique identifier of the template to create the framework from. In the format of:
gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/<template id> - color String
- Override the color 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
- Override the description of the compliance framework.
- name String
- Override the name of the compliance framework.
Outputs
All input properties are implicitly available as output properties. Additionally, the ComplianceFrameworkFromTemplate resource produces the following output properties:
- Framework
Id string - Globally unique ID of the compliance framework.
- Id string
- The provider-assigned unique ID for this managed resource.
- Framework
Id string - Globally unique ID of the compliance framework.
- Id string
- The provider-assigned unique ID for this managed resource.
- framework_
id string - Globally unique ID of the compliance framework.
- id string
- The provider-assigned unique ID for this managed resource.
- framework
Id String - Globally unique ID of the compliance framework.
- id String
- The provider-assigned unique ID for this managed resource.
- framework
Id 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.
- framework
Id String - Globally unique ID of the compliance framework.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ComplianceFrameworkFromTemplate Resource
Get an existing ComplianceFrameworkFromTemplate 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?: ComplianceFrameworkFromTemplateState, opts?: CustomResourceOptions): ComplianceFrameworkFromTemplate@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,
template_id: Optional[str] = None) -> ComplianceFrameworkFromTemplatefunc GetComplianceFrameworkFromTemplate(ctx *Context, name string, id IDInput, state *ComplianceFrameworkFromTemplateState, opts ...ResourceOption) (*ComplianceFrameworkFromTemplate, error)public static ComplianceFrameworkFromTemplate Get(string name, Input<string> id, ComplianceFrameworkFromTemplateState? state, CustomResourceOptions? opts = null)public static ComplianceFrameworkFromTemplate get(String name, Output<String> id, ComplianceFrameworkFromTemplateState state, CustomResourceOptions options)resources: _: type: gitlab:ComplianceFrameworkFromTemplate get: id: ${id}import {
to = gitlab_compliance_framework_from_template.example
id = "${id}"
}
- 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.
- Color string
- Override the color 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
- Override the description of the compliance framework.
- Framework
Id string - Globally unique ID of the compliance framework.
- Name string
- Override the name of the compliance framework.
- Namespace
Path string - Full path of the namespace to add the compliance framework to.
- Template
Id string - Unique identifier of the template to create the framework from. In the format of:
gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/<template id>
- Color string
- Override the color 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
- Override the description of the compliance framework.
- Framework
Id string - Globally unique ID of the compliance framework.
- Name string
- Override the name of the compliance framework.
- Namespace
Path string - Full path of the namespace to add the compliance framework to.
- Template
Id string - Unique identifier of the template to create the framework from. In the format of:
gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/<template id>
- color string
- Override the color 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
- Override the description of the compliance framework.
- framework_
id string - Globally unique ID of the compliance framework.
- name string
- Override the name of the compliance framework.
- namespace_
path string - Full path of the namespace to add the compliance framework to.
- template_
id string - Unique identifier of the template to create the framework from. In the format of:
gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/<template id>
- color String
- Override the color 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
- Override the description of the compliance framework.
- framework
Id String - Globally unique ID of the compliance framework.
- name String
- Override the name of the compliance framework.
- namespace
Path String - Full path of the namespace to add the compliance framework to.
- template
Id String - Unique identifier of the template to create the framework from. In the format of:
gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/<template id>
- color string
- Override the color 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
- Override the description of the compliance framework.
- framework
Id string - Globally unique ID of the compliance framework.
- name string
- Override the name of the compliance framework.
- namespace
Path string - Full path of the namespace to add the compliance framework to.
- template
Id string - Unique identifier of the template to create the framework from. In the format of:
gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/<template id>
- color str
- Override the color 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
- Override the description of the compliance framework.
- framework_
id str - Globally unique ID of the compliance framework.
- name str
- Override the name of the compliance framework.
- namespace_
path str - Full path of the namespace to add the compliance framework to.
- template_
id str - Unique identifier of the template to create the framework from. In the format of:
gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/<template id>
- color String
- Override the color 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
- Override the description of the compliance framework.
- framework
Id String - Globally unique ID of the compliance framework.
- name String
- Override the name of the compliance framework.
- namespace
Path String - Full path of the namespace to add the compliance framework to.
- template
Id String - Unique identifier of the template to create the framework from. In the format of:
gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/<template id>
Import
Starting in Terraform v1.5.0, you can use an import block to import gitlab.ComplianceFrameworkFromTemplate. For example:
Importing using the CLI is supported with the following syntax:
Gitlab compliance frameworks created from templates can be imported with a key composed of <namespace_path>|<framework_id>|<template_id>, for example:
$ pulumi import gitlab:index/complianceFrameworkFromTemplate:ComplianceFrameworkFromTemplate sample "top-level-group|gid://gitlab/ComplianceManagement::Framework/12345|gid://gitlab/ComplianceManagement::Frameworks::TemplateRegistry::Template/soc2"
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
gitlabTerraform Provider.
published on Saturday, Sep 19, 2026 by Pulumi