diff --git a/.golangci.yml b/.golangci.yml index 0fe1dbbe3a..22e6811f92 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -82,7 +82,6 @@ linters: - depguard # Go linter that checks if package imports are in a list of acceptable packages [fast: true, auto-fix: false] - dupl # Tool for code clone detection [fast: true, auto-fix: false] - errorlint # errorlint is a linter for that can be used to find code that will cause problems with the error wrapping scheme introduced in Go 1.13. [fast: false, auto-fix: false] - - execinquery # execinquery is a linter about query string checker in Query function which reads your Go src files and warning it finds [fast: false, auto-fix: false] - exhaustive # check exhaustiveness of enum switch statements [fast: false, auto-fix: false] - forcetypeassert # finds forced type assertions [fast: true, auto-fix: false] - funlen # Tool for detection of long functions [fast: true, auto-fix: false] @@ -92,7 +91,6 @@ linters: - godot # Check if comments end in a period [fast: true, auto-fix: true] - godox # Tool for detection of FIXME, TODO and other comment keywords [fast: true, auto-fix: false] - err113 # Golang linter to check the errors handling expressions [fast: false, auto-fix: false] - - gomnd # An analyzer to detect magic numbers. [fast: true, auto-fix: false] - lll # Reports long lines [fast: true, auto-fix: false] - maintidx # maintidx measures the maintainability index of each function. [fast: true, auto-fix: false] - nestif # Reports deeply nested if statements [fast: true, auto-fix: false] diff --git a/internal/services/container/container.go b/internal/services/container/container.go index 802eb157ad..8a63ad66b5 100644 --- a/internal/services/container/container.go +++ b/internal/services/container/container.go @@ -352,7 +352,7 @@ func ResourceContainerUpdate(ctx context.Context, d *schema.ResourceData, m inte } if d.HasChanges("max_concurrency") { - req.MaxConcurrency = scw.Uint32Ptr(uint32(d.Get("max_concurrency").(int))) + req.ScalingOption = &container.ContainerScalingOption{ConcurrentRequestsThreshold: scw.Uint32Ptr(uint32(d.Get("max_concurrency").(int)))} } if d.HasChanges("protocol") { diff --git a/internal/services/container/helpers_container.go b/internal/services/container/helpers_container.go index f5c5349c2e..529f32c082 100644 --- a/internal/services/container/helpers_container.go +++ b/internal/services/container/helpers_container.go @@ -108,7 +108,7 @@ func setCreateContainerRequest(d *schema.ResourceData, region scw.Region) (*cont } if maxConcurrency, ok := d.GetOk("max_concurrency"); ok { - req.MaxConcurrency = scw.Uint32Ptr(uint32(maxConcurrency.(int))) + req.ScalingOption = &container.ContainerScalingOption{ConcurrentRequestsThreshold: scw.Uint32Ptr(uint32(maxConcurrency.(int)))} } if sandbox, ok := d.GetOk("sandbox"); ok {