published on Wednesday, Aug 26, 2026 by Pulumi
published on Wednesday, Aug 26, 2026 by Pulumi
The gitlab.ComplianceRequirement resource allows managing the lifecycle of a compliance requirement within a compliance framework.
Compliance requirements define specific compliance conditions that projects must meet, with associated controls that specify how compliance is verified.
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";
// Example: Create a compliance requirement with an internal control
const internalControl = new gitlab.ComplianceRequirement("internal_control", {
frameworkId: example.frameworkId,
namespacePath: example.namespacePath,
name: "Dependency Scanning Required",
description: "Ensures dependency scanning is enabled and running",
internalControls: [{
name: "scanner_dep_scanning_running",
expression: {
field: "scanner_dep_scanning_running",
operator: "=",
value: "true",
},
}],
});
// Example: Create a compliance requirement with an external control
const externalControl = new gitlab.ComplianceRequirement("external_control", {
frameworkId: example.frameworkId,
namespacePath: example.namespacePath,
name: "External Security Check",
description: "Verifies compliance via an external security service",
externalControls: [{
externalUrl: "https://example.com/compliance-check",
secretToken: "my-secret-token",
pingEnabled: true,
}],
});
// Example: Create a compliance requirement with an external control with all options
const externalControlAllOptions = new gitlab.ComplianceRequirement("external_control_all_options", {
frameworkId: example.frameworkId,
namespacePath: example.namespacePath,
name: "External Security Check with All Options",
description: "Verifies compliance via an external security service with all options configured",
externalControls: [{
externalUrl: "https://example.com/compliance-check",
secretToken: "my-secret-token",
externalControlName: "My External Control",
pingEnabled: false,
}],
});
// Example: Create a compliance requriement with both internal and external controls
const internalAndExternalControls = new gitlab.ComplianceRequirement("internal_and_external_controls", {
frameworkId: example.frameworkId,
namespacePath: example.namespacePath,
name: "Combined Security Check",
description: "Verifies compliance via both internal and external controls",
internalControls: [{
name: "scanner_dep_scanning_running",
expression: {
field: "scanner_dep_scanning_running",
operator: "=",
value: "true",
},
}],
externalControls: [{
externalUrl: "https://example.com/compliance-check",
secretToken: "my-secret-token",
pingEnabled: true,
}],
});
import pulumi
import pulumi_gitlab as gitlab
# Example: Create a compliance requirement with an internal control
internal_control = gitlab.ComplianceRequirement("internal_control",
framework_id=example["frameworkId"],
namespace_path=example["namespacePath"],
name="Dependency Scanning Required",
description="Ensures dependency scanning is enabled and running",
internal_controls=[{
"name": "scanner_dep_scanning_running",
"expression": {
"field": "scanner_dep_scanning_running",
"operator": "=",
"value": "true",
},
}])
# Example: Create a compliance requirement with an external control
external_control = gitlab.ComplianceRequirement("external_control",
framework_id=example["frameworkId"],
namespace_path=example["namespacePath"],
name="External Security Check",
description="Verifies compliance via an external security service",
external_controls=[{
"external_url": "https://example.com/compliance-check",
"secret_token": "my-secret-token",
"ping_enabled": True,
}])
# Example: Create a compliance requirement with an external control with all options
external_control_all_options = gitlab.ComplianceRequirement("external_control_all_options",
framework_id=example["frameworkId"],
namespace_path=example["namespacePath"],
name="External Security Check with All Options",
description="Verifies compliance via an external security service with all options configured",
external_controls=[{
"external_url": "https://example.com/compliance-check",
"secret_token": "my-secret-token",
"external_control_name": "My External Control",
"ping_enabled": False,
}])
# Example: Create a compliance requriement with both internal and external controls
internal_and_external_controls = gitlab.ComplianceRequirement("internal_and_external_controls",
framework_id=example["frameworkId"],
namespace_path=example["namespacePath"],
name="Combined Security Check",
description="Verifies compliance via both internal and external controls",
internal_controls=[{
"name": "scanner_dep_scanning_running",
"expression": {
"field": "scanner_dep_scanning_running",
"operator": "=",
"value": "true",
},
}],
external_controls=[{
"external_url": "https://example.com/compliance-check",
"secret_token": "my-secret-token",
"ping_enabled": True,
}])
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 {
// Example: Create a compliance requirement with an internal control
_, err := gitlab.NewComplianceRequirement(ctx, "internal_control", &gitlab.ComplianceRequirementArgs{
FrameworkId: pulumi.Any(example.FrameworkId),
NamespacePath: pulumi.Any(example.NamespacePath),
Name: pulumi.String("Dependency Scanning Required"),
Description: pulumi.String("Ensures dependency scanning is enabled and running"),
InternalControls: gitlab.ComplianceRequirementInternalControlArray{
&gitlab.ComplianceRequirementInternalControlArgs{
Name: pulumi.String("scanner_dep_scanning_running"),
Expression: &gitlab.ComplianceRequirementInternalControlExpressionArgs{
Field: pulumi.String("scanner_dep_scanning_running"),
Operator: pulumi.String("="),
Value: pulumi.String("true"),
},
},
},
})
if err != nil {
return err
}
// Example: Create a compliance requirement with an external control
_, err = gitlab.NewComplianceRequirement(ctx, "external_control", &gitlab.ComplianceRequirementArgs{
FrameworkId: pulumi.Any(example.FrameworkId),
NamespacePath: pulumi.Any(example.NamespacePath),
Name: pulumi.String("External Security Check"),
Description: pulumi.String("Verifies compliance via an external security service"),
ExternalControls: gitlab.ComplianceRequirementExternalControlArray{
&gitlab.ComplianceRequirementExternalControlArgs{
ExternalUrl: pulumi.String("https://example.com/compliance-check"),
SecretToken: pulumi.String("my-secret-token"),
PingEnabled: pulumi.Bool(true),
},
},
})
if err != nil {
return err
}
// Example: Create a compliance requirement with an external control with all options
_, err = gitlab.NewComplianceRequirement(ctx, "external_control_all_options", &gitlab.ComplianceRequirementArgs{
FrameworkId: pulumi.Any(example.FrameworkId),
NamespacePath: pulumi.Any(example.NamespacePath),
Name: pulumi.String("External Security Check with All Options"),
Description: pulumi.String("Verifies compliance via an external security service with all options configured"),
ExternalControls: gitlab.ComplianceRequirementExternalControlArray{
&gitlab.ComplianceRequirementExternalControlArgs{
ExternalUrl: pulumi.String("https://example.com/compliance-check"),
SecretToken: pulumi.String("my-secret-token"),
ExternalControlName: pulumi.String("My External Control"),
PingEnabled: pulumi.Bool(false),
},
},
})
if err != nil {
return err
}
// Example: Create a compliance requriement with both internal and external controls
_, err = gitlab.NewComplianceRequirement(ctx, "internal_and_external_controls", &gitlab.ComplianceRequirementArgs{
FrameworkId: pulumi.Any(example.FrameworkId),
NamespacePath: pulumi.Any(example.NamespacePath),
Name: pulumi.String("Combined Security Check"),
Description: pulumi.String("Verifies compliance via both internal and external controls"),
InternalControls: gitlab.ComplianceRequirementInternalControlArray{
&gitlab.ComplianceRequirementInternalControlArgs{
Name: pulumi.String("scanner_dep_scanning_running"),
Expression: &gitlab.ComplianceRequirementInternalControlExpressionArgs{
Field: pulumi.String("scanner_dep_scanning_running"),
Operator: pulumi.String("="),
Value: pulumi.String("true"),
},
},
},
ExternalControls: gitlab.ComplianceRequirementExternalControlArray{
&gitlab.ComplianceRequirementExternalControlArgs{
ExternalUrl: pulumi.String("https://example.com/compliance-check"),
SecretToken: pulumi.String("my-secret-token"),
PingEnabled: pulumi.Bool(true),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
// Example: Create a compliance requirement with an internal control
var internalControl = new GitLab.ComplianceRequirement("internal_control", new()
{
FrameworkId = example.FrameworkId,
NamespacePath = example.NamespacePath,
Name = "Dependency Scanning Required",
Description = "Ensures dependency scanning is enabled and running",
InternalControls = new[]
{
new GitLab.Inputs.ComplianceRequirementInternalControlArgs
{
Name = "scanner_dep_scanning_running",
Expression = new GitLab.Inputs.ComplianceRequirementInternalControlExpressionArgs
{
Field = "scanner_dep_scanning_running",
Operator = "=",
Value = "true",
},
},
},
});
// Example: Create a compliance requirement with an external control
var externalControl = new GitLab.ComplianceRequirement("external_control", new()
{
FrameworkId = example.FrameworkId,
NamespacePath = example.NamespacePath,
Name = "External Security Check",
Description = "Verifies compliance via an external security service",
ExternalControls = new[]
{
new GitLab.Inputs.ComplianceRequirementExternalControlArgs
{
ExternalUrl = "https://example.com/compliance-check",
SecretToken = "my-secret-token",
PingEnabled = true,
},
},
});
// Example: Create a compliance requirement with an external control with all options
var externalControlAllOptions = new GitLab.ComplianceRequirement("external_control_all_options", new()
{
FrameworkId = example.FrameworkId,
NamespacePath = example.NamespacePath,
Name = "External Security Check with All Options",
Description = "Verifies compliance via an external security service with all options configured",
ExternalControls = new[]
{
new GitLab.Inputs.ComplianceRequirementExternalControlArgs
{
ExternalUrl = "https://example.com/compliance-check",
SecretToken = "my-secret-token",
ExternalControlName = "My External Control",
PingEnabled = false,
},
},
});
// Example: Create a compliance requriement with both internal and external controls
var internalAndExternalControls = new GitLab.ComplianceRequirement("internal_and_external_controls", new()
{
FrameworkId = example.FrameworkId,
NamespacePath = example.NamespacePath,
Name = "Combined Security Check",
Description = "Verifies compliance via both internal and external controls",
InternalControls = new[]
{
new GitLab.Inputs.ComplianceRequirementInternalControlArgs
{
Name = "scanner_dep_scanning_running",
Expression = new GitLab.Inputs.ComplianceRequirementInternalControlExpressionArgs
{
Field = "scanner_dep_scanning_running",
Operator = "=",
Value = "true",
},
},
},
ExternalControls = new[]
{
new GitLab.Inputs.ComplianceRequirementExternalControlArgs
{
ExternalUrl = "https://example.com/compliance-check",
SecretToken = "my-secret-token",
PingEnabled = true,
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.ComplianceRequirement;
import com.pulumi.gitlab.ComplianceRequirementArgs;
import com.pulumi.gitlab.inputs.ComplianceRequirementInternalControlArgs;
import com.pulumi.gitlab.inputs.ComplianceRequirementInternalControlExpressionArgs;
import com.pulumi.gitlab.inputs.ComplianceRequirementExternalControlArgs;
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) {
// Example: Create a compliance requirement with an internal control
var internalControl = new ComplianceRequirement("internalControl", ComplianceRequirementArgs.builder()
.frameworkId(example.frameworkId())
.namespacePath(example.namespacePath())
.name("Dependency Scanning Required")
.description("Ensures dependency scanning is enabled and running")
.internalControls(ComplianceRequirementInternalControlArgs.builder()
.name("scanner_dep_scanning_running")
.expression(ComplianceRequirementInternalControlExpressionArgs.builder()
.field("scanner_dep_scanning_running")
.operator("=")
.value("true")
.build())
.build())
.build());
// Example: Create a compliance requirement with an external control
var externalControl = new ComplianceRequirement("externalControl", ComplianceRequirementArgs.builder()
.frameworkId(example.frameworkId())
.namespacePath(example.namespacePath())
.name("External Security Check")
.description("Verifies compliance via an external security service")
.externalControls(ComplianceRequirementExternalControlArgs.builder()
.externalUrl("https://example.com/compliance-check")
.secretToken("my-secret-token")
.pingEnabled(true)
.build())
.build());
// Example: Create a compliance requirement with an external control with all options
var externalControlAllOptions = new ComplianceRequirement("externalControlAllOptions", ComplianceRequirementArgs.builder()
.frameworkId(example.frameworkId())
.namespacePath(example.namespacePath())
.name("External Security Check with All Options")
.description("Verifies compliance via an external security service with all options configured")
.externalControls(ComplianceRequirementExternalControlArgs.builder()
.externalUrl("https://example.com/compliance-check")
.secretToken("my-secret-token")
.externalControlName("My External Control")
.pingEnabled(false)
.build())
.build());
// Example: Create a compliance requriement with both internal and external controls
var internalAndExternalControls = new ComplianceRequirement("internalAndExternalControls", ComplianceRequirementArgs.builder()
.frameworkId(example.frameworkId())
.namespacePath(example.namespacePath())
.name("Combined Security Check")
.description("Verifies compliance via both internal and external controls")
.internalControls(ComplianceRequirementInternalControlArgs.builder()
.name("scanner_dep_scanning_running")
.expression(ComplianceRequirementInternalControlExpressionArgs.builder()
.field("scanner_dep_scanning_running")
.operator("=")
.value("true")
.build())
.build())
.externalControls(ComplianceRequirementExternalControlArgs.builder()
.externalUrl("https://example.com/compliance-check")
.secretToken("my-secret-token")
.pingEnabled(true)
.build())
.build());
}
}
resources:
# Example: Create a compliance requirement with an internal control
internalControl:
type: gitlab:ComplianceRequirement
name: internal_control
properties:
frameworkId: ${example.frameworkId}
namespacePath: ${example.namespacePath}
name: Dependency Scanning Required
description: Ensures dependency scanning is enabled and running
internalControls:
- name: scanner_dep_scanning_running
expression:
field: scanner_dep_scanning_running
operator: =
value: 'true'
# Example: Create a compliance requirement with an external control
externalControl:
type: gitlab:ComplianceRequirement
name: external_control
properties:
frameworkId: ${example.frameworkId}
namespacePath: ${example.namespacePath}
name: External Security Check
description: Verifies compliance via an external security service
externalControls:
- externalUrl: https://example.com/compliance-check
secretToken: my-secret-token
pingEnabled: true
# Example: Create a compliance requirement with an external control with all options
externalControlAllOptions:
type: gitlab:ComplianceRequirement
name: external_control_all_options
properties:
frameworkId: ${example.frameworkId}
namespacePath: ${example.namespacePath}
name: External Security Check with All Options
description: Verifies compliance via an external security service with all options configured
externalControls:
- externalUrl: https://example.com/compliance-check
secretToken: my-secret-token
externalControlName: My External Control
pingEnabled: false
# Example: Create a compliance requriement with both internal and external controls
internalAndExternalControls:
type: gitlab:ComplianceRequirement
name: internal_and_external_controls
properties:
frameworkId: ${example.frameworkId}
namespacePath: ${example.namespacePath}
name: Combined Security Check
description: Verifies compliance via both internal and external controls
internalControls:
- name: scanner_dep_scanning_running
expression:
field: scanner_dep_scanning_running
operator: =
value: 'true'
externalControls:
- externalUrl: https://example.com/compliance-check
secretToken: my-secret-token
pingEnabled: true
pulumi {
required_providers {
gitlab = {
source = "pulumi/gitlab"
}
}
}
# Example: Create a compliance requirement with an internal control
resource "gitlab_compliancerequirement" "internal_control" {
framework_id = example.frameworkId
namespace_path = example.namespacePath
name = "Dependency Scanning Required"
description = "Ensures dependency scanning is enabled and running"
internal_controls {
name = "scanner_dep_scanning_running"
expression = {
field = "scanner_dep_scanning_running"
operator = "="
value = "true"
}
}
}
# Example: Create a compliance requirement with an external control
resource "gitlab_compliancerequirement" "external_control" {
framework_id = example.frameworkId
namespace_path = example.namespacePath
name = "External Security Check"
description = "Verifies compliance via an external security service"
external_controls {
external_url = "https://example.com/compliance-check"
secret_token = "my-secret-token"
ping_enabled = true
}
}
# Example: Create a compliance requirement with an external control with all options
resource "gitlab_compliancerequirement" "external_control_all_options" {
framework_id = example.frameworkId
namespace_path = example.namespacePath
name = "External Security Check with All Options"
description = "Verifies compliance via an external security service with all options configured"
external_controls {
external_url = "https://example.com/compliance-check"
secret_token = "my-secret-token"
external_control_name = "My External Control"
ping_enabled = false
}
}
# Example: Create a compliance requriement with both internal and external controls
resource "gitlab_compliancerequirement" "internal_and_external_controls" {
framework_id = example.frameworkId
namespace_path = example.namespacePath
name = "Combined Security Check"
description = "Verifies compliance via both internal and external controls"
internal_controls {
name = "scanner_dep_scanning_running"
expression = {
field = "scanner_dep_scanning_running"
operator = "="
value = "true"
}
}
external_controls {
external_url = "https://example.com/compliance-check"
secret_token = "my-secret-token"
ping_enabled = true
}
}
Create ComplianceRequirement Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ComplianceRequirement(name: string, args: ComplianceRequirementArgs, opts?: CustomResourceOptions);@overload
def ComplianceRequirement(resource_name: str,
args: ComplianceRequirementArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ComplianceRequirement(resource_name: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
framework_id: Optional[str] = None,
namespace_path: Optional[str] = None,
external_controls: Optional[Sequence[ComplianceRequirementExternalControlArgs]] = None,
internal_controls: Optional[Sequence[ComplianceRequirementInternalControlArgs]] = None,
name: Optional[str] = None)func NewComplianceRequirement(ctx *Context, name string, args ComplianceRequirementArgs, opts ...ResourceOption) (*ComplianceRequirement, error)public ComplianceRequirement(string name, ComplianceRequirementArgs args, CustomResourceOptions? opts = null)
public ComplianceRequirement(String name, ComplianceRequirementArgs args)
public ComplianceRequirement(String name, ComplianceRequirementArgs args, CustomResourceOptions options)
type: gitlab:ComplianceRequirement
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "gitlab_compliance_requirement" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args ComplianceRequirementArgs
- 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 ComplianceRequirementArgs
- 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 ComplianceRequirementArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ComplianceRequirementArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ComplianceRequirementArgs
- 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 complianceRequirementResource = new GitLab.ComplianceRequirement("complianceRequirementResource", new()
{
Description = "string",
FrameworkId = "string",
NamespacePath = "string",
ExternalControls = new[]
{
new GitLab.Inputs.ComplianceRequirementExternalControlArgs
{
ExternalUrl = "string",
PingEnabled = false,
SecretToken = "string",
ExternalControlName = "string",
Id = "string",
Name = "string",
},
},
InternalControls = new[]
{
new GitLab.Inputs.ComplianceRequirementInternalControlArgs
{
Expression = new GitLab.Inputs.ComplianceRequirementInternalControlExpressionArgs
{
Field = "string",
Operator = "string",
Value = "string",
},
Name = "string",
Id = "string",
},
},
Name = "string",
});
example, err := gitlab.NewComplianceRequirement(ctx, "complianceRequirementResource", &gitlab.ComplianceRequirementArgs{
Description: pulumi.String("string"),
FrameworkId: pulumi.String("string"),
NamespacePath: pulumi.String("string"),
ExternalControls: gitlab.ComplianceRequirementExternalControlArray{
&gitlab.ComplianceRequirementExternalControlArgs{
ExternalUrl: pulumi.String("string"),
PingEnabled: pulumi.Bool(false),
SecretToken: pulumi.String("string"),
ExternalControlName: pulumi.String("string"),
Id: pulumi.String("string"),
Name: pulumi.String("string"),
},
},
InternalControls: gitlab.ComplianceRequirementInternalControlArray{
&gitlab.ComplianceRequirementInternalControlArgs{
Expression: &gitlab.ComplianceRequirementInternalControlExpressionArgs{
Field: pulumi.String("string"),
Operator: pulumi.String("string"),
Value: pulumi.String("string"),
},
Name: pulumi.String("string"),
Id: pulumi.String("string"),
},
},
Name: pulumi.String("string"),
})
resource "gitlab_compliance_requirement" "complianceRequirementResource" {
lifecycle {
create_before_destroy = true
}
description = "string"
framework_id = "string"
namespace_path = "string"
external_controls {
external_url = "string"
ping_enabled = false
secret_token = "string"
external_control_name = "string"
id = "string"
name = "string"
}
internal_controls {
expression = {
field = "string"
operator = "string"
value = "string"
}
name = "string"
id = "string"
}
name = "string"
}
var complianceRequirementResource = new ComplianceRequirement("complianceRequirementResource", ComplianceRequirementArgs.builder()
.description("string")
.frameworkId("string")
.namespacePath("string")
.externalControls(ComplianceRequirementExternalControlArgs.builder()
.externalUrl("string")
.pingEnabled(false)
.secretToken("string")
.externalControlName("string")
.id("string")
.name("string")
.build())
.internalControls(ComplianceRequirementInternalControlArgs.builder()
.expression(ComplianceRequirementInternalControlExpressionArgs.builder()
.field("string")
.operator("string")
.value("string")
.build())
.name("string")
.id("string")
.build())
.name("string")
.build());
compliance_requirement_resource = gitlab.ComplianceRequirement("complianceRequirementResource",
description="string",
framework_id="string",
namespace_path="string",
external_controls=[{
"external_url": "string",
"ping_enabled": False,
"secret_token": "string",
"external_control_name": "string",
"id": "string",
"name": "string",
}],
internal_controls=[{
"expression": {
"field": "string",
"operator": "string",
"value": "string",
},
"name": "string",
"id": "string",
}],
name="string")
const complianceRequirementResource = new gitlab.ComplianceRequirement("complianceRequirementResource", {
description: "string",
frameworkId: "string",
namespacePath: "string",
externalControls: [{
externalUrl: "string",
pingEnabled: false,
secretToken: "string",
externalControlName: "string",
id: "string",
name: "string",
}],
internalControls: [{
expression: {
field: "string",
operator: "string",
value: "string",
},
name: "string",
id: "string",
}],
name: "string",
});
type: gitlab:ComplianceRequirement
properties:
description: string
externalControls:
- externalControlName: string
externalUrl: string
id: string
name: string
pingEnabled: false
secretToken: string
frameworkId: string
internalControls:
- expression:
field: string
operator: string
value: string
id: string
name: string
name: string
namespacePath: string
ComplianceRequirement 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 ComplianceRequirement resource accepts the following input properties:
- Description string
- Description for the compliance requirement.
- Framework
Id string - The globally unique ID of the compliance framework to add the requirement to.
- Namespace
Path string - Full path of the namespace where the compliance framework resides.
- External
Controls List<Pulumi.Git Lab. Inputs. Compliance Requirement External Control> - Set of external controls for this compliance requirement. Controls define how compliance is verified.
- Internal
Controls List<Pulumi.Git Lab. Inputs. Compliance Requirement Internal Control> - Set of internal controls for this compliance requirement. Controls define how compliance is verified.
- Name string
- Name for the compliance requirement.
- Description string
- Description for the compliance requirement.
- Framework
Id string - The globally unique ID of the compliance framework to add the requirement to.
- Namespace
Path string - Full path of the namespace where the compliance framework resides.
- External
Controls []ComplianceRequirement External Control Args - Set of external controls for this compliance requirement. Controls define how compliance is verified.
- Internal
Controls []ComplianceRequirement Internal Control Args - Set of internal controls for this compliance requirement. Controls define how compliance is verified.
- Name string
- Name for the compliance requirement.
- description string
- Description for the compliance requirement.
- framework_
id string - The globally unique ID of the compliance framework to add the requirement to.
- namespace_
path string - Full path of the namespace where the compliance framework resides.
- external_
controls list(object) - Set of external controls for this compliance requirement. Controls define how compliance is verified.
- internal_
controls list(object) - Set of internal controls for this compliance requirement. Controls define how compliance is verified.
- name string
- Name for the compliance requirement.
- description String
- Description for the compliance requirement.
- framework
Id String - The globally unique ID of the compliance framework to add the requirement to.
- namespace
Path String - Full path of the namespace where the compliance framework resides.
- external
Controls List<ComplianceRequirement External Control> - Set of external controls for this compliance requirement. Controls define how compliance is verified.
- internal
Controls List<ComplianceRequirement Internal Control> - Set of internal controls for this compliance requirement. Controls define how compliance is verified.
- name String
- Name for the compliance requirement.
- description string
- Description for the compliance requirement.
- framework
Id string - The globally unique ID of the compliance framework to add the requirement to.
- namespace
Path string - Full path of the namespace where the compliance framework resides.
- external
Controls ComplianceRequirement External Control[] - Set of external controls for this compliance requirement. Controls define how compliance is verified.
- internal
Controls ComplianceRequirement Internal Control[] - Set of internal controls for this compliance requirement. Controls define how compliance is verified.
- name string
- Name for the compliance requirement.
- description str
- Description for the compliance requirement.
- framework_
id str - The globally unique ID of the compliance framework to add the requirement to.
- namespace_
path str - Full path of the namespace where the compliance framework resides.
- external_
controls Sequence[ComplianceRequirement External Control Args] - Set of external controls for this compliance requirement. Controls define how compliance is verified.
- internal_
controls Sequence[ComplianceRequirement Internal Control Args] - Set of internal controls for this compliance requirement. Controls define how compliance is verified.
- name str
- Name for the compliance requirement.
- description String
- Description for the compliance requirement.
- framework
Id String - The globally unique ID of the compliance framework to add the requirement to.
- namespace
Path String - Full path of the namespace where the compliance framework resides.
- external
Controls List<Property Map> - Set of external controls for this compliance requirement. Controls define how compliance is verified.
- internal
Controls List<Property Map> - Set of internal controls for this compliance requirement. Controls define how compliance is verified.
- name String
- Name for the compliance requirement.
Outputs
All input properties are implicitly available as output properties. Additionally, the ComplianceRequirement 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 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 ComplianceRequirement Resource
Get an existing ComplianceRequirement 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?: ComplianceRequirementState, opts?: CustomResourceOptions): ComplianceRequirement@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
external_controls: Optional[Sequence[ComplianceRequirementExternalControlArgs]] = None,
framework_id: Optional[str] = None,
internal_controls: Optional[Sequence[ComplianceRequirementInternalControlArgs]] = None,
name: Optional[str] = None,
namespace_path: Optional[str] = None) -> ComplianceRequirementfunc GetComplianceRequirement(ctx *Context, name string, id IDInput, state *ComplianceRequirementState, opts ...ResourceOption) (*ComplianceRequirement, error)public static ComplianceRequirement Get(string name, Input<string> id, ComplianceRequirementState? state, CustomResourceOptions? opts = null)public static ComplianceRequirement get(String name, Output<String> id, ComplianceRequirementState state, CustomResourceOptions options)resources: _: type: gitlab:ComplianceRequirement get: id: ${id}import {
to = gitlab_compliance_requirement.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.
- Description string
- Description for the compliance requirement.
- External
Controls List<Pulumi.Git Lab. Inputs. Compliance Requirement External Control> - Set of external controls for this compliance requirement. Controls define how compliance is verified.
- Framework
Id string - The globally unique ID of the compliance framework to add the requirement to.
- Internal
Controls List<Pulumi.Git Lab. Inputs. Compliance Requirement Internal Control> - Set of internal controls for this compliance requirement. Controls define how compliance is verified.
- Name string
- Name for the compliance requirement.
- Namespace
Path string - Full path of the namespace where the compliance framework resides.
- Description string
- Description for the compliance requirement.
- External
Controls []ComplianceRequirement External Control Args - Set of external controls for this compliance requirement. Controls define how compliance is verified.
- Framework
Id string - The globally unique ID of the compliance framework to add the requirement to.
- Internal
Controls []ComplianceRequirement Internal Control Args - Set of internal controls for this compliance requirement. Controls define how compliance is verified.
- Name string
- Name for the compliance requirement.
- Namespace
Path string - Full path of the namespace where the compliance framework resides.
- description string
- Description for the compliance requirement.
- external_
controls list(object) - Set of external controls for this compliance requirement. Controls define how compliance is verified.
- framework_
id string - The globally unique ID of the compliance framework to add the requirement to.
- internal_
controls list(object) - Set of internal controls for this compliance requirement. Controls define how compliance is verified.
- name string
- Name for the compliance requirement.
- namespace_
path string - Full path of the namespace where the compliance framework resides.
- description String
- Description for the compliance requirement.
- external
Controls List<ComplianceRequirement External Control> - Set of external controls for this compliance requirement. Controls define how compliance is verified.
- framework
Id String - The globally unique ID of the compliance framework to add the requirement to.
- internal
Controls List<ComplianceRequirement Internal Control> - Set of internal controls for this compliance requirement. Controls define how compliance is verified.
- name String
- Name for the compliance requirement.
- namespace
Path String - Full path of the namespace where the compliance framework resides.
- description string
- Description for the compliance requirement.
- external
Controls ComplianceRequirement External Control[] - Set of external controls for this compliance requirement. Controls define how compliance is verified.
- framework
Id string - The globally unique ID of the compliance framework to add the requirement to.
- internal
Controls ComplianceRequirement Internal Control[] - Set of internal controls for this compliance requirement. Controls define how compliance is verified.
- name string
- Name for the compliance requirement.
- namespace
Path string - Full path of the namespace where the compliance framework resides.
- description str
- Description for the compliance requirement.
- external_
controls Sequence[ComplianceRequirement External Control Args] - Set of external controls for this compliance requirement. Controls define how compliance is verified.
- framework_
id str - The globally unique ID of the compliance framework to add the requirement to.
- internal_
controls Sequence[ComplianceRequirement Internal Control Args] - Set of internal controls for this compliance requirement. Controls define how compliance is verified.
- name str
- Name for the compliance requirement.
- namespace_
path str - Full path of the namespace where the compliance framework resides.
- description String
- Description for the compliance requirement.
- external
Controls List<Property Map> - Set of external controls for this compliance requirement. Controls define how compliance is verified.
- framework
Id String - The globally unique ID of the compliance framework to add the requirement to.
- internal
Controls List<Property Map> - Set of internal controls for this compliance requirement. Controls define how compliance is verified.
- name String
- Name for the compliance requirement.
- namespace
Path String - Full path of the namespace where the compliance framework resides.
Supporting Types
ComplianceRequirementExternalControl, ComplianceRequirementExternalControlArgs
- External
Url string - External URL for external controls.
- Ping
Enabled bool - Whether ping is enabled for external controls.
- Secret
Token string - Secret token for external controls. The
secretTokenis not available in imported resources. - External
Control stringName - Name of the external control.
- Id string
- Compliance requirements control ID.
- Name string
- Name of the control. Set to
externalControlfrom the API.
- External
Url string - External URL for external controls.
- Ping
Enabled bool - Whether ping is enabled for external controls.
- Secret
Token string - Secret token for external controls. The
secretTokenis not available in imported resources. - External
Control stringName - Name of the external control.
- Id string
- Compliance requirements control ID.
- Name string
- Name of the control. Set to
externalControlfrom the API.
- external_
url string - External URL for external controls.
- ping_
enabled bool - Whether ping is enabled for external controls.
- secret_
token string - Secret token for external controls. The
secretTokenis not available in imported resources. - external_
control_ stringname - Name of the external control.
- id string
- Compliance requirements control ID.
- name string
- Name of the control. Set to
externalControlfrom the API.
- external
Url String - External URL for external controls.
- ping
Enabled Boolean - Whether ping is enabled for external controls.
- secret
Token String - Secret token for external controls. The
secretTokenis not available in imported resources. - external
Control StringName - Name of the external control.
- id String
- Compliance requirements control ID.
- name String
- Name of the control. Set to
externalControlfrom the API.
- external
Url string - External URL for external controls.
- ping
Enabled boolean - Whether ping is enabled for external controls.
- secret
Token string - Secret token for external controls. The
secretTokenis not available in imported resources. - external
Control stringName - Name of the external control.
- id string
- Compliance requirements control ID.
- name string
- Name of the control. Set to
externalControlfrom the API.
- external_
url str - External URL for external controls.
- ping_
enabled bool - Whether ping is enabled for external controls.
- secret_
token str - Secret token for external controls. The
secretTokenis not available in imported resources. - external_
control_ strname - Name of the external control.
- id str
- Compliance requirements control ID.
- name str
- Name of the control. Set to
externalControlfrom the API.
- external
Url String - External URL for external controls.
- ping
Enabled Boolean - Whether ping is enabled for external controls.
- secret
Token String - Secret token for external controls. The
secretTokenis not available in imported resources. - external
Control StringName - Name of the external control.
- id String
- Compliance requirements control ID.
- name String
- Name of the control. Set to
externalControlfrom the API.
ComplianceRequirementInternalControl, ComplianceRequirementInternalControlArgs
- Expression
Pulumi.
Git Lab. Inputs. Compliance Requirement Internal Control Expression - Expression for internal controls.
- Name string
- Name of the control, from the list of Control IDs here: GitLab Compliance Controls
- Id string
- Compliance requirements control ID.
- Expression
Compliance
Requirement Internal Control Expression - Expression for internal controls.
- Name string
- Name of the control, from the list of Control IDs here: GitLab Compliance Controls
- Id string
- Compliance requirements control ID.
- expression object
- Expression for internal controls.
- name string
- Name of the control, from the list of Control IDs here: GitLab Compliance Controls
- id string
- Compliance requirements control ID.
- expression
Compliance
Requirement Internal Control Expression - Expression for internal controls.
- name String
- Name of the control, from the list of Control IDs here: GitLab Compliance Controls
- id String
- Compliance requirements control ID.
- expression
Compliance
Requirement Internal Control Expression - Expression for internal controls.
- name string
- Name of the control, from the list of Control IDs here: GitLab Compliance Controls
- id string
- Compliance requirements control ID.
- expression
Compliance
Requirement Internal Control Expression - Expression for internal controls.
- name str
- Name of the control, from the list of Control IDs here: GitLab Compliance Controls
- id str
- Compliance requirements control ID.
- expression Property Map
- Expression for internal controls.
- name String
- Name of the control, from the list of Control IDs here: GitLab Compliance Controls
- id String
- Compliance requirements control ID.
ComplianceRequirementInternalControlExpression, ComplianceRequirementInternalControlExpressionArgs
Import
Starting in Terraform v1.5.0, you can use an import block to import gitlab.ComplianceRequirement. For example:
Importing using the CLI is supported with the following syntax:
GitLab compliance requirements can be imported using an id made up of <namespace_path>|<framework_id>|<requirement_id>
Both IDs are GraphQL global IDs (GIDs) from GitLab. The pipe separator is used because GIDs contain colons.
$ pulumi import gitlab:index/complianceRequirement:ComplianceRequirement example "top-level-group|gid://gitlab/ComplianceManagement::Framework/123|gid://gitlab/ComplianceManagement::ComplianceRequirement/456"
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 Wednesday, Aug 26, 2026 by Pulumi