Skip to content

Commit

Permalink
Update new resource examples
Browse files Browse the repository at this point in the history
Fix up formatting. Add a few notes from QA session with Ibrahim and Tom.
  • Loading branch information
bkircher committed Apr 8, 2021
1 parent b80e91f commit 9a774d2
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 61 deletions.
22 changes: 0 additions & 22 deletions managed-k8s/cluster-new.tf

This file was deleted.

47 changes: 16 additions & 31 deletions managed-k8s/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,25 @@ terraform {
required_providers {
gridscale = {
source = "gridscale/gridscale"
version = "~> 1.8.0"
version = "~> 1.9.0"
}
}
}

resource "gridscale_paas" "cluster" {
name = "mycluster"
service_template_uuid = "22e93afb-6b9d-4524-98a4-6580169f76b1" # Kubernetes (Gen 1) 1.19.4-gs1
timeouts {
create = "20m"
}
parameter {
param = "k8s_worker_node_count"
type = "int"
value = "3"
}
parameter {
param = "k8s_worker_node_cores"
type = "int"
value = "2"
}
parameter {
param = "k8s_worker_node_ram"
type = "int"
value = "4"
}
parameter {
param = "k8s_worker_node_storage"
type = "int"
value = "30"
}
parameter {
param = "k8s_worker_node_storage_type"
type = "string"
value = "storage"
resource "gridscale_k8s" "my_cluster" {
name = "my_cluster"

# Define the desired Kubernetes release. Define which release of GSK will be
# used for the cluster. For convenience, please use gscloud to get the list of
# available Kubernetes releases.
release = "1.17"

node_pool {
name = "my_node_pool"
node_count = 2
cores = 1
memory = 2
storage = 30
storage_type = "storage_insane"
}
}
3 changes: 3 additions & 0 deletions postgresql/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export GRIDSCALE_TOKEN=your-api-token
export GRIDSCALE_URL=https://api.gridscale.io
export GRIDSCALE_UUID=your-user-id
23 changes: 15 additions & 8 deletions postgresql/postgres.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,20 @@ terraform {
}
}

resource "gridscale_postgresql" "terra-postgres-test" {
resource "gridscale_postgresql" "my_postgres_cluster" {
name = "test"
# The PostgreSQL release of this instance. For convenience, please use gscloud (https://github.com/gridscale/gscloud) to get the list of available postgreSQL service releases.
release = "13"
# Performance class of postgreSQL service. Available performance classes at the time of writing: `standard`, `high`, `insane`, `ultra`.
performance_class = "standard"
# Maximum CPU core count. The PostgreSQL instance's CPU core count will be autoscaled based on the workload.
# The number of cores stays between 1 and `max_core_count`.

# The PostgreSQL release of this instance. For convenience, please use gscloud
# (https://github.com/gridscale/gscloud) to get the list of available
# PostgreSQL releases.
release = "12"

# Performance class of the PaaS service. Available performance classes at
# the time of writing are `standard`, `high`, `insane`, `ultra`.
performance_class = "insane"

# Maximum CPU core count. The PostgreSQL instance's CPU core count will be
# autoscaled based on the workload. The number of cores stays between 1 and
# `max_core_count`.
max_core_count = 20
}
}

0 comments on commit 9a774d2

Please sign in to comment.