GithubHelp home page GithubHelp logo

andreypetruk / terraform-provider-luminate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andriipetruk/terraform-provider-luminate

0.0 0.0 0.0 3.73 MB

Terraform luminate.io provider

License: BSD 3-Clause "New" or "Revised" License

Makefile 7.20% Go 77.69% Shell 15.11%

terraform-provider-luminate's Introduction

Terraform "luminate" provider

The luminate Terraform provider based on go-luminate Go client library for accessing the luminate.io API

Installation

Note: the Go language compiler is required for building the provider.

Clone the repository into your $GOPATH:

$ mkdir -p $GOPATH/src/github.com/andriipetruk
$ git clone https://github.com/andriipetruk/terraform-provider-luminate $GOPATH/src/github.com/andriipetruk/terraform-provider-luminate

Enter the provider directory and build the provider

$ cd $GOPATH/src/github.com/andriipetruk/terraform-provider-luminate
$ make build

Using

We have two way to use provider

  1. Initialize the stack using option for terraform init
$ cd /path/to/terraform/stack
$ terraform init -plugin-dir=$GOPATH/bin
$ terraform plan

or

  1. Installing provider to local plugin dir
$  cp ~/go/bin/terraform-provider-luminate ~/.terraform.d/plugins/

Configuration

Global provider options

  • tenant_name (required – type string): Tenant name
  • client_id (required – type string): Client ID
  • client_secret (required – type string): Client Secret

For more detail please look https://luminatepublicapi.docs.apiary.io/#introduction/authorization

Resource "luminate_site"

  • site_name (required – type string): Site name to be created

Resource "luminate_connector"

  • connector_name (required – type string): Connector name to be created
  • site_id (required – type string): Site id for link connecter on it

Resource "luminate_app_http"

  • app_name (required – type string): Application name to be created
  • internal_address (required – type string): Application internal address format {protocol}://host.domain , example - http://test.local.com
  • site_id (required – type string): Site id for link connecter on it

Resource "luminate_app_ssh"

  • app_name (required – type string): Application name to be created
  • internal_address (required – type string): Application internal address format tcp://host.domain:{port} , example - tcp://test.local.com:22
  • ssh_login (required – type string): Login on host for ssh access
  • site_id (required – type string): Site id for link connecter on it

Resource "luminate_app_tcp"

  • app_name (required – type string): Application name to be created
  • internal_address (required – type string): Application internal address format host.domain , example - test.local.com
  • tcp_port (required – type string): tcp port number for ssh access
  • site_id (required – type string): Site id for link connecter on it

Example Usage

Using the following Terraform configuration will be created new site, connector and http application. Also will be deployed connector to kubernets cluster :


provider "luminate" {
  tenant_name   = "${var.luminate["tenant"]}"
  client_id     = "${var.luminate["client_id"]}"
  client_secret = "${var.luminate["client_secret"]}"
}


resource "luminate_site" "newSite" {
  depends_on = ["module.cluster_poc1"]
  site_name = "${var.luminate["site_name"]}"
}

resource "luminate_connector" "newConnector" {
  depends_on = ["module.cluster_poc1"]
  connector_name = "${var.luminate["connector_name"]}"
  site_id = "${luminate_site.newSite.id}"
}

resource "null_resource" "connector_install" {
  depends_on = ["module.cluster_poc1"]
  provisioner "local-exec" {
    command = "${luminate_connector.newConnector.install}"
  }
}

resource "luminate_app_http" "stackstorm-st2web" {
  app_name =  "${var.luminate-st2web["app_name"]}"
  internal_address = "${var.luminate-st2web["internal_address"]}"
  site_id = "${luminate_site.newSite.id}"
}

Testing

Not ready yet.

Roadmap

Will be added

Contributing

Any PR are welcome.

Versioning

In general, go-luminate follows semver as closely as we can for tagging releases of the package.

License

This library is distributed under the BSD-style license found in the LICENSE file.

terraform-provider-luminate's People

Contributors

andriipetruk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.