You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Terraform Module for Hosts on ENTER\_INFRA\_PROVIDER
2
+
# Terraform Module for Hosts on GCP
3
3
4
-
> [!IMPORTANT]
5
-
> This readme is automation generated using the [`terraform-docs`](https://terraform-docs.io/) command with the static contenta taken from [doc\_fragments/header.md](doc\_fragments/header.md)
6
-
7
-
The `hosts` module contains resource files to provision and manage <ENTER\_INFRA\_PROVIDER> instances with flexible configuration options for compute resources, storage volumes, and networking. This module is designed for Cloudera on premise infrastructure deployments on <ENTER\_INFRA\_PROVIDER>.
4
+
The `hosts` module contains resource files to provision and manage GCP compute instances with flexible configuration options for compute resources, storage volumes, and networking. This module is designed for Cloudera on premise infrastructure deployments on GCP IaaS.
8
5
9
6
## Key Features
10
7
11
-
<ENTER\_KEY\_FEATURES>
8
+
***Flexible Instance Deployment**: Create single instances or multiple numbered instances with customizable naming patterns
9
+
***Multi-Zone Distribution**: Automatically distribute instances across multiple GCP zones for high availability
10
+
***Public and Private IP Management**: Support for ephemeral public IPs, static external IP addresses, or private-only configurations
11
+
***Custom Storage Volumes**: Attach additional persistent disks with configurable size, type, and mount points
12
+
***SSH Key Management**: Automated SSH public key injection for secure instance access
13
+
***Network Tag Support**: Apply network tags for firewall rule targeting and security group management
| <aname="input_name"></a> [name](#input\_name)| Instance base name. If 'quantity' is 0, this is the exact name of the single instance. If 'quantity' > 0, name will be <name>-NN. |`string`| n/a | yes |
50
+
| <aname="input_project_id"></a> [project\_id](#input\_project\_id)| GCP project ID where instances will be created. |`string`| n/a | yes |
51
+
| <aname="input_region"></a> [region](#input\_region)| GCP region (e.g., us-central1) for the instances (used for regional resources if any, zone is primary for instances). |`string`| n/a | yes |
52
+
| <aname="input_ssh_public_key"></a> [ssh\_public\_key](#input\_ssh\_public\_key)| The contents of the SSH public key to be added to the instance metadata for SSH access. |`string`| n/a | yes |
53
+
| <aname="input_subnet_ids"></a> [subnet\_ids](#input\_subnet\_ids)| List of subnet self-links or names to assign instances to. Instances will be distributed across these subnets. Must not be empty if instances are created. |`list(string)`| n/a | yes |
54
+
| <aname="input_zones"></a> [zones](#input\_zones)| GCP zone (e.g., us-central1-a) where instances will be created. |`list(string)`| n/a | yes |
55
+
| <aname="input_external_ip_address"></a> [external\_ip\_address](#input\_external\_ip\_address)| Optional: A pre-allocated static external IP address to assign to the instance. If provided, 'public\_ip' should typically be false as this takes precedence. |`string`|`null`| no |
56
+
| <aname="input_image"></a> [image](#input\_image)| Self-link the image (e.g., 'debian-cloud', 'centos-cloud', or your custom project). |`any`|`null`| no |
57
+
| <aname="input_image_os_user"></a> [image\_os\_user](#input\_image\_os\_user)| GCP image default user. (e.g., 'cloud-user' for rhel-8) |`string`|`"cloud-user"`| no |
58
+
| <aname="input_instance_labels"></a> [instance\_labels](#input\_instance\_labels)| Map of labels (key-value pairs) to apply to the compute instances. |`map(string)`|`{}`| no |
59
+
| <aname="input_instance_type"></a> [instance\_type](#input\_instance\_type)| GCP machine type (e.g., e2-medium, n1-standard-1). |`string`|`"e2-micro"`| no |
60
+
| <aname="input_network_tags"></a> [network\_tags](#input\_network\_tags)| List of network tags to attach to instances (for firewall rules). |`list(string)`|`[]`| no |
61
+
| <aname="input_public_ip"></a> [public\_ip](#input\_public\_ip)| Assign an ephemeral public IP address to the instance's network interface. Set to false if 'external\_ip\_address' is provided. |`bool`|`false`| no |
62
+
| <aname="input_quantity"></a> [quantity](#input\_quantity)| Number of instances. If 0 (default), one instance will be created with the exact 'name'. If > 0, 'quantity' instances will be created with numbered names. |`number`|`0`| no |
63
+
| <aname="input_root_volume"></a> [root\_volume](#input\_root\_volume)| Root volume configuration for the boot disk. | <pre>object({<br/> delete_on_termination = optional(bool, true)<br/> volume_size = optional(number, 20)<br/> volume_type = optional(string, "pd-standard")<br/> })</pre> |`{}`| no |
64
+
| <aname="input_startup_script"></a> [startup\_script](#input\_startup\_script)| Optional startup script (content, not path) to run on instance creation. |`string`|`"#!/bin/bash\nyum makecache >> /var/log/startup_script.log 2>&1\n"`| no |
65
+
| <aname="input_subnetwork_project_id"></a> [subnetwork\_project\_id](#input\_subnetwork\_project\_id)| The project ID of the subnetwork. Defaults to var.project\_id if not set (for non-Shared VPC scenarios). |`string`|`""`| no |
66
+
| <aname="input_volumes"></a> [volumes](#input\_volumes)| List of additional persistent volumes to create and attach to each instance. | <pre>list(object({<br/> name_suffix = string<br/> device_name = string # e.g. "sdb", "sdc" (will be /dev/sdb, /dev/sdc on instance)<br/> mount = string<br/> volume_size = optional(number, 100)<br/> volume_type = optional(string, "pd-standard")<br/> labels = optional(map(string), {})<br/> }))</pre> |`[]`| no |
40
67
41
68
## Outputs
42
69
43
-
No outputs.
70
+
| Name | Description |
71
+
|------|-------------|
72
+
| <aname="output_instance_details"></a> [instance\_details](#output\_instance\_details)| A list of detailed information for each created instance. |
73
+
| <aname="output_instances"></a> [instances](#output\_instances)| A list of the provisioned GCP compute instance objects. If quantity was 0, this list contains one instance. |
74
+
| <aname="output_storage_volumes"></a> [storage\_volumes](#output\_storage\_volumes)| Map of additional storage volumes, keyed by instance ID. Each value is a list of volume details attached to that instance. |
Copy file name to clipboardExpand all lines: modules/hosts/doc_fragments/header.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,15 @@
1
-
# Terraform Module for Hosts on ENTER_INFRA_PROVIDER
1
+
# Terraform Module for Hosts on GCP
2
2
3
-
> [!IMPORTANT]
4
-
> This readme is automation generated using the [`terraform-docs`](https://terraform-docs.io/) command with the static contenta taken from [doc_fragments/header.md](doc_fragments/header.md)
5
-
6
-
The `hosts` module contains resource files to provision and manage <ENTER_INFRA_PROVIDER> instances with flexible configuration options for compute resources, storage volumes, and networking. This module is designed for Cloudera on premise infrastructure deployments on <ENTER_INFRA_PROVIDER>.
3
+
The `hosts` module contains resource files to provision and manage GCP compute instances with flexible configuration options for compute resources, storage volumes, and networking. This module is designed for Cloudera on premise infrastructure deployments on GCP IaaS.
7
4
8
5
## Key Features
9
6
10
-
<ENTER_KEY_FEATURES>
7
+
***Flexible Instance Deployment**: Create single instances or multiple numbered instances with customizable naming patterns
8
+
***Multi-Zone Distribution**: Automatically distribute instances across multiple GCP zones for high availability
9
+
***Public and Private IP Management**: Support for ephemeral public IPs, static external IP addresses, or private-only configurations
10
+
***Custom Storage Volumes**: Attach additional persistent disks with configurable size, type, and mount points
11
+
***SSH Key Management**: Automated SSH public key injection for secure instance access
12
+
***Network Tag Support**: Apply network tags for firewall rule targeting and security group management
0 commit comments