Skip to content

Commit 44c1464

Browse files
authored
chore: add support for terrafmt (#3085)
1 parent f36f573 commit 44c1464

File tree

141 files changed

+1414
-957
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+1414
-957
lines changed

.github/workflows/terrafmt.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Run terrafmt
2+
on:
3+
pull_request:
4+
push:
5+
merge_group:
6+
7+
jobs:
8+
terrafmt:
9+
runs-on: ubuntu-latest
10+
steps:
11+
# Checkout should always be before setup-go to ensure caching is working
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-go@v5
14+
with:
15+
go-version: 1.24.0
16+
- name: Run terrafmt on documentation
17+
run: go tool terrafmt fmt --verbose --check ./docs

docs/data-sources/account_ssh_key.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The following commands allow you to:
2020
```hcl
2121
# Get info by SSH key name
2222
data "scaleway_account_ssh_key" "my_key" {
23-
name = "my-key-name"
23+
name = "my-key-name"
2424
}
2525
2626
# Get info by SSH key id

docs/data-sources/baremetal_easy_partitioning.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,47 +13,47 @@ This data source simplifies the process of generating valid partitioning configu
1313

1414
```hcl
1515
data "scaleway_easy_partitioning" "default" {
16-
offer_id = "11111111-1111-1111-1111-111111111111"
17-
os_id = "22222222-2222-2222-2222-222222222222"
18-
swap = true
19-
extra_partition = true
20-
ext_4_mountpoint = "/data"
16+
offer_id = "11111111-1111-1111-1111-111111111111"
17+
os_id = "22222222-2222-2222-2222-222222222222"
18+
swap = true
19+
extra_partition = true
20+
ext_4_mountpoint = "/data"
2121
}
2222
```
2323

2424
```hcl
2525
data "scaleway_baremetal_offer" "my_offer" {
26-
zone = "fr-par-1"
27-
name = "EM-B220E-NVME"
26+
zone = "fr-par-1"
27+
name = "EM-B220E-NVME"
2828
}
2929
3030
data "scaleway_baremetal_os" "my_os" {
31-
zone = "fr-par-1"
32-
name = "Ubuntu"
33-
version = "22.04 LTS (Jammy Jellyfish)"
31+
zone = "fr-par-1"
32+
name = "Ubuntu"
33+
version = "22.04 LTS (Jammy Jellyfish)"
3434
}
3535
3636
resource "scaleway_iam_ssh_key" "main" {
37-
name = "my-ssh-key"
38-
public_key = "my-ssh-key-public"
37+
name = "my-ssh-key"
38+
public_key = "my-ssh-key-public"
3939
}
4040
4141
data "scaleway_baremetal_easy_partitioning" "test" {
42-
offer_id = data.scaleway_baremetal_offer.my_offer.offer_id
43-
os_id = data.scaleway_baremetal_os.my_os.os_id
44-
swap = false
45-
ext_4_mountpoint = "/hello"
42+
offer_id = data.scaleway_baremetal_offer.my_offer.offer_id
43+
os_id = data.scaleway_baremetal_os.my_os.os_id
44+
swap = false
45+
ext_4_mountpoint = "/hello"
4646
}
4747
4848
resource "scaleway_baremetal_server" "base" {
49-
name = "my-baremetal-server"
50-
zone = "fr-par-1"
51-
description = "test a description"
52-
offer = data.scaleway_baremetal_offer.my_offer.offer_id
53-
os = data.scaleway_baremetal_os.my_os.os_id
54-
partitioning = data.scaleway_baremetal_easy_partitioning.test.json_partition
55-
tags = ["terraform-test", "scaleway_baremetal_server", "minimal", "edited"]
56-
ssh_key_ids = [scaleway_iam_ssh_key.main.id]
49+
name = "my-baremetal-server"
50+
zone = "fr-par-1"
51+
description = "test a description"
52+
offer = data.scaleway_baremetal_offer.my_offer.offer_id
53+
os = data.scaleway_baremetal_os.my_os.os_id
54+
partitioning = data.scaleway_baremetal_easy_partitioning.test.json_partition
55+
tags = ["terraform-test", "scaleway_baremetal_server", "minimal", "edited"]
56+
ssh_key_ids = [scaleway_iam_ssh_key.main.id]
5757
}
5858
```
5959

@@ -75,4 +75,4 @@ In addition to all above arguments, the following attributes are exported:
7575

7676
- `id` — A composite identifier derived from offer_id and os_id.
7777

78-
- `json_partition` — A validated partitioning schema in JSON format that can be directly used for BareMetal server deployment.
78+
- `json_partition` — A validated partitioning schema in JSON format that can be directly used for BareMetal server deployment.

docs/data-sources/baremetal_os.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ You can also use the [scaleway-cli](https://github.com/scaleway/scaleway-cli) wi
1515
```hcl
1616
# Get info by os name and version
1717
data "scaleway_baremetal_os" "by_name" {
18-
name = "Ubuntu"
18+
name = "Ubuntu"
1919
version = "20.04 LTS (Focal Fossa)"
2020
}
2121

docs/data-sources/billing_consumptions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ In addition to all arguments above, the following attributes are exported:
3333
- `unit` - The unit of consumed quantity.
3434
- `billed_quantity` - The consumed quantity.
3535
- `project_id` - The project ID of the consumption.
36-
- `updated_at` - The last consumption update date.
36+
- `updated_at` - The last consumption update date.

docs/data-sources/block_snapshot.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ data "scaleway_block_snapshot" "my_snapshot" {
2525
2626
// Get info by snapshot name and volume id
2727
data "scaleway_block_snapshot" "my_snapshot" {
28-
name = "my-name"
28+
name = "my-name"
2929
volume_id = "11111111-1111-1111-1111-111111111111"
3030
}
3131

docs/data-sources/cockpit_source.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The following example retrieves a Cockpit data source by its unique ID.
1717

1818
```terraform
1919
data "scaleway_cockpit_source" "example" {
20-
id = "fr-par/11111111-1111-1111-1111-111111111111"
20+
id = "fr-par/11111111-1111-1111-1111-111111111111"
2121
}
2222
```
2323

@@ -27,9 +27,9 @@ You can also retrieve a data source by specifying filtering criteria such as `na
2727

2828
```terraform
2929
data "scaleway_cockpit_source" "filtered" {
30-
project_id = "11111111-1111-1111-1111-111111111111"
31-
region = "fr-par"
32-
name = "my-data-source"
30+
project_id = "11111111-1111-1111-1111-111111111111"
31+
region = "fr-par"
32+
name = "my-data-source"
3333
}
3434
```
3535

docs/data-sources/container.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,20 @@ resource scaleway_container_namespace main {
2222
}
2323
2424
resource scaleway_container main {
25-
name = "test-container-data"
26-
namespace_id = scaleway_container_namespace.main.id
25+
name = "test-container-data"
26+
namespace_id = scaleway_container_namespace.main.id
2727
}
2828
2929
// Get info by container name
3030
data "scaleway_container" "by_name" {
31-
namespace_id = scaleway_container_namespace.main.id
32-
name = scaleway_container.main.name
31+
namespace_id = scaleway_container_namespace.main.id
32+
name = scaleway_container.main.name
3333
}
3434
3535
// Get info by container ID
3636
data "scaleway_container" "by_id" {
37-
namespace_id = scaleway_container_namespace.main.id
38-
container_id = scaleway_container.main.id
37+
namespace_id = scaleway_container_namespace.main.id
38+
container_id = scaleway_container.main.id
3939
}
4040
```
4141

docs/data-sources/flexible_ips.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Gets information about multiple Flexible IPs.
1212
```hcl
1313
# Find ips that share the same tags
1414
data "scaleway_flexible_ips" "fips_by_tags" {
15-
tags = [ "a tag" ]
15+
tags = ["a tag"]
1616
}
1717
1818
# Find ips that share the same Server ID
@@ -21,19 +21,19 @@ data "scaleway_baremetal_offer" "my_offer" {
2121
}
2222
2323
resource "scaleway_baremetal_server" "base" {
24-
name = "MyServer"
25-
offer = data.scaleway_baremetal_offer.my_offer.offer_id
26-
install_config_afterward = true
24+
name = "MyServer"
25+
offer = data.scaleway_baremetal_offer.my_offer.offer_id
26+
install_config_afterward = true
2727
}
2828
2929
resource "scaleway_flexible_ip" "first" {
3030
server_id = scaleway_baremetal_server.base.id
31-
tags = [ "foo", "first" ]
31+
tags = ["foo", "first"]
3232
}
3333
3434
resource "scaleway_flexible_ip" "second" {
3535
server_id = scaleway_baremetal_server.base.id
36-
tags = [ "foo", "second" ]
36+
tags = ["foo", "second"]
3737
}
3838
3939
data "scaleway_flexible_ips" "fips_by_server_id" {

docs/data-sources/function.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ The following commands allow you to:
2121
```terraform
2222
// Get info by function name
2323
data "scaleway_function" "my_function" {
24-
name = "my-namespace-name"
24+
name = "my-namespace-name"
2525
namespace_id = "11111111-1111-1111-1111-111111111111"
2626
}
2727
2828
// Get info by function ID
2929
data "scaleway_function" "my_function" {
30-
function_id = "11111111-1111-1111-1111-111111111111"
30+
function_id = "11111111-1111-1111-1111-111111111111"
3131
namespace_id = "11111111-1111-1111-1111-111111111111"
3232
}
3333
```

0 commit comments

Comments
 (0)