You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Terraform v1.6.2
on linux_amd64
Initializing plugins and modules...
╷
│ Error: Unsupported argument
│
│ on app.tf line XX, in resource "kubernetes_deployment_v1" "this":
│ XX: restart_policy = "Always"
│
│ An argument named "restart_policy" is not expected here.
╵
Operation failed: failed running terraform plan (exit 1)
Panic Output
Steps to Reproduce
Create a ressource kubernetes_deployment_v1 with init container and set the option restart_policy of the init container to "Always" to transform it in a sidecar.
Enabled by default with Kubernetes 1.29, a [feature gate](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/) named SidecarContainers allows you to specify a restartPolicy for containers listed in a Pod's initContainers field.
These restartable sidecar containers are independent with other [init containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) and main application container within the same pod.
These can be started, stopped, or restarted without effecting the main application container and other init containers.
Hello @arthurgur, thanks for opening this issue! With this being marked as beta in v1.29, we can proceed with adding this into the provider. You are open to creating a PR that adds this since this is just adding a new field within
Terraform Version, Provider Version and Kubernetes Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
Steps to Reproduce
Expected Behavior
Pod with sidecar init container created
Actual Behavior
Option non supported
Important Factoids
References
Community Note
The text was updated successfully, but these errors were encountered: