terraform-provider-swarm

command module
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2022 License: AGPL-3.0 Imports: 9 Imported by: 0

README

Terraform Provider for Docker Swarm

Go

terraform-provider-swarm is a Terraform provider for the creation and management of Docker Swarm clusters (an alternative container orchestrator to Kubernetes and Nomad)

Quick Start

Run the following command to build the provider

make install
Sample Configuration

main.tf:

terraform {
    required_providers {
        swarm = {
            source = "aucloud/swarm"
            version = "~> 1.2"
        }
    }
}

provider "swarm" {
  use_local = true
}

resource "swarm_cluster" "local_cluster" {
  nodes {
    hostname = "localhost"
    public_address = "127.0.0.1"
    private_address = "127.0.0.1"
    tags = {
      role = "manager"
    }
  }
}

output "cluster" {
  value = data.swarm_cluster.local_cluster
}

Initialize and apply the Terraform:

terraform init
terraform apply

For a full example see examples/main.tf

License

terraform-provider-swarm is licensed under the terms of the AGPLv3

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL