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

option to introduce multiple instances with redis locking #87

Open
nitrocode opened this issue Jan 17, 2023 · 0 comments
Open

option to introduce multiple instances with redis locking #87

nitrocode opened this issue Jan 17, 2023 · 0 comments

Comments

@nitrocode
Copy link
Member

nitrocode commented Jan 17, 2023

Redis locking would allow an HA setup using multiple atlantis servers.

https://www.runatlantis.io/docs/server-configuration.html#locking-db-type

Related issue terraform-aws-modules/terraform-aws-atlantis#322

CloudMemory store would be the redis equivalent of aws elasticache

This module would not need to implement the redis cluster itself and it may not need adding a count to the GCE instance since the count could be added to the module itself.

An example with a CloudMemory instance with its values fed into this module would be enough to allow people to use it

resource "google_redis_instance" "cache" {
  name           = "memory-cache"
  memory_size_gb = 1
}

module "atlantis" {
  source     = "bschaatsbergen/atlantis/gce"

  count = 4

  name = "atlantis-${count.index}"

  env_vars = {
    ATLANTIS_LOCKING_DB_TYPE = "redis"
    ATLANTIS_REDIS_HOST      = ""
    ATLANTIS_REDIS_PORT      = ""

    # could be randomly generated when the redis cluster is born
    ATLANTIS_REDIS_PASSWORD  = ""

    # ...
  }

  # ...
}
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