Quick deployment of services on Akamai Connected Cloud
This deploys n number of Virtual Machines (Linodes) on Akamai Connected Cloud, it also registers them in the DNS zone and applies a cloud-init to them.
The readme.md has the following sections:
- Requirements - Min requirements for the module to run
- Providers - Providers required by the module
- Inputs- Inputs to the module
- Outputs - Outputs from the module
- Usage - How to use the module
The following requirements are needed by this module:
The following providers are used by this module:
The following input variables are required:
Description: Cloud-init secrets
Type:
object({
ubuntu_advantage_token = string
github_username = string
})
Description: Configuration for Linode services.
Type:
object({
# Linode account configuration
email = string // Linode email address
# Linode instance configuration
region = string // Linode region
type = string // Linode instance type
image = string // Linode image
tags = list(string) // Linode tags
# Linode domain configuration
domain = string // Linode domain
domain_ttl = number // Linode domain TTL
})
Description: Number of Linode instances
Type: number
Description: Linode instance label
Type: string
Description: Linode API token
Type: string
The following outputs are exported:
Description: Created instances
Sample usage of this module is as shown below. For detailed info, look at inputs and outputs.
Create a terraform.tfvars
file and update with:
linode_token = "<linode-token>"
linode_count = 4
linode_label = "test"
linode_config = {
email = "<linode-email>"
region = "<linode-region>"
type = "<linode-type>"
image = "linode/ubuntu22.04"
tags = [ "quickstart", "terraform" ]
domain = "<linode-domain>"
domain_ttl = 60
}
cloud_init_secrets = {
ubuntu_advantage_token = "<ubuntu-advantage-token>"
github_username = "<github-username>"
}
Verify your settings using the following command:
terraform init
terraform plan
Apply the changes
terraform apply
You will see a list of outputs similar to:
Apply complete! Resources: 13 added, 0 changed, 0 destroyed.
Outputs:
instance_ips = [
"ssh://acc-user@test-0.fr-par.acc.domain.cloud",
"ssh://acc-user@test-1.fr-par.acc.domain.cloud",
"ssh://acc-user@test-2.fr-par.acc.domain.cloud",
"ssh://acc-user@test-3.fr-par.acc.domain.cloud",
]
To clean up simply run:
terraform destroy
And confirm to remove all created resources.