Skip to content

Commit

Permalink
add db host volume
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Oehrli committed Jan 12, 2021
1 parent 0d7d90f commit 4ea868c
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 24 deletions.
29 changes: 16 additions & 13 deletions doc/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,22 @@ Variables for the configuration of the terraform module, defined in [variables](

## DB Host

| Parameter | Description | Values | Default |
|----------------------------|---------------------------------------------------------------------------------------------------------|-------------------|----------------|
| `db_host_bootstrap` | Bootstrap script to provision the host. | | n/a |
| `db_host_enabled` | Whether to create the host or not. | true/false | false |
| `db_host_image_id` | Provide a custom image id for the host or leave as OEL (Oracle Enterprise Linux). | OCID | OEL |
| `db_host_name` | A Name portion of host. | | db |
| `db_host_public_ip` | whether to assigne a public IP or not. | true/false | false |
| `db_host_private_ip` | Private IP for the host. | | 10.0.1.6 |
| `db_host_os` | Base OS for the host. This is used to identify the default `db_host_image_id` | | Oracle Linux |
| `db_host_os_version` | Define the default OS version for Oracle Linux. This is used to identify the default `db_host_image_id` | | 7.8 |
| `db_host_shape` | The shape of compute instance. | | VM.Standard2.2 |
| `db_host_boot_volume_size` | Size of the boot volume. | | 150 |
| `db_host_state` | Whether host should be either RUNNING or STOPPED state. | RUNNING / STOPPED | RUNNING |
| Parameter | Description | Values | Default |
|----------------------------------|---------------------------------------------------------------------------------------------------------|-----------------------|-----------------|
| `db_host_bootstrap` | Bootstrap script to provision the host. | | n/a |
| `db_host_enabled` | Whether to create the host or not. | true/false | false |
| `db_host_image_id` | Provide a custom image id for the host or leave as OEL (Oracle Enterprise Linux). | OCID | OEL |
| `db_host_name` | A Name portion of host. | | db |
| `db_host_public_ip` | whether to assigne a public IP or not. | true/false | false |
| `db_host_private_ip` | Private IP for the host. | | 10.0.1.6 |
| `db_host_os` | Base OS for the host. This is used to identify the default `db_host_image_id` | | Oracle Linux |
| `db_host_os_version` | Define the default OS version for Oracle Linux. This is used to identify the default `db_host_image_id` | | 7.8 |
| `db_host_shape` | The shape of compute instance. | | VM.Standard2.2 |
| `db_host_boot_volume_size` | Size of the boot volume. | | 150 |
| `db_host_volume_enabled` | Whether to create an additional volume or not. | true/false | false |
| `db_host_volume_attachment_type` | The type of volume | iscsi/paravirtualized | paravirtualized |
| `db_host_volume_size` | Size of the volume. | | 256 |
| `db_host_state` | Whether host should be either RUNNING or STOPPED state. | RUNNING / STOPPED | RUNNING |

## Trivadis LAB

Expand Down
25 changes: 14 additions & 11 deletions examples/terraform.tfvars.example
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,20 @@ guacamole_connections = ""
staging = 1

# Host Parameter ------------------------------------------------------------
db_host_enabled = false
db_host_name = "db"
db_host_public_ip = false
db_host_private_ip = "10.0.1.6"
db_host_image_id = "OEL"
db_host_os = "Oracle Linux"
db_host_os_version = "7.8"
db_host_shape = "VM.Standard2.2"
db_host_boot_volume_size = 150
db_host_state = "RUNNING"
db_host_bootstrap = ""
db_host_enabled = false
db_host_name = "db"
db_host_public_ip = false
db_host_private_ip = "10.0.1.6"
db_host_image_id = "OEL"
db_host_os = "Oracle Linux"
db_host_os_version = "7.8"
db_host_shape = "VM.Standard2.2"
db_host_boot_volume_size = 150
db_host_volume_enabled = false
db_host_volume_attachment_type = "paravirtualized"
db_host_volume_size = 256
db_host_state = "RUNNING"
db_host_bootstrap = ""

# Trivadis LAB specific parameter -------------------------------------------
tvd_participants = 1
Expand Down
18 changes: 18 additions & 0 deletions examples/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,24 @@ variable "db_host_boot_volume_size" {
type = number
}

variable "db_host_volume_enabled" {
description = "whether to create an additional volume or not."
default = false
type = bool
}

variable "db_host_volume_attachment_type" {
description = "The type of volume."
default = "paravirtualized"
type = string
}

variable "db_host_volume_size" {
description = "Size of the additional volume."
default = 256
type = number
}

variable "db_host_state" {
description = "Whether the host should be either RUNNING or STOPPED state. "
default = "RUNNING"
Expand Down
3 changes: 3 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ module "tvdlab-db" {
host_os = var.db_host_os
host_os_version = var.db_host_os_version
host_boot_volume_size = var.db_host_boot_volume_size
host_volume_enabled = var.db_host_volume_enabled
host_volume_attachment_type = var.db_host_volume_attachment_type
host_volume_size = var.db_host_volume_size
hosts_file = var.hosts_file
yum_upgrade = var.yum_upgrade
}
Expand Down
18 changes: 18 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,24 @@ variable "db_host_boot_volume_size" {
type = number
}

variable "db_host_volume_enabled" {
description = "whether to create an additional volume or not."
default = false
type = bool
}

variable "db_host_volume_attachment_type" {
description = "The type of volume."
default = "paravirtualized"
type = string
}

variable "db_host_volume_size" {
description = "Size of the additional volume."
default = 256
type = number
}

variable "db_host_state" {
description = "Whether the host should be either RUNNING or STOPPED state. "
default = "RUNNING"
Expand Down

0 comments on commit 4ea868c

Please sign in to comment.