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

plan forces replacement every time on "command" #568

Open
pva2007 opened this issue Jul 5, 2023 · 0 comments
Open

plan forces replacement every time on "command" #568

pva2007 opened this issue Jul 5, 2023 · 0 comments

Comments

@pva2007
Copy link

pva2007 commented Jul 5, 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.2
on darwin_amd64

  • provider registry.terraform.io/cloudflare/cloudflare v3.35.0
  • provider registry.terraform.io/hashicorp/random v3.4.3
  • provider registry.terraform.io/hashicorp/template v2.2.0
  • provider registry.terraform.io/hashicorp/vault v3.17.0
  • provider registry.terraform.io/kreuzwerker/docker v3.0.2

Affected Resource(s)

  • docker_container

Terraform Configuration Files

module "ocis" {
  source = "git::https://xxxx@github.com/pva2007/tf-module-docker-resource.git?ref=v1.0.7"

  # required variables
  container_domainname         = var.docker_domainname
  disable_container_domainname = true
  container_hostname           = var.ocis_hostname
  container_name               = var.ocis_hostname
  prefix                       = basename(path.cwd)
  postfix                      = ""
  image_keep                   = true
  image_name                   = "owncloud/ocis:latest"
  networks                     = ["webgateway"]
  env = {
    "TZ"                                    = var.docker_timezone,
    "OCIS_URL"                              = "https://${var.ocis_hostname}.${var.docker_domainname}",
    "OCIS_LOG_LEVEL"                        = "info",
    "OCIS_LOG_COLOR"                        = true,
    "OCIS_LOG_PRETTY"                       = true,
    "PROXY_TLS"                             = false,
    "OCIS_INSECURE"                         = false,
    "PROXY_HTTP_ADDR"                       = "0.0.0.0:9200",
    "PROXY_ENABLE_BASIC_AUTH"               = false,
    "OCIS_DOMAIN"                           = "${var.ocis_hostname}.${var.docker_domainname}",
    "DEMO_USERS"                            = false,
    "OCIS_OIDC_ISSUER"                      = "${var.authentik_host}/application/o/owncloud-is/",
    "OCIS_EXCLUDE_RUN_SERVICES"             = "idp",
    "WEB_OIDC_CLIENT_ID"                    = "xxxx",
    "PROXY_OIDC_REWRITE_WELLKNOWN"          = true,
    "PROXY_OIDC_ACCESS_TOKEN_VERIFY_METHOD" = "none",
    "PROXY_AUTOPROVISION_ACCOUNTS"          = true,
    #"PROXY_ROLE_ASSIGNMENT_DRIVER"          = "oidc",
    "STORAGE_USERS_DRIVER"          = "s3ng",
    "STORAGE_SYSTEM_DRIVER"         = "ocis",
    "STORAGE_USERS_S3NG_ENDPOINT"   = "https://s3.xxx.de",
    "STORAGE_USERS_S3NG_REGION"     = "www-xxx",
    "STORAGE_USERS_S3NG_ACCESS_KEY" = "xxxx",
    "STORAGE_USERS_S3NG_SECRET_KEY" = "xxx",
    "STORAGE_USERS_S3NG_BUCKET"     = "xxx.ocis"
  }

  ports = var.ocis_ports

  upload = {
    "ocis_yaml" = {
      file       = "/etc/ocis/ocis.yaml"
      content    = data.template_file.ocis_yaml.rendered
      executable = false
    }
  }

  host_volumes = {
    "data" = {
      container_path = "/var/lib/ocis"
      host_path      = "/mnt/vol-shared/${var.docker_domainname}/${var.ocis_hostname}/data"
      read_only      = false
    }
  }

  # traefik
  traefik_enable              = true
  traefik_acme_live_cert      = true
  traefik_certresolver        = "letsEncrypt"
  traefik_container_port      = var.ocis_containerport
  traefik_entrypoint          = "websecure"
  traefik_protocol            = "http"
  traefik_use_authentik_proxy = false
  traefik_host_rule_addons    = ""
}

Debug Output

https://gist.github.com/pva2007/fe802f0ae1066a8ad36c41f6050989ab

Panic Output

Expected Behaviour

No replacement as no chnages has been made, and command has not changed at all. OCIS is here my example as working latest on it.

Actual Behaviour

by every run terraform plan a force replacement will be trigered for section "command"

Steps to Reproduce

  1. terraform apply

Important Factoids

connection is done via ssh to remove host where docker is running.
Statefile is on MinIO S3 Bucket.

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