Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(container): add health_check block #2878

Merged

Conversation

nullabe
Copy link
Contributor

@nullabe nullabe commented Jan 16, 2025

Description

Serverless Containers now offers Custom Health check feature that allows to configure the HTTP path that the probe will listen to, the number of failures before considering the container as unhealthy and the period between health checks.

This PR aim to add the relevant TF block in containers resource configuration (as well into data block).

API Reference: https://www.scaleway.com/en/developers/api/serverless-containers/#path-containers-create-a-new-container

New or Affected Resource(s)

  • scaleway_container

Terraform configuration

resource scaleway_container main {
    name = "my-container-02"
    namespace_id = scaleway_container_namespace.main.id

    health_check {
        http {
            path = "/ping"
        }
        failure_threshold = 40
        interval = "3s"
    }
}

Related issues

Notes for the reviewer(s)

  • Using health_check terraform configuration to be compliant with the API.
  • Acceptance tests from real calls have been created on both resource and data.
  • Documentation has been updated.
  • TCP probe has not been implemented in the configuration block because the API's SDK struct container.ContainerHealthCheckSpecTCPProbe is empty.

Thanks!

@github-actions github-actions bot added the container Container issues, bugs and feature requests label Jan 16, 2025
@remyleone remyleone changed the title feat(container/serverless): add health_check block feat(container): add health_check block Feb 14, 2025
@remyleone remyleone enabled auto-merge February 14, 2025 10:09
@remyleone remyleone added this pull request to the merge queue Feb 14, 2025
@remyleone
Copy link
Member

Thanks a lot for your contribution @nullabe 👍

Merged via the queue into scaleway:master with commit 4110e51 Feb 14, 2025
43 checks passed
@remyleone remyleone linked an issue Feb 14, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
container Container issues, bugs and feature requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

serverless_containers: add custom healthchecks
2 participants