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

Cannot set min_executions to 0 on azurerm_container_app_job #25930

Closed
1 task done
kaedroho opened this issue May 10, 2024 · 1 comment · Fixed by #25931
Closed
1 task done

Cannot set min_executions to 0 on azurerm_container_app_job #25930

kaedroho opened this issue May 10, 2024 · 1 comment · Fixed by #25931

Comments

@kaedroho
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Terraform Version

1.5.3

AzureRM Provider Version

3.103.1

Affected Resource(s)/Data Source(s)

azurerm_container_app_job

Terraform Configuration Files

resource "azurerm_container_app_job" "default" {
  name                         = "job-name"
  container_app_environment_id = azurerm_container_app_environment.default.id
  resource_group_name          = azurerm_resource_group.default.name
  location                     = azurerm_resource_group.default.location

  replica_timeout_in_seconds = 60
  replica_retry_limit        = 1

  event_trigger_config {
    parallelism = 1

    scale {
      min_executions = 0  # Not allowed
      max_executions = 1

      rules {
        ...
      }
    }
  }

  template {
    container {
      name   = "container"
      image  = "mcr.microsoft.com/azuredocs/containerapps-helloworld:latest"
      cpu    = 0.5
      memory = "1Gi"
    }
  }
}

Debug Output/Panic Output

Planning failed. Terraform encountered an error while generating this plan.

╷
│ Error: expected event_trigger_config.0.scale.0.min_executions to be at least (1), got 0
│ 
│   with module.bibauthorsub.azurerm_container_app_job.worker,
│   on bibauthorsub/container_app.tf line 23, in resource "azurerm_container_app_job" "worker":
│   23:       min_executions = 0

Expected Behaviour

Min executions should be allowed to be set to 0, this value is valid when creating a container app job with the CLI or using the azapi provider.

This is also the recommended value as shown in the web UI
image

Actual Behaviour

A validation error occurred

Steps to Reproduce

  1. With a azurerm_container_app_job resource that has a custom scaling rule
  2. Set min_executions to 0
  3. Run terraform apply

Important Factoids

No response

References

No response

Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants