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/serverless): add health_check block #2878

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nullabe
Copy link

@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
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.

1 participant