Skip to content

option to introduce multiple instances with redis locking #87

@nitrocode

Description

@nitrocode

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  = ""

    # ...
  }

  # ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions