From 0e0c7883e4a160b6d67b690dcccc61789ac7f094 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Mon, 24 Jul 2017 15:20:11 -0700 Subject: [PATCH] examples: Remove the clc example This has now moved into the repository for the CenturyLink Cloud provider, linked from the README here. --- examples/README.md | 1 + examples/clc/README.md | 9 ---- examples/clc/main.tf | 96 --------------------------------------- examples/clc/outputs.tf | 27 ----------- examples/clc/variables.tf | 20 -------- 5 files changed, 1 insertion(+), 152 deletions(-) delete mode 100644 examples/clc/README.md delete mode 100644 examples/clc/main.tf delete mode 100644 examples/clc/outputs.tf delete mode 100644 examples/clc/variables.tf diff --git a/examples/README.md b/examples/README.md index 8a9dbe447..55e463a5c 100644 --- a/examples/README.md +++ b/examples/README.md @@ -23,4 +23,5 @@ repositories contain documentation specific to their provider: * [AliCloud Examples](https://github.com/terraform-providers/terraform-provider-alicloud/tree/master/examples) * [Amazon Web Services Examples](https://github.com/terraform-providers/terraform-provider-aws/tree/master/examples) * [Azure Examples](https://github.com/terraform-providers/terraform-provider-azurerm/tree/master/examples) +* [CenturyLink Cloud Examples](https://github.com/terraform-providers/terraform-provider-clc/tree/master/examples) * [Google Cloud Examples](https://github.com/terraform-providers/terraform-provider-google/tree/master/examples) diff --git a/examples/clc/README.md b/examples/clc/README.md deleted file mode 100644 index 30cfa5ab3..000000000 --- a/examples/clc/README.md +++ /dev/null @@ -1,9 +0,0 @@ -## Creating a standard web application - -This example provides sample configuration for creating the infra for a basic webapp. - -For CLC provider, set up your CLC environment as outlined in https://www.terraform.io/docs/providers/clc/index.html - -Once ready run 'terraform plan' to review. - -Once satisfied with plan, run 'terraform apply' diff --git a/examples/clc/main.tf b/examples/clc/main.tf deleted file mode 100644 index 2e912dad2..000000000 --- a/examples/clc/main.tf +++ /dev/null @@ -1,96 +0,0 @@ -# -------------------- -# Credentials -provider "clc" { - username = "${var.clc_username}" - password = "${var.clc_password}" - account = "${var.clc_account}" -} - -# -------------------- -# Provision/Resolve a server group -resource "clc_group" "frontends" { - location_id = "CA1" - name = "frontends" - parent = "Default Group" -} - -# -------------------- -# Provision a server -resource "clc_server" "node" { - name_template = "trusty" - 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" - } - - additional_disks { - size_gb = 10 - type = "raw" - } -} - -# -------------------- -# Provision a public ip -resource "clc_public_ip" "backdoor" { - server_id = "${clc_server.node.0.id}" - internal_ip_address = "${clc_server.node.0.private_ip_address}" - - ports { - protocol = "ICMP" - port = -1 - } - - ports { - protocol = "TCP" - port = 22 - } - - source_restrictions { - cidr = "173.60.0.0/16" - } - - # ssh in and start a simple http server on :8080 - provisioner "remote-exec" { - inline = [ - "cd /tmp; python -mSimpleHTTPServer > /dev/null 2>&1 &", - ] - - connection { - host = "${clc_public_ip.backdoor.id}" - user = "root" - password = "${clc_server.node.password}" - } - } -} - -# -------------------- -# Provision a load balancer -resource "clc_load_balancer" "frontdoor" { - data_center = "${clc_group.frontends.location_id}" - name = "frontdoor" - description = "frontdoor" - status = "enabled" -} - -# -------------------- -# Provision a load balancer pool -resource "clc_load_balancer_pool" "pool" { - data_center = "${clc_group.frontends.location_id}" - load_balancer = "${clc_load_balancer.frontdoor.id}" - method = "roundRobin" - persistence = "standard" - port = 80 - - nodes { - status = "enabled" - ipAddress = "${clc_server.node.private_ip_address}" - privatePort = 8000 - } -} diff --git a/examples/clc/outputs.tf b/examples/clc/outputs.tf deleted file mode 100644 index bfc751994..000000000 --- a/examples/clc/outputs.tf +++ /dev/null @@ -1,27 +0,0 @@ -output "group_id" { - value = "${clc_group.frontends.id}" -} - -output "node_id" { - value = "${clc_server.node.id}" -} - -output "node_ip" { - value = "${clc_server.node.private_ip_address}" -} - -output "node_password" { - value = "${clc_server.node.password}" -} - -output "backdoor" { - value = "${clc_public_ip.backdoor.id}" -} - -output "frontdoor" { - value = "${clc_load_balancer.frontdoor.ip_address}" -} - -output "pool" { - value = "curl -vv ${clc_load_balancer.frontdoor.ip_address}" -} diff --git a/examples/clc/variables.tf b/examples/clc/variables.tf deleted file mode 100644 index 5bba78595..000000000 --- a/examples/clc/variables.tf +++ /dev/null @@ -1,20 +0,0 @@ -variable "clc_username" { - default = "" -} - -variable "clc_password" { - default = "" -} - -variable "clc_account" { - default = "" -} - -# Ubuntu 14.04 -variable "image" { - default = "ubuntu-14-64-template" -} - -variable "app_port" { - default = 8080 -}