|
| 1 | +--- |
| 2 | +# generated by https://github.com/hashicorp/terraform-plugin-docs |
| 3 | +page_title: "gitlab_compliance_framework Resource - terraform-provider-gitlab" |
| 4 | +subcategory: "" |
| 5 | +description: |- |
| 6 | + The gitlab_compliance_framework resource allows to manage the lifecycle of a compliance framework on top-level groups. |
| 7 | + 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. |
| 8 | + -> This resource requires a GitLab Enterprise instance with a Premium license to create the compliance framework. |
| 9 | + -> This resource requires a GitLab Enterprise instance with an Ultimate license to specify a compliance pipeline configuration in the compliance framework. |
| 10 | + Upstream API: GitLab GraphQL API docs https://docs.gitlab.com/ee/api/graphql/reference/#mutationcreatecomplianceframework |
| 11 | +--- |
| 12 | + |
| 13 | +# gitlab_compliance_framework (Resource) |
| 14 | + |
| 15 | +The `gitlab_compliance_framework` resource allows to manage the lifecycle of a compliance framework on top-level groups. |
| 16 | + |
| 17 | +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. |
| 18 | + |
| 19 | +-> This resource requires a GitLab Enterprise instance with a Premium license to create the compliance framework. |
| 20 | + |
| 21 | +-> This resource requires a GitLab Enterprise instance with an Ultimate license to specify a compliance pipeline configuration in the compliance framework. |
| 22 | + |
| 23 | +**Upstream API**: [GitLab GraphQL API docs](https://docs.gitlab.com/ee/api/graphql/reference/#mutationcreatecomplianceframework) |
| 24 | + |
| 25 | +## Example Usage |
| 26 | + |
| 27 | +```terraform |
| 28 | +resource "gitlab_compliance_framework" "sample" { |
| 29 | + namespace_path = "top-level-group" |
| 30 | + name = "HIPAA" |
| 31 | + description = "A HIPAA Compliance Framework" |
| 32 | + color = "#87BEEF" |
| 33 | + default = false |
| 34 | + pipeline_configuration_full_path = ".hipaa.yml@top-level-group/compliance-frameworks" |
| 35 | +} |
| 36 | +``` |
| 37 | + |
| 38 | +<!-- schema generated by tfplugindocs --> |
| 39 | +## Schema |
| 40 | + |
| 41 | +### Required |
| 42 | + |
| 43 | +- `color` (String) New color representation of the compliance framework in hex format. e.g. #FCA121. |
| 44 | +- `description` (String) Description for the compliance framework. |
| 45 | +- `name` (String) Name for the compliance framework. |
| 46 | +- `namespace_path` (String) Full path of the namespace to add the compliance framework to. |
| 47 | + |
| 48 | +### Optional |
| 49 | + |
| 50 | +- `default` (Boolean) Set this compliance framework as the default framework for the group. Default: `false` |
| 51 | +- `pipeline_configuration_full_path` (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. |
| 52 | + |
| 53 | +### Read-Only |
| 54 | + |
| 55 | +- `framework_id` (String) Globally unique ID of the compliance framework. |
| 56 | +- `id` (String) The ID of this Terraform resource. In the format of `<namespace_path>:<framework_id>`. |
| 57 | + |
| 58 | +## Import |
| 59 | + |
| 60 | +Import is supported using the following syntax: |
| 61 | + |
| 62 | +```shell |
| 63 | +# Gitlab compliance frameworks can be imported with a key composed of `<namespace_path>:<framework_id>`, e.g. |
| 64 | +terraform import gitlab_compliance_framework.sample "top-level-group:gid://gitlab/ComplianceManagement::Framework/12345" |
| 65 | +``` |
0 commit comments