terraform-provider-docker
terraform-provider-docker copied to clipboard
Provider produces inconsistent plan when `start` is `false`
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
Terraform (and docker Provider) Version
Terraform v1.5.1
on linux_amd64
+ provider registry.terraform.io/kreuzwerker/docker v3.0.2
Affected Resource(s)
docker_container
Terraform Configuration Files
terraform {
required_providers {
# We recommend pinning to the specific version of the Docker Provider you're using
# since new versions are released frequently
docker = {
source = "kreuzwerker/docker"
version = "3.0.2"
}
}
}
# Configure the docker provider
provider "docker" {
}
# Create a docker image resource
# -> docker pull nginx:latest
resource "docker_image" "nginx" {
name = "nginx:latest"
keep_locally = true
}
# Create a docker container resource
# -> same as 'docker run --name nginx -p8080:80 -d nginx:latest'
resource "docker_container" "nginx" {
name = "nginx"
image = docker_image.nginx.image_id
start = false
ports {
external = 8080
internal = 80
}
}
Debug Output
https://gist.github.com/G-Rath/03828b5a6a6d030515830345d008a063
Panic Output
Expected Behaviour
The apply to complete.
Actual Behaviour
"Provider produced inconsistent result after apply" error
Steps to Reproduce
terraform apply
Important Factoids
I'm using WSLv2.
It works as expected if start is true.
References
- #0000
I can confirm that this issue is still present with Terraform version v1.9.2 and provider version 3.0.2