Skip to content

canonical/anbox-cloud-terraform

Repository files navigation

Anbox Cloud Terraform

Warning

This terraform plan is a work in progress and makes use of terraform-provider-juju which is in active development too. Please expect breaking changes (if required) in the future for the plan and the module.

This is a terraform plan to deploy anbox cloud using juju and terraform. The module uses terraform-provider-juju to deploy the anbox bundles to a bootstrapped juju cluster.

This plan uses a submodule to deploy an anbox subcluster the documentation for it can be found here

Requirements

Name Version
terraform ~> 1.6
juju ~> 0.10.0

Providers

Name Version
juju 0.10.1

Modules

Name Source Version
subcluster ./modules/subcluster n/a

Resources

Name Type
juju_model.anbox_cloud resource

Inputs

Name Description Type Default Required
cloud_name Name of the cloud to deploy the subcluster to string n/a yes
constraints List of constraints that need to be applied to applications. Each constraint must be of format <constraint_name>=<constraint_value> list(string) [] no
lxd_nodes_per_subcluster Number of lxd nodes to deploy per subcluster number 1 no
subclusters_per_region Number of subclusters per region in the given cloud e.g { ap-south-east-1 = 1 } map(list(string)) n/a yes
ua_token Pro token used for anbox services string n/a yes

Outputs

Name Description
anbox_cloud_subclusters n/a

Usage

The module can deploy a number of anbox subclusters per juju region using the variable var.subclusters_per_region. To execute the terraform plan:

Note: You need to have juju controller bootstrapped and a juju client configured on your local system to be able to use the plan.

  • Create a file called anbox.tfvars and set the values for the variables e.g
ua_token = "<pro_token_here>"
subclusters_per_region = {
    ap-southeast-1 = 1
}
cloud_name = "aws"
constraints = [ "arch=arm64" ]
  • Initialise the terraform directory
terraform init
  • Create a terraform plan using
terraform plan -out=tfplan -var-file=anbox.tfvars
  • Apply the terraform plan using
terraform apply tfplan

Contributing

Generate Docs

This repository uses terraform docs to generate the docs. To generate docs run:

./scripts/generate-docs.sh

Releases

No releases published

Packages

No packages published