Skip to content

Commit 5890dc5

Browse files
committed
datasource/gitlab_group_variable: Add missing doc examples
1 parent bc34640 commit 5890dc5

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

docs/data-sources/group_variable.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,21 @@ The `gitlab_group_variable` data source allows to retrieve details about a group
1313

1414
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/group_level_variables.html)
1515

16-
16+
## Example Usage
17+
18+
```terraform
19+
data "gitlab_group_variable" "foo" {
20+
group = "my/example/group"
21+
key = "foo"
22+
}
23+
24+
# Using an environment scope
25+
data "gitlab_group_variable" "bar" {
26+
group = "my/example/group"
27+
key = "bar"
28+
environment_scope = "staging/*"
29+
}
30+
```
1731

1832
<!-- schema generated by tfplugindocs -->
1933
## Schema
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
data "gitlab_group_variable" "foo" {
2+
group = "my/example/group"
3+
key = "foo"
4+
}
5+
6+
# Using an environment scope
7+
data "gitlab_group_variable" "bar" {
8+
group = "my/example/group"
9+
key = "bar"
10+
environment_scope = "staging/*"
11+
}

0 commit comments

Comments
 (0)