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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provider produces inconsistent plan when start is false #573

Open
G-Rath opened this issue Jul 27, 2023 · 0 comments
Open

Provider produces inconsistent plan when start is false #573

G-Rath opened this issue Jul 27, 2023 · 0 comments

Comments

@G-Rath
Copy link

G-Rath commented Jul 27, 2023

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

  1. terraform apply

Important Factoids

I'm using WSLv2.

It works as expected if start is true.

References

  • #0000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant