Skip to content

Commit 08f1322

Browse files
committed
Document that ref is not available for imported gitlab_project_tag resources
1 parent 0adf6ac commit 08f1322

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

docs/resources/project_tag.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: |-
1010
# gitlab_project_tag (Resource)
1111

1212
This resource allows you to create and manage GitLab tags.
13-
13+
1414
**Upstream API** : [GitLab API docs](https://docs.gitlab.com/ee/api/tags.html)
1515

1616
## Example Usage
@@ -37,7 +37,7 @@ resource "gitlab_project_tag" "example" {
3737

3838
- **name** (String) The name of a tag.
3939
- **project** (String) The ID or URL-encoded path of the project owned by the authenticated user.
40-
- **ref** (String) Create tag using commit SHA, another tag name, or branch name.
40+
- **ref** (String) Create tag using commit SHA, another tag name, or branch name. This attribute is not available for imported resources.
4141

4242
### Optional
4343

@@ -84,4 +84,6 @@ Import is supported using the following syntax:
8484
```shell
8585
# Gitlab project tags can be imported with a key composed of `<project_id>:<tag_name>`, e.g.
8686
terraform import gitlab_project_tag.example "12345:develop"
87+
88+
# NOTE: the `ref` attribute won't be available for imported `gitlab_project_tag` resources.
8789
```
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
# Gitlab project tags can be imported with a key composed of `<project_id>:<tag_name>`, e.g.
22
terraform import gitlab_project_tag.example "12345:develop"
3+
4+
# NOTE: the `ref` attribute won't be available for imported `gitlab_project_tag` resources.

internal/provider/resource_gitlab_project_tag.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
var _ = registerResource("gitlab_project_tag", func() *schema.Resource {
1313
return &schema.Resource{
1414
Description: `This resource allows you to create and manage GitLab tags.
15-
15+
1616
**Upstream API** : [GitLab API docs](https://docs.gitlab.com/ee/api/tags.html)`,
1717

1818
CreateContext: resourceGitlabTagCreate,
@@ -35,7 +35,7 @@ var _ = registerResource("gitlab_project_tag", func() *schema.Resource {
3535
Required: true,
3636
},
3737
"ref": {
38-
Description: "Create tag using commit SHA, another tag name, or branch name.",
38+
Description: "Create tag using commit SHA, another tag name, or branch name. This attribute is not available for imported resources.",
3939
Type: schema.TypeString,
4040
ForceNew: true,
4141
Required: true,

0 commit comments

Comments
 (0)