examples: Remove the clc example

This has now moved into the repository for the CenturyLink Cloud provider,
linked from the README here.
This commit is contained in:
Martin Atkins 2017-07-24 15:20:11 -07:00
parent 3b95c85f18
commit 0e0c7883e4
5 changed files with 1 additions and 152 deletions

View File

@ -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)

View File

@ -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'

View File

@ -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
}
}

View File

@ -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}"
}

View File

@ -1,20 +0,0 @@
variable "clc_username" {
default = "<username>"
}
variable "clc_password" {
default = "<password>"
}
variable "clc_account" {
default = "<alias>"
}
# Ubuntu 14.04
variable "image" {
default = "ubuntu-14-64-template"
}
variable "app_port" {
default = 8080
}