From 40b3f89ed12f95c3212323b4db37d198ef587024 Mon Sep 17 00:00:00 2001 From: Richard Sentino Date: Sat, 10 Dec 2016 17:44:16 +1300 Subject: [PATCH] feat(CenturyLinkCloud): add CenturyLinkCloud support --- CHANGELOG.md | 4 ++ README.md | 2 +- snippets/terraform.json | 117 +++++++++++++++++++++++++++++++++++++++- 3 files changed, 121 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3198e87..db16037 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 1.0.0 + +* Add support for `CenturyLinkCloud` + # 0.10.0 * Add support for `Google Cloud` diff --git a/README.md b/README.md index 9f016a9..a9d0ce4 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ This extension for Visual Studio Code adds snippets for Terraform. * CloudStack * SoftLayer * Scaleway +* CenturyLinkCloud * AWS * Resources w/ examples * All [Data Sources](https://www.terraform.io/docs/providers/aws/d/acm_certificate.html), @@ -94,7 +95,6 @@ A massive list of things to add ### Providers -* CenturyLinkCloud * Cobbler * Datadog * DNSMadeEasy diff --git a/snippets/terraform.json b/snippets/terraform.json index 83ae5af..97b26aa 100644 --- a/snippets/terraform.json +++ b/snippets/terraform.json @@ -4425,5 +4425,120 @@ " volume = \"\\${scaleway_volume.test.id}\"", "}" ] - } + }, + "clc": { + "prefix": "tf-clc", + "description": "define a clc provider.", + "body": [ + "provider \"clc\" {", + " username = \"\\${var.clc_username}\"", + " password = \"\\${var.clc_password}\"", + " account = \"\\${var.clc_account}\" # optional", + "}" + ] + }, + "clc_server": { + "prefix": "tf-clc_server", + "description": "define clc_server resource.", + "body": [ + "resource \"clc_server\" \"${myResourceName}\" {", + " name = \"my-${myResourceName}\"", + " description = \"my-description-${myResourceName}\"", + " source_server_id = \"UBUNTU-14-64-TEMPLATE\"", + " group_id = \"\\${clc_group.frontends.id}\"", + " cpu = 2", + " memory_mb = 2048", + " password = \"Green123$\"", + " additional_disks {", + " path = \"/var\"", + " size_gb = 100", + " type = \"partitioned\"", + " }\n", + " additional_disks {", + " size_gb = 10", + " type = \"raw\"", + " }", + "}" + ] + }, + "clc_group": { + "prefix": "tf-clc_group", + "description": "define clc_group resource.", + "body": [ + "resource \"clc_group\" \"${myResourceName}\" {", + " name = \"my-${myResourceName}\"", + " description = \"my-description-${myResourceName}\"", + " location_id = \"WA1\"", + " name = \"frontends\"", + " parent = \"Default Group\"", + "}" + ] + }, + "clc_public_ip": { + "prefix": "tf-clc_public_ip", + "description": "define clc_public_ip resource.", + "body": [ + "resource \"clc_public_ip\" \"${myResourceName}\" {", + " name = \"my-${myResourceName}\"", + " description = \"my-description-${myResourceName}\"", + " server_id = \"\\${clc_server.node.0.id}\"", + " internal_ip_address = \"${clc_server.node.0.private_ip_address}\"", + " ports {", + " protocol = \"ICMP\"", + " port = -1", + " }\n", + " ports {", + " protocol = \"TCP\"", + " port = 22", + " }\n", + " ports {", + " protocol = \"TCP\"", + " port = 2000", + " port_to = 9000", + " }\n", + " source_restrictions {", + " cidr = \"85.39.22.15/30\"", + " }", + "}" + ] + }, + "clc_load_balancer": { + "prefix": "tf-clc_load_balancer", + "description": "define clc_load_balancer resource.", + "body": [ + "resource \"clc_load_balancer\" \"${myResourceName}\" {", + " name = \"my-${myResourceName}\"", + " description = \"my-description-${myResourceName}\"", + " data_center = \"\\${clc_group.frontends.location_id}\"", + " name = \"api\"", + " description = \"api load balancer\"", + " status = \"enabled\"", + "}" + ] + }, + "clc_load_balancer_pool": { + "prefix": "tf-clc_load_balancer_pool", + "description": "define clc_load_balancer_pool resource.", + "body": [ + "resource \"clc_load_balancer_pool\" \"${myResourceName}\" {", + " name = \"my-${myResourceName}\"", + " description = \"my-description-${myResourceName}\"", + " data_center = \"\\${clc_group.frontends.location_id}\"", + " load_balancer = \"\\${clc_load_balancer.api.id}\"", + " method = \"roundRobin\"", + " persistence = \"standard\"", + " port = 80\n", + " nodes {", + " status = \"enabled\"", + " ipAddress = \"\\${clc_server.node.0.private_ip_address}\"", + " privatePort = 3000", + " }\n", + " nodes {", + " status = \"enabled\"", + " ipAddress = \"\\${clc_server.node.1.private_ip_address}\"", + " privatePort = 3000", + " }", + "}" + ] + }, } \ No newline at end of file