Skip to content

Commit 479c27b

Browse files
authored
Merge branch 'master' into fix-partition
2 parents 3a341a7 + c9cdc2d commit 479c27b

12 files changed

+2524
-1836
lines changed

.github/workflows/build.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
pull_request:
8+
merge_group:
9+
10+
jobs:
11+
build:
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, macos-latest, windows-latest]
16+
17+
steps:
18+
# Checkout should always be before setup-go to ensure caching is working
19+
- name: Checkout
20+
uses: actions/checkout@v6
21+
with:
22+
fetch-depth: 1
23+
24+
- name: Install Go
25+
uses: actions/setup-go@v6
26+
with:
27+
go-version: stable
28+
29+
- name: Verify go.mod is tidy
30+
run: |
31+
go mod tidy
32+
git diff --exit-code
33+
34+
- name: Build the provider
35+
run: go build ./
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
subcategory: "Jobs"
3+
page_title: "Scaleway: scaleway_job_definition_start_action"
4+
---
5+
6+
# scaleway_job_definition_start_action (Action)
7+
8+
<!-- action schema generated by tfplugindocs -->
9+
## Schema
10+
11+
### Required
12+
13+
- `job_definition_id` (String) ID of the job definition to start. Can be a plain UUID or a regional ID.
14+
15+
### Optional
16+
17+
- `command` (String) Contextual startup command for this specific job run.
18+
- `environment_variables` (Map of String) Contextual environment variables for this specific job run.
19+
- `region` (String) Region of the job definition. If not set, the region is derived from the job_definition_id when possible or from the provider configuration.
20+
- `replicas` (Number) Number of jobs to run.
21+
22+

internal/services/block/snapshot_data_source_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func TestAccDataSourceSnapshot_Basic(t *testing.T) {
2626
}
2727
2828
resource scaleway_block_snapshot main {
29-
name = "test-ds-block-snapshot-basic"
29+
name = "test-ds-block-snapshot-basic-tf"
3030
volume_id = scaleway_block_volume.main.id
3131
}
3232

internal/services/block/testdata/data-source-snapshot-basic.cassette.yaml

Lines changed: 225 additions & 372 deletions
Large diffs are not rendered by default.

internal/services/instance/server_test.go

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2403,6 +2403,48 @@ func TestAccServer_AttachDetachFileSystem(t *testing.T) {
24032403
})
24042404
}
24052405

2406+
func TestAccServer_ScratchStorage(t *testing.T) {
2407+
tt := acctest.NewTestTools(t)
2408+
defer tt.Cleanup()
2409+
2410+
resource.ParallelTest(t, resource.TestCase{
2411+
ProtoV6ProviderFactories: tt.ProviderFactories,
2412+
CheckDestroy: resource.ComposeTestCheckFunc(
2413+
instancechecks.IsServerDestroyed(tt),
2414+
instancechecks.IsVolumeDestroyed(tt),
2415+
),
2416+
Steps: []resource.TestStep{
2417+
{
2418+
Config: `
2419+
resource "scaleway_instance_volume" "main" {
2420+
size_in_gb = 20
2421+
type = "scratch"
2422+
zone = "fr-par-2"
2423+
}
2424+
2425+
resource "scaleway_instance_server" "main" {
2426+
name = "test-acc-server-scratch"
2427+
type = "H100-1-80G"
2428+
image = "ubuntu_jammy_gpu_os_12"
2429+
state = "stopped"
2430+
zone = "fr-par-2"
2431+
tags = [ "terraform-test", "scaleway_instance_server", "scratch" ]
2432+
2433+
additional_volume_ids = [scaleway_instance_volume.main.id]
2434+
}`,
2435+
Check: resource.ComposeTestCheckFunc(
2436+
isServerPresent(tt, "scaleway_instance_server.main"),
2437+
instancechecks.IsVolumePresent(tt, "scaleway_instance_volume.main"),
2438+
resource.TestCheckResourceAttr("scaleway_instance_server.main", "type", "H100-1-80G"),
2439+
resource.TestCheckResourceAttr("scaleway_instance_server.main", "image", "ubuntu_jammy_gpu_os_12"),
2440+
resource.TestCheckResourceAttrPair("scaleway_instance_server.main", "additional_volume_ids.0", "scaleway_instance_volume.main", "id"),
2441+
resource.TestCheckResourceAttr("scaleway_instance_volume.main", "size_in_gb", "20"),
2442+
),
2443+
},
2444+
},
2445+
})
2446+
}
2447+
24062448
func TestAccServer_AdminPasswordEncryptionSSHKeyID(t *testing.T) {
24072449
tt := acctest.NewTestTools(t)
24082450
defer tt.Cleanup()

internal/services/instance/testdata/server-scratch-storage.cassette.yaml

Lines changed: 1428 additions & 0 deletions
Large diffs are not rendered by default.

internal/services/secret/secret_data_source_test.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,16 @@ func TestAccDataSourceSecret_Path(t *testing.T) {
7070
Steps: []resource.TestStep{
7171
{
7272
Config: `
73-
resource "scaleway_account_project" "project" {
74-
name = "tf-tests-secret-ds-path"
75-
}
76-
7773
resource "scaleway_secret" "main" {
7874
name = "test-secret-ds-path"
7975
path = "/test-secret-ds-path-path"
80-
project_id = scaleway_account_project.project.id
8176
}
8277
8378
data "scaleway_secret" "by_name" {
8479
name = scaleway_secret.main.name
8580
path = "/test-secret-ds-path-path"
86-
project_id = scaleway_account_project.project.id
81+
project_id = scaleway_secret.main.project_id
82+
depends_on = [scaleway_secret.main]
8783
}
8884
`,
8985
Check: resource.ComposeTestCheckFunc(

0 commit comments

Comments
 (0)