Skip to content

Commit 5862436

Browse files
committed
(Automated) Terraform format all examples
1 parent 5ed07f5 commit 5862436

File tree

27 files changed

+104
-104
lines changed

27 files changed

+104
-104
lines changed

examples/data-sources/gitlab_projects/data-source.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ data "gitlab_projects" "group_projects" {
1212

1313
# List projects using the search syntax
1414
data "gitlab_projects" "projects" {
15-
search = "postgresql"
16-
visibility = "private"
15+
search = "postgresql"
16+
visibility = "private"
1717
}

examples/data-sources/gitlab_users/data-source.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
data "gitlab_users" "example" {
2-
sort = "desc"
3-
order_by = "name"
2+
sort = "desc"
3+
order_by = "name"
44
created_before = "2019-01-01"
55
}
66

examples/provider/provider.tf

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
11
# Configure the GitLab Provider
22
provider "gitlab" {
3-
token = var.gitlab_token
3+
token = var.gitlab_token
44
}
55

66
# Add a project owned by the user
77
resource "gitlab_project" "sample_project" {
8-
name = "example"
8+
name = "example"
99
}
1010

1111
# Add a hook to the project
1212
resource "gitlab_project_hook" "sample_project_hook" {
13-
project = gitlab_project.sample_project.id
14-
url = "https://example.com/project_hook"
13+
project = gitlab_project.sample_project.id
14+
url = "https://example.com/project_hook"
1515
}
1616

1717
# Add a variable to the project
1818
resource "gitlab_project_variable" "sample_project_variable" {
19-
project = gitlab_project.sample_project.id
20-
key = "project_variable_key"
21-
value = "project_variable_value"
19+
project = gitlab_project.sample_project.id
20+
key = "project_variable_key"
21+
value = "project_variable_value"
2222
}
2323

2424
# Add a deploy key to the project
2525
resource "gitlab_deploy_key" "sample_deploy_key" {
26-
project = gitlab_project.sample_project.id
27-
title = "terraform example"
28-
key = "ssh-rsa AAAA..."
26+
project = gitlab_project.sample_project.id
27+
title = "terraform example"
28+
key = "ssh-rsa AAAA..."
2929
}
3030

3131
# Add a group
3232
resource "gitlab_group" "sample_group" {
33-
name = "example"
34-
path = "example"
35-
description = "An example group"
33+
name = "example"
34+
path = "example"
35+
description = "An example group"
3636
}
3737

3838
# Add a project to the group - example/example
3939
resource "gitlab_project" "sample_group_project" {
40-
name = "example"
41-
namespace_id = gitlab_group.sample_group.id
40+
name = "example"
41+
namespace_id = gitlab_group.sample_group.id
4242
}

examples/resources/gitlab_branch_protection/resource.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ resource "gitlab_branch_protection" "BranchProtect" {
2020

2121
# Example using dynamic block
2222
resource "gitlab_branch_protection" "main" {
23-
project = "12345"
24-
branch = "main"
25-
push_access_level = "maintainer"
26-
merge_access_level = "maintainer"
23+
project = "12345"
24+
branch = "main"
25+
push_access_level = "maintainer"
26+
merge_access_level = "maintainer"
2727

2828
dynamic "allowed_to_push" {
2929
for_each = [50, 55, 60]

examples/resources/gitlab_deploy_key_enable/resource.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ resource "gitlab_project" "foo" {
1010

1111
# Upload a deployment key for the parent repo
1212
resource "gitlab_deploy_key" "parent" {
13-
project = "${gitlab_project.parent.id}"
14-
title = "Example deploy key"
15-
key = "ssh-rsa AAAA..."
13+
project = gitlab_project.parent.id
14+
title = "Example deploy key"
15+
key = "ssh-rsa AAAA..."
1616
}
1717

1818
# Enable the deployment key on the second repo
1919
resource "gitlab_deploy_key_enable" "foo" {
20-
project = "${gitlab_project.foo.id}"
21-
key_id = "${gitlab_deploy_key.parent.id}"
20+
project = gitlab_project.foo.id
21+
key_id = gitlab_deploy_key.parent.id
2222
}

examples/resources/gitlab_deploy_token/resource.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ resource "gitlab_deploy_token" "example" {
44
name = "Example deploy token"
55
username = "example-username"
66
expires_at = "2020-03-14T00:00:00.000Z"
7-
8-
scopes = [ "read_repository", "read_registry" ]
7+
8+
scopes = ["read_repository", "read_registry"]
99
}
1010

1111
resource "gitlab_deploy_token" "example-two" {
@@ -16,8 +16,8 @@ resource "gitlab_deploy_token" "example-two" {
1616

1717
# Example Usage - Group
1818
resource "gitlab_deploy_token" "example" {
19-
group = "example/deploying"
20-
name = "Example group deploy token"
19+
group = "example/deploying"
20+
name = "Example group deploy token"
2121

22-
scopes = [ "read_repository" ]
22+
scopes = ["read_repository"]
2323
}

examples/resources/gitlab_group_badge/resource.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ resource "gitlab_group" "foo" {
33
}
44

55
resource "gitlab_group_badge" "example" {
6-
group = gitlab_group.foo.id
6+
group = gitlab_group.foo.id
77
link_url = "https://example.com/badge-123"
88
image_url = "https://example.com/badge-123.svg"
99
}

examples/resources/gitlab_group_cluster/resource.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ resource "gitlab_group" "foo" {
44
}
55

66
resource "gitlab_group_cluster" "bar" {
7-
group = "${gitlab_group.foo.id}"
7+
group = gitlab_group.foo.id
88
name = "bar-cluster"
99
domain = "example.com"
1010
enabled = true
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
resource "gitlab_group_ldap_link" "test" {
2-
group_id = "12345"
3-
cn = "testuser"
4-
access_level = "developer"
2+
group_id = "12345"
3+
cn = "testuser"
4+
access_level = "developer"
55
ldap_provider = "ldapmain"
66
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
resource "gitlab_group_variable" "example" {
2-
group = "12345"
3-
key = "group_variable_key"
4-
value = "group_variable_value"
5-
protected = false
6-
masked = false
7-
environment_scope = "*"
2+
group = "12345"
3+
key = "group_variable_key"
4+
value = "group_variable_value"
5+
protected = false
6+
masked = false
7+
environment_scope = "*"
88
}

0 commit comments

Comments
 (0)