Skip to content

Commit

Permalink
Add support for FreeIPA and DL major operating system
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Enright <[email protected]>
  • Loading branch information
jimright committed Sep 30, 2024
1 parent 0b3470f commit 9e277d9
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/terraform-cdp-deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ No resources.
| <a name="input_freeipa_image_id"></a> [freeipa\_image\_id](#input\_freeipa\_image\_id) | Image ID to use for creating FreeIPA instances | `string` | `null` | no |
| <a name="input_freeipa_instance_type"></a> [freeipa\_instance\_type](#input\_freeipa\_instance\_type) | Instance Type to use for creating FreeIPA instances | `string` | `null` | no |
| <a name="input_freeipa_instances"></a> [freeipa\_instances](#input\_freeipa\_instances) | The number of FreeIPA instances to create in the environment | `number` | `3` | no |
| <a name="input_freeipa_os"></a> [freeipa\_os](#input\_freeipa\_os) | The Operating System to be used for the FreeIPA instances | `string` | `null` | no |
| <a name="input_freeipa_recipes"></a> [freeipa\_recipes](#input\_freeipa\_recipes) | The recipes for the FreeIPA cluster | `set(string)` | `null` | no |
| <a name="input_gcp_availability_zones"></a> [gcp\_availability\_zones](#input\_gcp\_availability\_zones) | The zones of the environment in the given region. Multi-zone selection is not supported in GCP yet. It accepts only one zone until support is added. | `list(string)` | `null` | no |
| <a name="input_gcp_cdp_subnet_names"></a> [gcp\_cdp\_subnet\_names](#input\_gcp\_cdp\_subnet\_names) | List of GCP Subnet Names for CDP Resources. Required for CDP deployment on GCP. | `list(any)` | `null` | no |
Expand Down
2 changes: 2 additions & 0 deletions modules/terraform-cdp-deploy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ module "cdp_on_aws" {
freeipa_image_id = var.freeipa_image_id
freeipa_instance_type = var.freeipa_instance_type
freeipa_recipes = var.freeipa_recipes
freeipa_os = var.freeipa_os

encryption_key_arn = var.encryption_key_arn

Expand Down Expand Up @@ -154,6 +155,7 @@ module "cdp_on_azure" {
freeipa_image_id = var.freeipa_image_id
freeipa_instance_type = var.freeipa_instance_type
freeipa_recipes = var.freeipa_recipes
freeipa_os = var.freeipa_os

enable_outbound_load_balancer = var.enable_outbound_load_balancer
load_balancer_sku = var.azure_load_balancer_sku
Expand Down
1 change: 1 addition & 0 deletions modules/terraform-cdp-deploy/modules/aws/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ resource "cdp_environments_aws_environment" "cdp_env" {
image_id = var.freeipa_image_id
instance_type = var.freeipa_instance_type
recipes = var.freeipa_recipes
os = var.freeipa_os
}

proxy_config_name = var.proxy_config_name
Expand Down
13 changes: 13 additions & 0 deletions modules/terraform-cdp-deploy/modules/aws/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,18 @@ variable "freeipa_recipes" {

}

variable "freeipa_os" {
type = string

description = "The Operating System to be used for the FreeIPA instances"

validation {
condition = (var.freeipa_os == null ? true : contains(["redhat8", "centos7"], var.freeipa_os))
error_message = "Valid values for var: freeipa_os are (redhat8, centos7)."
}

}

variable "proxy_config_name" {
type = string

Expand Down Expand Up @@ -194,6 +206,7 @@ variable "datalake_image" {
type = object({
id = optional(string)
catalog = optional(string)
os = optional(string)
})

description = "The image to use for the datalake. Can only be used when the 'datalake_version' parameter is set to null. You can use 'catalog' name and/or 'id' for selecting an image."
Expand Down
1 change: 1 addition & 0 deletions modules/terraform-cdp-deploy/modules/azure/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ resource "cdp_environments_azure_environment" "cdp_env" {
image_id = var.freeipa_image_id
instance_type = var.freeipa_instance_type
recipes = var.freeipa_recipes
os = var.freeipa_os
}

proxy_config_name = var.proxy_config_name
Expand Down
13 changes: 13 additions & 0 deletions modules/terraform-cdp-deploy/modules/azure/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,18 @@ variable "freeipa_recipes" {

}

variable "freeipa_os" {
type = string

description = "The Operating System to be used for the FreeIPA instances"

validation {
condition = (var.freeipa_os == null ? true : contains(["redhat8", "centos7"], var.freeipa_os))
error_message = "Valid values for var: freeipa_os are (redhat8, centos7)."
}

}

variable "workload_analytics" {
type = bool

Expand Down Expand Up @@ -228,6 +240,7 @@ variable "datalake_image" {
type = object({
id = optional(string)
catalog = optional(string)
os = optional(string)
})

description = "The image to use for the datalake. Can only be used when the 'datalake_version' parameter is set to null. You can use 'catalog' name and/or 'id' for selecting an image."
Expand Down
1 change: 1 addition & 0 deletions modules/terraform-cdp-deploy/modules/gcp/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ variable "datalake_image" {
type = object({
id = optional(string)
catalog = optional(string)
os = optional(string)
})

description = "The image to use for the datalake. Can only be used when the 'datalake_version' parameter is set to null. You can use 'catalog' name and/or 'id' for selecting an image."
Expand Down
14 changes: 14 additions & 0 deletions modules/terraform-cdp-deploy/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,19 @@ variable "freeipa_recipes" {
default = null
}

variable "freeipa_os" {
type = string

description = "The Operating System to be used for the FreeIPA instances"

validation {
condition = (var.freeipa_os == null ? true : contains(["redhat8", "centos7"], var.freeipa_os))
error_message = "Valid values for var: freeipa_os are (redhat8, centos7)."
}

default = null
}

variable "proxy_config_name" {
type = string

Expand Down Expand Up @@ -258,6 +271,7 @@ variable "datalake_image" {
type = object({
id = optional(string)
catalog = optional(string)
os = optional(string)
})

description = "The image to use for the datalake. Can only be used when the 'datalake_version' parameter is set to null. You can use 'catalog' name and/or 'id' for selecting an image."
Expand Down

0 comments on commit 9e277d9

Please sign in to comment.