Skip to content

Commit 17f6fc2

Browse files
committed
Fix rebase issue. Sorry -_-'
1 parent e376f41 commit 17f6fc2

File tree

5 files changed

+20
-33
lines changed

5 files changed

+20
-33
lines changed

docs/data-sources/container.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,20 +93,16 @@ In addition to all arguments above, the following attributes are exported:
9393

9494
- `sandbox` - Execution environment of the container.
9595

96-
<<<<<<< HEAD
9796
- `heath_check` - Health check configuration block of the container.
9897
- `http` - HTTP health check configuration.
9998
- `path` - Path to use for the HTTP health check.
10099
- `failure_threshold` - Number of consecutive health check failures before considering the container unhealthy.
101100
- `interval`- Period between health checks (in seconds).
102-
||||||| parent of d04ca3f0 (feat(container/serverless): add scaling_option block)
103101
- `sandbox` - (Optional) Execution environment of the container.
104-
=======
105102
- `scaling_option` - Configuration block used to decide when to scale up or down. Possible values:
106103
- `concurrent_requests_threshold` - Scale depending on the number of concurrent requests being processed per container instance.
107104
- `cpu_usage_threshold` - Scale depending on the CPU usage of a container instance.
108105
- `memory_usage_threshold`- Scale depending on the memory usage of a container instance.
109-
>>>>>>> d04ca3f0 (feat(container/serverless): add scaling_option block)
110106

111107
- `status` - The container status.
112108

docs/resources/container.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,19 +84,16 @@ The following arguments are supported:
8484

8585
- `sandbox` - (Optional) Execution environment of the container.
8686

87-
<<<<<<< HEAD
8887
- `heath_check` - (Optional) Health check configuration block of the container.
8988
- `http` - HTTP health check configuration.
9089
- `path` - Path to use for the HTTP health check.
9190
- `failure_threshold` - Number of consecutive health check failures before considering the container unhealthy.
9291
- `interval`- Period between health checks (in seconds).
93-
||||||| parent of d04ca3f0 (feat(container/serverless): add scaling_option block)
94-
=======
92+
9593
- `scaling_option` - (Optional) Configuration block used to decide when to scale up or down. Possible values:
9694
- `concurrent_requests_threshold` - Scale depending on the number of concurrent requests being processed per container instance.
9795
- `cpu_usage_threshold` - Scale depending on the CPU usage of a container instance.
9896
- `memory_usage_threshold`- Scale depending on the memory usage of a container instance.
99-
>>>>>>> d04ca3f0 (feat(container/serverless): add scaling_option block)
10097

10198
- `port` - (Optional) The port to expose the container.
10299

@@ -168,7 +165,6 @@ The `memory_limit` (in MB) must correspond with the right amount of vCPU. Refer
168165
~>**Important:** Make sure to select the right resources, as you will be billed based on compute usage over time and the number of Containers executions.
169166
Refer to the [Serverless Containers pricing](https://www.scaleway.com/en/docs/faq/serverless-containers/#prices) for more information.
170167

171-
<<<<<<< HEAD
172168
## Health check configuration
173169

174170
Custom health checks can be configured on the container.
@@ -197,9 +193,8 @@ resource scaleway_container main {
197193

198194
~>**Important:** Another probe type can be set to TCP with the API, but currently the SDK has not been updated with this parameter.
199195
This is why the only probe that can be used here is the HTTP probe.
200-
||||||| parent of d04ca3f0 (feat(container/serverless): add scaling_option block)
201196
Refer to the [Serverless Containers pricing](https://www.scaleway.com/en/docs/faq/serverless-containers/#prices) for more information.
202-
=======
197+
203198
## Scaling option configuration
204199

205200
Scaling option block configuration allows you to choose which parameter will scale up/down containers.
@@ -220,5 +215,4 @@ resource scaleway_container main {
220215
```
221216

222217
~>**Important**: A maximum of one of these parameters may be set. Also, when `cpu_usage_threshold` or `memory_usage_threshold` are used, `min_scale` can't be set to 0.
223-
>>>>>>> d04ca3f0 (feat(container/serverless): add scaling_option block)
224-
Refer to the [API Reference](https://www.scaleway.com/en/developers/api/serverless-containers/#path-containers-create-a-new-container) for more information.
218+
Refer to the [API Reference](https://www.scaleway.com/en/developers/api/serverless-containers/#path-containers-create-a-new-container) for more information.

internal/services/container/container.go

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ func ResourceContainer() *schema.Resource {
172172
Description: "Execution environment of the container.",
173173
ValidateDiagFunc: verify.ValidateEnum[container.ContainerSandbox](),
174174
},
175-
<<<<<<< HEAD
176175
"health_check": {
177176
Type: schema.TypeSet,
178177
Optional: true,
@@ -207,8 +206,10 @@ func ResourceContainer() *schema.Resource {
207206
DiffSuppressFunc: dsf.Duration,
208207
ValidateDiagFunc: verify.IsDuration(),
209208
Required: true,
210-
||||||| parent of d04ca3f0 (feat(container/serverless): add scaling_option block)
211-
=======
209+
},
210+
},
211+
},
212+
},
212213
"scaling_option": {
213214
Type: schema.TypeSet,
214215
Optional: true,
@@ -230,7 +231,6 @@ func ResourceContainer() *schema.Resource {
230231
Type: schema.TypeInt,
231232
Description: "Scale depending on the memory usage of a container instance.",
232233
Optional: true,
233-
>>>>>>> d04ca3f0 (feat(container/serverless): add scaling_option block)
234234
},
235235
},
236236
},
@@ -348,12 +348,8 @@ func ResourceContainerRead(ctx context.Context, d *schema.ResourceData, m interf
348348
_ = d.Set("deploy", scw.BoolPtr(*types.ExpandBoolPtr(d.Get("deploy"))))
349349
_ = d.Set("http_option", co.HTTPOption)
350350
_ = d.Set("sandbox", co.Sandbox)
351-
<<<<<<< HEAD
352351
_ = d.Set("health_check", flattenHealthCheck(co.HealthCheck))
353-
||||||| parent of d04ca3f0 (feat(container/serverless): add scaling_option block)
354-
=======
355352
_ = d.Set("scaling_option", flattenScalingOption(co.ScalingOption))
356-
>>>>>>> d04ca3f0 (feat(container/serverless): add scaling_option block)
357353
_ = d.Set("region", co.Region.String())
358354

359355
return nil
@@ -449,7 +445,6 @@ func ResourceContainerUpdate(ctx context.Context, d *schema.ResourceData, m inte
449445
req.Sandbox = container.ContainerSandbox(d.Get("sandbox").(string))
450446
}
451447

452-
<<<<<<< HEAD
453448
if d.HasChanges("health_check") {
454449
healthCheck := d.Get("health_check")
455450

@@ -459,8 +454,8 @@ func ResourceContainerUpdate(ctx context.Context, d *schema.ResourceData, m inte
459454
}
460455

461456
req.HealthCheck = healthCheckReq
462-
||||||| parent of d04ca3f0 (feat(container/serverless): add scaling_option block)
463-
=======
457+
}
458+
464459
if d.HasChanges("scaling_option") {
465460
scalingOption := d.Get("scaling_option")
466461

@@ -470,7 +465,6 @@ func ResourceContainerUpdate(ctx context.Context, d *schema.ResourceData, m inte
470465
}
471466

472467
req.ScalingOption = scalingOptionReq
473-
>>>>>>> d04ca3f0 (feat(container/serverless): add scaling_option block)
474468
}
475469

476470
imageHasChanged := d.HasChanges("registry_sha256")

internal/services/container/container_data_source_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ func TestAccDataSourceContainer_Basic(t *testing.T) {
5050
})
5151
}
5252

53-
<<<<<<< HEAD
5453
func TestAccDataSourceContainer_HealthCheck(t *testing.T) {
5554
tt := acctest.NewTestTools(t)
5655
defer tt.Cleanup()
@@ -83,8 +82,11 @@ func TestAccDataSourceContainer_HealthCheck(t *testing.T) {
8382
resource.TestCheckResourceAttr("data.scaleway_container.main", "health_check.#", "1"),
8483
resource.TestCheckResourceAttr("data.scaleway_container.main", "health_check.0.failure_threshold", "30"),
8584
resource.TestCheckResourceAttr("data.scaleway_container.main", "health_check.0.interval", "10s"),
86-
||||||| parent of d04ca3f0 (feat(container/serverless): add scaling_option block)
87-
=======
85+
},
86+
},
87+
}
88+
}
89+
8890
func TestAccDataSourceContainer_ScalingOption(t *testing.T) {
8991
tt := acctest.NewTestTools(t)
9092
defer tt.Cleanup()
@@ -114,7 +116,6 @@ func TestAccDataSourceContainer_ScalingOption(t *testing.T) {
114116
resource.TestCheckResourceAttr("scaleway_container.main", "scaling_option.0.concurrent_requests_threshold", "50"),
115117
resource.TestCheckResourceAttr("data.scaleway_container.main", "scaling_option.#", "1"),
116118
resource.TestCheckResourceAttr("data.scaleway_container.main", "scaling_option.0.concurrent_requests_threshold", "50"),
117-
>>>>>>> d04ca3f0 (feat(container/serverless): add scaling_option block)
118119
),
119120
},
120121
},

internal/services/container/container_test.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,6 @@ func TestAccContainer_Sandbox(t *testing.T) {
400400
})
401401
}
402402

403-
<<<<<<< HEAD
404403
func TestAccContainer_HealthCheck(t *testing.T) {
405404
tt := acctest.NewTestTools(t)
406405
defer tt.Cleanup()
@@ -449,8 +448,12 @@ func TestAccContainer_HealthCheck(t *testing.T) {
449448
resource.TestCheckResourceAttr("scaleway_container.main", "health_check.0.http.0.path", "/test"),
450449
resource.TestCheckResourceAttr("scaleway_container.main", "health_check.0.failure_threshold", "40"),
451450
resource.TestCheckResourceAttr("scaleway_container.main", "health_check.0.interval", "12s"),
452-
||||||| parent of d04ca3f0 (feat(container/serverless): add scaling_option block)
453-
=======
451+
),
452+
},
453+
},
454+
})
455+
}
456+
454457
func TestAccContainer_ScalingOption(t *testing.T) {
455458
tt := acctest.NewTestTools(t)
456459
defer tt.Cleanup()
@@ -534,7 +537,6 @@ func TestAccContainer_ScalingOption(t *testing.T) {
534537
Check: resource.ComposeTestCheckFunc(
535538
isContainerPresent(tt, "scaleway_container.main"),
536539
resource.TestCheckResourceAttr("scaleway_container.main", "scaling_option.0.memory_usage_threshold", "66"),
537-
>>>>>>> d04ca3f0 (feat(container/serverless): add scaling_option block)
538540
),
539541
},
540542
},

0 commit comments

Comments
 (0)