Skip to content

Commit

Permalink
Profile changes (#41)
Browse files Browse the repository at this point in the history
* Adding vpc in variables for eks

* multi cluster profile changes

* modifying examples

* Update examples

* generate

* Final changes

Co-authored-by: Saad Malik <[email protected]>
  • Loading branch information
rishi-anand and saamalik authored May 26, 2021
1 parent 07431e0 commit f6f700d
Show file tree
Hide file tree
Showing 26 changed files with 618 additions and 395 deletions.
74 changes: 50 additions & 24 deletions docs/resources/cluster_aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,37 @@ data "spectrocloud_cluster_profile" "profile" {
resource "spectrocloud_cluster_aws" "cluster" {
name = var.cluster_name
cluster_profile_id = data.spectrocloud_cluster_profile.profile.id
cloud_account_id = data.spectrocloud_cloudaccount_aws.account.id
name = var.cluster_name
cloud_account_id = data.spectrocloud_cloudaccount_aws.account.id
cloud_config {
ssh_key_name = "default"
region = "us-west-2"
}
# To override or specify values for a cluster:
# pack {
# name = "spectro-byo-manifest"
# tag = "1.0.x"
# values = <<-EOT
# manifests:
# byo-manifest:
# contents: |
# # Add manifests here
# apiVersion: v1
# kind: Namespace
# metadata:
# labels:
# app: wordpress
# app2: wordpress2
# name: wordpress
# EOT
# }
cluster_profile {
id = data.spectrocloud_cluster_profile.profile.id
# To override or specify values for a cluster:
# pack {
# name = "spectro-byo-manifest"
# tag = "1.0.x"
# values = <<-EOT
# manifests:
# byo-manifest:
# contents: |
# # Add manifests here
# apiVersion: v1
# kind: Namespace
# metadata:
# labels:
# app: wordpress
# app2: wordpress2
# name: wordpress
# EOT
# }
}
machine_pool {
control_plane = true
Expand All @@ -77,14 +80,15 @@ resource "spectrocloud_cluster_aws" "cluster" {

### Required

- **cloud_account_id** (String)
- **cloud_config** (Block List, Min: 1, Max: 1) (see [below for nested schema](#nestedblock--cloud_config))
- **cluster_profile_id** (String)
- **machine_pool** (Block Set, Min: 1) (see [below for nested schema](#nestedblock--machine_pool))
- **name** (String)

### Optional

- **cloud_account_id** (String)
- **cluster_profile** (Block List) (see [below for nested schema](#nestedblock--cluster_profile))
- **cluster_profile_id** (String, Deprecated)
- **id** (String) The ID of this resource.
- **os_patch_after** (String)
- **os_patch_on_boot** (Boolean)
Expand Down Expand Up @@ -124,6 +128,28 @@ Optional:
- **update_strategy** (String)


<a id="nestedblock--cluster_profile"></a>
### Nested Schema for `cluster_profile`

Required:

- **id** (String) The ID of this resource.

Optional:

- **pack** (Block List) (see [below for nested schema](#nestedblock--cluster_profile--pack))

<a id="nestedblock--cluster_profile--pack"></a>
### Nested Schema for `cluster_profile.pack`

Required:

- **name** (String)
- **tag** (String)
- **values** (String)



<a id="nestedblock--pack"></a>
### Nested Schema for `pack`

Expand Down
72 changes: 49 additions & 23 deletions docs/resources/cluster_azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ data "spectrocloud_cluster_profile" "profile" {
}
resource "spectrocloud_cluster_azure" "cluster" {
name = var.cluster_name
cluster_profile_id = data.spectrocloud_cluster_profile.profile.id
cloud_account_id = data.spectrocloud_cloudaccount_azure.account.id
name = var.cluster_name
cloud_account_id = data.spectrocloud_cloudaccount_azure.account.id
cloud_config {
subscription_id = var.azure_subscription_id
Expand All @@ -34,25 +33,29 @@ resource "spectrocloud_cluster_azure" "cluster" {
ssh_key = var.cluster_ssh_public_key
}
# To override or specify values for a cluster:
# pack {
# name = "spectro-byo-manifest"
# tag = "1.0.x"
# values = <<-EOT
# manifests:
# byo-manifest:
# contents: |
# # Add manifests here
# apiVersion: v1
# kind: Namespace
# metadata:
# labels:
# app: wordpress
# app2: wordpress2
# name: wordpress
# EOT
# }
cluster_profile {
id = data.spectrocloud_cluster_profile.profile.id
# To override or specify values for a cluster:
# pack {
# name = "spectro-byo-manifest"
# tag = "1.0.x"
# values = <<-EOT
# manifests:
# byo-manifest:
# contents: |
# # Add manifests here
# apiVersion: v1
# kind: Namespace
# metadata:
# labels:
# app: wordpress
# app2: wordpress2
# name: wordpress
# EOT
# }
}
machine_pool {
control_plane = true
Expand Down Expand Up @@ -83,12 +86,13 @@ resource "spectrocloud_cluster_azure" "cluster" {

- **cloud_account_id** (String)
- **cloud_config** (Block List, Min: 1, Max: 1) (see [below for nested schema](#nestedblock--cloud_config))
- **cluster_profile_id** (String)
- **machine_pool** (Block Set, Min: 1) (see [below for nested schema](#nestedblock--machine_pool))
- **name** (String)

### Optional

- **cluster_profile** (Block List) (see [below for nested schema](#nestedblock--cluster_profile))
- **cluster_profile_id** (String, Deprecated)
- **id** (String) The ID of this resource.
- **os_patch_after** (String)
- **os_patch_on_boot** (Boolean)
Expand Down Expand Up @@ -139,6 +143,28 @@ Required:



<a id="nestedblock--cluster_profile"></a>
### Nested Schema for `cluster_profile`

Required:

- **id** (String) The ID of this resource.

Optional:

- **pack** (Block List) (see [below for nested schema](#nestedblock--cluster_profile--pack))

<a id="nestedblock--cluster_profile--pack"></a>
### Nested Schema for `cluster_profile.pack`

Required:

- **name** (String)
- **tag** (String)
- **values** (String)



<a id="nestedblock--pack"></a>
### Nested Schema for `pack`

Expand Down
72 changes: 49 additions & 23 deletions docs/resources/cluster_eks.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,37 @@ data "spectrocloud_cluster_profile" "profile" {
resource "spectrocloud_cluster_eks" "cluster" {
name = var.cluster_name
cluster_profile_id = data.spectrocloud_cluster_profile.profile.id
cloud_account_id = data.spectrocloud_cloudaccount_aws.account.id
name = var.cluster_name
cloud_account_id = data.spectrocloud_cloudaccount_aws.account.id
cloud_config {
ssh_key_name = "default"
region = "us-west-2"
}
# To override or specify values for a cluster:
# pack {
# name = "spectro-byo-manifest"
# tag = "1.0.x"
# values = <<-EOT
# manifests:
# byo-manifest:
# contents: |
# # Add manifests here
# apiVersion: v1
# kind: Namespace
# metadata:
# labels:
# app: wordpress
# app2: wordpress2
# name: wordpress
# EOT
# }
cluster_profile {
id = data.spectrocloud_cluster_profile.profile.id
# To override or specify values for a cluster:
# pack {
# name = "spectro-byo-manifest"
# tag = "1.0.x"
# values = <<-EOT
# manifests:
# byo-manifest:
# contents: |
# # Add manifests here
# apiVersion: v1
# kind: Namespace
# metadata:
# labels:
# app: wordpress
# app2: wordpress2
# name: wordpress
# EOT
# }
}
machine_pool {
control_plane = true
Expand Down Expand Up @@ -83,13 +86,14 @@ resource "spectrocloud_cluster_eks" "cluster" {

- **cloud_account_id** (String)
- **cloud_config** (Block List, Min: 1, Max: 1) (see [below for nested schema](#nestedblock--cloud_config))
- **cluster_profile_id** (String)
- **fargate_profile** (Block List, Min: 1) (see [below for nested schema](#nestedblock--fargate_profile))
- **machine_pool** (Block List, Min: 1) (see [below for nested schema](#nestedblock--machine_pool))
- **name** (String)

### Optional

- **cluster_profile** (Block List) (see [below for nested schema](#nestedblock--cluster_profile))
- **cluster_profile_id** (String, Deprecated)
- **id** (String) The ID of this resource.
- **pack** (Block List) (see [below for nested schema](#nestedblock--pack))
- **timeouts** (Block, Optional) (see [below for nested schema](#nestedblock--timeouts))
Expand Down Expand Up @@ -158,6 +162,28 @@ Optional:
- **azs** (List of String)


<a id="nestedblock--cluster_profile"></a>
### Nested Schema for `cluster_profile`

Required:

- **id** (String) The ID of this resource.

Optional:

- **pack** (Block List) (see [below for nested schema](#nestedblock--cluster_profile--pack))

<a id="nestedblock--cluster_profile--pack"></a>
### Nested Schema for `cluster_profile.pack`

Required:

- **name** (String)
- **tag** (String)
- **values** (String)



<a id="nestedblock--pack"></a>
### Nested Schema for `pack`

Expand Down
Loading

0 comments on commit f6f700d

Please sign in to comment.