Skip to content

Commit

Permalink
Update CDP provider version and add async variables for CDP env and DL
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Enright <[email protected]>
  • Loading branch information
jimright committed Mar 13, 2024
1 parent 2bef64e commit c5b9e57
Show file tree
Hide file tree
Showing 20 changed files with 133 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ terraform {
required_providers {
cdp = {
source = "cloudera/cdp"
version = "0.4.2"
version = "0.5.4"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ terraform {
required_providers {
cdp = {
source = "cloudera/cdp"
version = "0.4.2"
version = "0.5.4"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ terraform {
required_providers {
cdp = {
source = "cloudera/cdp"
version = "0.4.2"
version = "0.5.4"
}
}
}
Expand Down
4 changes: 3 additions & 1 deletion modules/terraform-cdp-deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ In each directory an example `terraform.tfvars.sample` values file is included t
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.0 |
| <a name="requirement_cdp"></a> [cdp](#requirement\_cdp) | 0.4.2 |
| <a name="requirement_cdp"></a> [cdp](#requirement\_cdp) | 0.5.4 |

## Providers

Expand Down Expand Up @@ -82,6 +82,7 @@ No resources.
| <a name="input_cdp_admin_group_name"></a> [cdp\_admin\_group\_name](#input\_cdp\_admin\_group\_name) | Name of the CDP IAM Admin Group associated with the environment. Defaults to '<env\_prefix>-cdp-admin-group' if not specified. | `string` | `null` | no |
| <a name="input_cdp_user_group_name"></a> [cdp\_user\_group\_name](#input\_cdp\_user\_group\_name) | Name of the CDP IAM User Group associated with the environment. Defaults to '<env\_prefix>-cdp-user-group' if not specified. | `string` | `null` | no |
| <a name="input_cdp_xacccount_credential_name"></a> [cdp\_xacccount\_credential\_name](#input\_cdp\_xacccount\_credential\_name) | Name of the CDP Cross Account Credential. Defaults to '<env\_prefix>-xaccount-cred' if not specified. | `string` | `null` | no |
| <a name="input_datalake_async_creation"></a> [datalake\_async\_creation](#input\_datalake\_async\_creation) | Flag to specify if Terraform should wait for CDP datalake resource creation/deletion | `bool` | `false` | no |
| <a name="input_datalake_custom_instance_groups"></a> [datalake\_custom\_instance\_groups](#input\_datalake\_custom\_instance\_groups) | A set of custom instance groups for the datalake. Only applicable for CDP deployment on AWS and GCP. | <pre>list(<br> object({<br> name = string,<br> instance_type = optional(string)<br> })<br> )</pre> | `null` | no |
| <a name="input_datalake_image"></a> [datalake\_image](#input\_datalake\_image) | 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. | <pre>object({<br> id = optional(string)<br> catalog = optional(string)<br> })</pre> | `null` | no |
| <a name="input_datalake_java_version"></a> [datalake\_java\_version](#input\_datalake\_java\_version) | The Java major version to use on the datalake cluster. | `number` | `null` | no |
Expand All @@ -98,6 +99,7 @@ No resources.
| <a name="input_encryption_key_url"></a> [encryption\_key\_url](#input\_encryption\_key\_url) | URL of the key which will be used to encrypt the Azure Managed Disks. Only applicable for CDP deployment on Azure. | `string` | `null` | no |
| <a name="input_endpoint_access_scheme"></a> [endpoint\_access\_scheme](#input\_endpoint\_access\_scheme) | The scheme for the workload endpoint gateway. PUBLIC creates an external endpoint that can be accessed over the Internet. PRIVATE which restricts the traffic to be internal to the VPC / Vnet. Relevant in Private Networks. | `string` | `null` | no |
| <a name="input_env_tags"></a> [env\_tags](#input\_env\_tags) | Tags applied to provisioned resources | `map(any)` | `null` | no |
| <a name="input_environment_async_creation"></a> [environment\_async\_creation](#input\_environment\_async\_creation) | Flag to specify if Terraform should wait for CDP environment resource creation/deletion | `bool` | `false` | no |
| <a name="input_environment_name"></a> [environment\_name](#input\_environment\_name) | Name of the CDP environment. Defaults to '<env\_prefix>-cdp-env' if not specified. | `string` | `null` | no |
| <a name="input_environment_polling_timeout"></a> [environment\_polling\_timeout](#input\_environment\_polling\_timeout) | Timeout value in minutes for how long to poll for CDP Environment resource creation/deletion | `number` | `60` | no |
| <a name="input_freeipa_catalog"></a> [freeipa\_catalog](#input\_freeipa\_catalog) | Image catalog to use for FreeIPA image selection | `string` | `null` | no |
Expand Down
5 changes: 4 additions & 1 deletion modules/terraform-cdp-deploy/examples/ex01-aws-basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ module "cdp_deploy" {
keypair_name = var.aws_key_pair
deployment_template = var.deployment_template

environment_async_creation = var.environment_async_creation
datalake_async_creation = var.datalake_async_creation

# From pre-reqs module output
aws_vpc_id = module.cdp_aws_prereqs.aws_vpc_id
aws_public_subnet_ids = module.cdp_aws_prereqs.aws_public_subnet_ids
Expand Down Expand Up @@ -79,7 +82,7 @@ terraform {
required_providers {
cdp = {
source = "cloudera/cdp"
version = "0.4.2"
version = "0.5.4"
}
}
}
Expand Down
15 changes: 15 additions & 0 deletions modules/terraform-cdp-deploy/examples/ex01-aws-basic/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,21 @@ variable "deployment_template" {
description = "Deployment Pattern to use for Cloud resources and CDP"
}

variable "environment_async_creation" {
type = bool

description = "Flag to specify if Terraform should wait for CDP environment resource creation/deletion"

default = false
}

variable "datalake_async_creation" {
type = bool

description = "Flag to specify if Terraform should wait for CDP datalake resource creation/deletion"

default = false
}
# ------- Network Resources -------
variable "ingress_extra_cidrs_and_ports" {
type = object({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ module "cdp_deploy" {
public_key_text = var.public_key_text
deployment_template = var.deployment_template

environment_async_creation = var.environment_async_creation
datalake_async_creation = var.datalake_async_creation

# From pre-reqs module output
azure_subscription_id = module.cdp_azure_prereqs.azure_subscription_id
azure_tenant_id = module.cdp_azure_prereqs.azure_tenant_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,21 @@ variable "deployment_template" {
description = "Deployment Pattern to use for Cloud resources and CDP"
}

variable "environment_async_creation" {
type = bool

description = "Flag to specify if Terraform should wait for CDP environment resource creation/deletion"

default = false
}

variable "datalake_async_creation" {
type = bool

description = "Flag to specify if Terraform should wait for CDP datalake resource creation/deletion"

default = false
}
# ------- Network Resources -------
variable "ingress_extra_cidrs_and_ports" {
type = object({
Expand Down
3 changes: 3 additions & 0 deletions modules/terraform-cdp-deploy/examples/ex03-gcp-basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ module "cdp_deploy" {
public_key_text = var.public_key_text
deployment_template = var.deployment_template

environment_async_creation = var.environment_async_creation
datalake_async_creation = var.datalake_async_creation

# From pre-reqs module output
gcp_network_name = module.cdp_gcp_prereqs.gcp_vpc_name
gcp_cdp_subnet_names = module.cdp_gcp_prereqs.gcp_cdp_subnet_names
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,22 @@ variable "deployment_template" {
description = "Deployment Pattern to use for Cloud resources and CDP"
}

# # ------- Network Resources -------
variable "environment_async_creation" {
type = bool

description = "Flag to specify if Terraform should wait for CDP environment resource creation/deletion"

default = false
}

variable "datalake_async_creation" {
type = bool

description = "Flag to specify if Terraform should wait for CDP datalake resource creation/deletion"

default = false
}
# ------- Network Resources -------
variable "ingress_extra_cidrs_and_ports" {
type = object({
cidrs = list(string)
Expand Down
6 changes: 6 additions & 0 deletions modules/terraform-cdp-deploy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ module "cdp_on_aws" {
workload_analytics = var.workload_analytics
endpoint_access_scheme = local.endpoint_access_scheme

environment_async_creation = var.environment_async_creation
environment_polling_timeout = var.environment_polling_timeout
datalake_async_creation = var.datalake_async_creation
datalake_polling_timeout = var.datalake_polling_timeout

region = var.region
Expand Down Expand Up @@ -104,7 +106,9 @@ module "cdp_on_azure" {
workload_analytics = var.workload_analytics
endpoint_access_scheme = local.endpoint_access_scheme

environment_async_creation = var.environment_async_creation
environment_polling_timeout = var.environment_polling_timeout
datalake_async_creation = var.datalake_async_creation
datalake_polling_timeout = var.datalake_polling_timeout

use_single_resource_group = var.use_single_resource_group
Expand Down Expand Up @@ -183,7 +187,9 @@ module "cdp_on_gcp" {
workload_analytics = var.workload_analytics
endpoint_access_scheme = local.endpoint_access_scheme

environment_async_creation = var.environment_async_creation
environment_polling_timeout = var.environment_polling_timeout
datalake_async_creation = var.datalake_async_creation
datalake_polling_timeout = var.datalake_polling_timeout

use_public_ips = local.use_public_ips
Expand Down
2 changes: 1 addition & 1 deletion modules/terraform-cdp-deploy/modules/aws/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ terraform {
required_providers {
cdp = {
source = "cloudera/cdp"
version = "0.4.2"
version = "0.5.4"
}
}

Expand Down
16 changes: 15 additions & 1 deletion modules/terraform-cdp-deploy/modules/aws/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,17 @@ variable "multiaz" {

}

variable "environment_async_creation" {
type = bool

description = "Flag to specify if Terraform should wait for CDP environment resource creation/deletion"

}

variable "environment_polling_timeout" {
type = number

description = " Timeout value in minutes for how long to poll for CDP Environment resource creation/deletion"
description = "Timeout value in minutes for how long to poll for CDP Environment resource creation/deletion"

}

Expand Down Expand Up @@ -201,6 +208,13 @@ variable "datalake_recipes" {

}

variable "datalake_async_creation" {
type = bool

description = "Flag to specify if Terraform should wait for CDP datalake resource creation/deletion"

}

variable "datalake_polling_timeout" {
type = number

Expand Down
2 changes: 1 addition & 1 deletion modules/terraform-cdp-deploy/modules/azure/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ terraform {
required_providers {
cdp = {
source = "cloudera/cdp"
version = "0.4.2"
version = "0.5.4"
}
}

Expand Down
14 changes: 14 additions & 0 deletions modules/terraform-cdp-deploy/modules/azure/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ variable "enable_raz" {

}

variable "environment_async_creation" {
type = bool

description = "Flag to specify if Terraform should wait for CDP environment resource creation/deletion"

}

variable "environment_polling_timeout" {
type = number

Expand Down Expand Up @@ -197,6 +204,13 @@ variable "datalake_recipes" {

}

variable "datalake_async_creation" {
type = bool

description = "Flag to specify if Terraform should wait for CDP datalake resource creation/deletion"

}

variable "datalake_polling_timeout" {
type = number

Expand Down
2 changes: 2 additions & 0 deletions modules/terraform-cdp-deploy/modules/gcp/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ resource "cdp_environments_gcp_environment" "cdp_env" {


polling_options = {
async = var.environment_async_creation
polling_timeout = var.environment_polling_timeout
}

Expand Down Expand Up @@ -136,6 +137,7 @@ resource "cdp_datalake_gcp_datalake" "cdp_datalake" {
recipes = null

polling_options = {
async = var.datalake_async_creation
polling_timeout = var.datalake_polling_timeout
}

Expand Down
2 changes: 1 addition & 1 deletion modules/terraform-cdp-deploy/modules/gcp/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ terraform {
required_providers {
cdp = {
source = "cloudera/cdp"
version = "0.4.2"
version = "0.5.4"
}
}

Expand Down
14 changes: 14 additions & 0 deletions modules/terraform-cdp-deploy/modules/gcp/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ variable "report_deployment_logs" {

}

variable "environment_async_creation" {
type = bool

description = "Flag to specify if Terraform should wait for CDP environment resource creation/deletion"

}

variable "environment_polling_timeout" {
type = number

Expand Down Expand Up @@ -172,6 +179,13 @@ variable "datalake_recipes" {

}

variable "datalake_async_creation" {
type = bool

description = "Flag to specify if Terraform should wait for CDP datalake resource creation/deletion"

}

variable "datalake_polling_timeout" {
type = number

Expand Down
2 changes: 1 addition & 1 deletion modules/terraform-cdp-deploy/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ terraform {
required_providers {
cdp = {
source = "cloudera/cdp"
version = "0.4.2"
version = "0.5.4"
}
}

Expand Down
16 changes: 16 additions & 0 deletions modules/terraform-cdp-deploy/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ variable "enable_raz" {
default = true
}

variable "environment_async_creation" {
type = bool

description = "Flag to specify if Terraform should wait for CDP environment resource creation/deletion"

default = false
}

variable "environment_polling_timeout" {
type = number

Expand Down Expand Up @@ -251,6 +259,14 @@ variable "datalake_recipes" {
default = null
}

variable "datalake_async_creation" {
type = bool

description = "Flag to specify if Terraform should wait for CDP datalake resource creation/deletion"

default = false
}

variable "datalake_polling_timeout" {
type = number

Expand Down

0 comments on commit c5b9e57

Please sign in to comment.