Skip to content
This repository has been archived by the owner on Mar 30, 2020. It is now read-only.

Commit

Permalink
Merge pull request #2 from alexindeed/master
Browse files Browse the repository at this point in the history
[src] removed provider from module
  • Loading branch information
alexindeed authored Apr 4, 2019
2 parents bde7d45 + de30a93 commit bc07218
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 50 deletions.
11 changes: 0 additions & 11 deletions spotinst_ocean_controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ This module manages the following resources:
* kubernetes_deployment

## Variables
* host
* username
* password
* spotinst_account
* spotinst_token
* spotinst_cluster_identifier
Expand All @@ -25,20 +22,12 @@ Fill in the following arguments in example.tf:
module "spotinst_ocean_controller" {
source = "github.com/spotinst/terraform-spotinst-modules//spotinst_ocean_controller/?ref=v0.1.0"
config_context_cluster = ""
# host = ""
# username = ""
# password = ""
spotinst_account = ""
spotinst_token = ""
spotinst_cluster_identifier = ""
}
```

We currently support authentication through either static host/username/password or through use of kubeconfig. Please update the template with your preferred method.

From within ./example, run the following commands:
```
terraform get
Expand Down
19 changes: 8 additions & 11 deletions spotinst_ocean_controller/examples/example.tf
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@

########################################################################
# general purpose example
########################################################################

module "spotinst_ocean_controller" {
source = "github.com/spotinst/terraform-spotinst-modules//spotinst_ocean_controller/?ref=v0.1.0"

provider "kubernetes" {
config_context_cluster = ""

# host = ""
# username = ""
# password = ""
}

# host = ""
# username = ""
# password = ""
module "spotinst_ocean_controller" {
source = "github.com/spotinst/terraform-spotinst-modules//spotinst_ocean_controller/?ref=v1.0.1"

spotinst_account = "act-123456"
spotinst_token = "<my_token>"
Expand Down
8 changes: 0 additions & 8 deletions spotinst_ocean_controller/main.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
provider "kubernetes" {
config_context_cluster = "${var.config_context_cluster}"

host = "${var.host}"
username = "${var.username}"
password = "${var.password}"
}

resource "kubernetes_config_map" "configmap" {
metadata {
name = "spotinst-kubernetes-cluster-controller-config"
Expand Down
20 changes: 0 additions & 20 deletions spotinst_ocean_controller/variables.tf
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
variable "host" {
description = "The hostname (in form of URI) of Kubernetes master. Can be sourced from KUBE_HOST. Defaults to https://localhost."
default = ""
}

variable "username" {
description = "The username to use for HTTP basic authentication when accessing the Kubernetes master endpoint. Can be sourced from KUBE_USER."
default = ""
}

variable "password" {
description = "The password to use for HTTP basic authentication when accessing the Kubernetes master endpoint. Can be sourced from KUBE_PASSWORD."
default = ""
}

variable "config_context_cluster" {
description = "Cluster context of the kube config (name of the kubeconfig cluster, --cluster flag in kubectl)."
default = ""
}

variable "spotinst_token" {
description = "The token used when accessing your Spotinst account"
}
Expand Down

0 comments on commit bc07218

Please sign in to comment.