Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions internal/services/container/helpers_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ const (
defaultContainerDomainTimeout = 10 * time.Minute
DefaultContainerRetryInterval = 5 * time.Second
defaultTriggerRetryInterval = 5 * time.Second
// The API requires a valid image on create even though registry_image is optional.
defaultContainerRegistryImage = "nginx:latest"
)

// newAPIWithRegion returns a new container API and the region.
Expand Down Expand Up @@ -108,6 +110,8 @@ func setCreateContainerRequest(d *schema.ResourceData, region scw.Region) (*cont

if registryImage, ok := d.GetOk("registry_image"); ok {
req.RegistryImage = types.ExpandStringPtr(registryImage)
} else {
req.RegistryImage = types.ExpandStringPtr(defaultContainerRegistryImage)
}

if maxConcurrency, ok := d.GetOk("max_concurrency"); ok {
Expand Down
Loading