Skip to content

Commit 618f523

Browse files
authored
Merge pull request #1223 from PatrickRice-KSC/update_project_template_docs
Update documentation for template resources
2 parents 1ae9f34 + 4fd0c5d commit 618f523

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

docs/resources/group_project_file_template.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,21 @@ page_title: "gitlab_group_project_file_template Resource - terraform-provider-gi
44
subcategory: ""
55
description: |-
66
The gitlab_group_project_file_template resource allows setting a project from which
7-
custom file templates will be loaded. The project selected must be a direct child of the group identified.
7+
custom file templates will be loaded. In order to use this resource, the project selected must be a direct child of
8+
the group selected. After the resource has run, gitlab_project_template.template_project_id is available for use.
89
For more information about which file types are available as templates, view
9-
GitLab's documentation https://docs.gitlab.com/ee/user/admin_area/settings/instance_template_repository.html#supported-file-types-and-locations
10+
GitLab's documentation https://docs.gitlab.com/ee/user/group/custom_project_templates.html
1011
-> This resource requires a GitLab Enterprise instance with a Premium license.
1112
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/groups.html#update-group
1213
---
1314

1415
# gitlab_group_project_file_template (Resource)
1516

1617
The `gitlab_group_project_file_template` resource allows setting a project from which
17-
custom file templates will be loaded. The project selected must be a direct child of the group identified.
18+
custom file templates will be loaded. In order to use this resource, the project selected must be a direct child of
19+
the group selected. After the resource has run, `gitlab_project_template.template_project_id` is available for use.
1820
For more information about which file types are available as templates, view
19-
[GitLab's documentation](https://docs.gitlab.com/ee/user/admin_area/settings/instance_template_repository.html#supported-file-types-and-locations)
21+
[GitLab's documentation](https://docs.gitlab.com/ee/user/group/custom_project_templates.html)
2022

2123
-> This resource requires a GitLab Enterprise instance with a Premium license.
2224

docs/resources/project.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ This attribute is only used during resource creation, thus changes are suppresse
146146
- `squash_option` (String) Squash commits when merge request. Valid values are `never`, `always`, `default_on`, or `default_off`. The default value is `default_off`. [GitLab >= 14.1]
147147
- `tags` (Set of String) The list of tags for a project; put array of tags, that should be finally assigned to a project. Use topics instead.
148148
- `template_name` (String) When used without use_custom_template, name of a built-in project template. When used with use_custom_template, name of a custom project template. This option is mutually exclusive with `template_project_id`.
149-
- `template_project_id` (Number) When used with use_custom_template, project ID of a custom project template. This is preferable to using template_name since template_name may be ambiguous (enterprise edition). This option is mutually exclusive with `template_name`.
149+
- `template_project_id` (Number) When used with use_custom_template, project ID of a custom project template. This is preferable to using template_name since template_name may be ambiguous (enterprise edition). This option is mutually exclusive with `template_name`. See `gitlab_group_project_file_template` to set a project as a template project. If a project has not been set as a template, using it here will result in an error.
150150
- `topics` (Set of String) The list of topics for the project.
151151
- `use_custom_template` (Boolean) Use either custom instance or group (with group_with_project_templates_id) project template (enterprise edition).
152152
- `visibility_level` (String) Set to `public` to create a public project.

internal/provider/resource_gitlab_group_project_file_template.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ import (
1414
var _ = registerResource("gitlab_group_project_file_template", func() *schema.Resource {
1515
return &schema.Resource{
1616
Description: `The ` + "`gitlab_group_project_file_template`" + ` resource allows setting a project from which
17-
custom file templates will be loaded. The project selected must be a direct child of the group identified.
17+
custom file templates will be loaded. In order to use this resource, the project selected must be a direct child of
18+
the group selected. After the resource has run, ` + "`gitlab_project_template.template_project_id`" + ` is available for use.
1819
For more information about which file types are available as templates, view
19-
[GitLab's documentation](https://docs.gitlab.com/ee/user/admin_area/settings/instance_template_repository.html#supported-file-types-and-locations)
20+
[GitLab's documentation](https://docs.gitlab.com/ee/user/group/custom_project_templates.html)
2021
2122
-> This resource requires a GitLab Enterprise instance with a Premium license.
2223

internal/provider/resource_gitlab_project.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ var resourceGitLabProjectSchema = map[string]*schema.Schema{
317317
ForceNew: true,
318318
},
319319
"template_project_id": {
320-
Description: "When used with use_custom_template, project ID of a custom project template. This is preferable to using template_name since template_name may be ambiguous (enterprise edition). This option is mutually exclusive with `template_name`.",
320+
Description: "When used with use_custom_template, project ID of a custom project template. This is preferable to using template_name since template_name may be ambiguous (enterprise edition). This option is mutually exclusive with `template_name`. See `gitlab_group_project_file_template` to set a project as a template project. If a project has not been set as a template, using it here will result in an error.",
321321
Type: schema.TypeInt,
322322
Optional: true,
323323
ConflictsWith: []string{"template_name"},

0 commit comments

Comments
 (0)