Giter VIP home page Giter VIP logo

terraform-google-sts-csi-disks's Introduction

StatefulSet GCE Disks with CSI Driver

This module provisions multiple GCE disks (zonal or regional) for use with a StatefulSet in a GKE cluster backed by CSI drivers.

This requires a GKE cluster with CSI drivers enabled.

Requirements

Name Version
terraform >= 0.14
google-beta >= 3.38
kubernetes >= 1.11.4

Providers

Name Version
google n/a
google-beta >= 3.38
kubernetes >= 1.11.4

Inputs

Name Description Type Default Required
disk_description_template Template for disk description. <replica> will be replaced with count index string "Data replica <replca>" no
disk_encryption_key One or more disk encryption keys for disks. element will be used to index the list
list(object({
raw_key = optional(string), # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
sha256 = optional(string), # The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
kms_key_self_link = optional(string), # The self link of the encryption key used to encrypt the disk. Also called KmsKeyName in the cloud console
kms_key_service_account = optional(string), # The service account used for the encryption request for the given KMS key.
}))
[] no
disk_interface Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Default value is SCSI. Possible values are SCSI and NVME. Not supported on regional disks string "SCSI" no
disk_size Size of Disk in GiB to create number 10 no
disk_source_image Source image for disk. element will be used to index the list. Not supported on regional disks.
list(object({
image = string, # source image

# Optional image encryption
raw_key = optional(string), # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
sha256 = optional(string), # The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
kms_key_self_link = optional(string), # The self link of the encryption key used to encrypt the disk. Also called KmsKeyName in the cloud console
kms_key_service_account = optional(string), # The service account used for the encryption request for the given KMS key.
}))
[] no
disk_source_snapshot Source image for disk. element will be used to index the list
list(object({
snapshot = string, # source snapshot

# Optional image encryption
raw_key = optional(string), # Specifies a 256-bit customer-supplied encryption key, encoded in RFC 4648 base64 to either encrypt or decrypt this resource.
sha256 = optional(string), # The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource.
kms_key_self_link = optional(string), # The self link of the encryption key used to encrypt the disk. Also called KmsKeyName in the cloud console
kms_key_service_account = optional(string), # The service account used for the encryption request for the given KMS key.
}))
[] no
disk_type Type of disks to create string "pd-balanced" no
disks_prefix Name prefix of GCE disks to creates string n/a yes
kubernetes_annotations Annotations for Kubernetes resources map(string) {} no
kubernetes_labels Labels for Kubernetes resources map(string) {} no
labels Labels to add to GCP resources map(string) {} no
project_id Project ID for resources. Defaults to provider project ID string null no
pv_prefix Prefix of PVC and PV to create. Name will be joined with -<number> string n/a yes
pvc_namespace Namespace for PVC string "default" no
region GCP Region. DEfaults to provider region string null no
regional_disk_zones Zones for regional disks. element will be used to index the list. If not specified, all GCP zones will be used in round robin. list(list(string)) [] no
regional_disks Use regional disks. Otherwise, zonal disks will be used bool false no
replicas Number of replicas to create number n/a yes
resource_policy_enabled Create resource policy to periodically snapshot disks bool true no
resource_policy_name Name of the resource policy string "" no
snapshot_daily Take snapshot of disks daily bool true no
snapshot_day_of_weeks Map where the key is the day of the week to take snapshot and the value is the time of the day map
{
"SUNDAY": "00:00",
"WEDNESDAY": "00:00"
}
no
snapshot_days_in_cycle Number of days between snapshots for daily snapshots number 1 no
snapshot_hourly Take snapshot of disks hourly bool false no
snapshot_hours_in_cycle Number of hours between snapshots for hourly snapshots number 1 no
snapshot_labels Labels to be placed on snapshots map(string) {} no
snapshot_retention_policy Retention policy of snapshots. Set to null to not have any retention policy
object({
max_retention_days = number # Maximum age of the snapshot that is allowed to be kept.
on_source_disk_delete = optional(string) # Specifies the behavior to apply to scheduled snapshots when the source disk is deleted. Default value is KEEP_AUTO_SNAPSHOTS. Possible values are KEEP_AUTO_SNAPSHOTS and APPLY_RETENTION_POLICY.
})
{
"max_retention_days": 14,
"on_source_disk_delete": "KEEP_AUTO_SNAPSHOTS"
}
no
snapshot_start_time Time in UTC format to start snapshot. Context depends on whether it's daily or hourly string "19:00" no
snapshot_storage_locations Cloud Storage bucket location to store the auto snapshot (regional or multi-regional). Defaults to region in var.region or provider region list(string) [] no
snapshot_weekly Take snapshot of disks weekly bool false no
storage_class_name StorageClassName for PV string "" no
zonal_disk_zones Zones for disks. element will be used to index the list. If not specified, all GCP zones will be used in round robin. list(string) [] no

Outputs

Name Description
pd List of persistent Disk IDs
pv List of names of PV/PVC created
resource_policy Resource Policy ID, if enabled

terraform-google-sts-csi-disks's People

Contributors

lawliet89 avatar

Watchers

James Cloos avatar  avatar Chris Sng avatar  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.