Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add resource to accept Azure image terms during CDP cluster deployment #63

Merged
merged 1 commit into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/terraform-cdp-deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ No resources.
| <a name="input_aws_security_group_knox_id"></a> [aws\_security\_group\_knox\_id](#input\_aws\_security\_group\_knox\_id) | ID of the Knox Security Group for CDP environment. Required for CDP deployment on AWS. | `string` | `null` | no |
| <a name="input_aws_vpc_id"></a> [aws\_vpc\_id](#input\_aws\_vpc\_id) | AWS Virtual Private Network ID. Required for CDP deployment on AWS. | `string` | `null` | no |
| <a name="input_aws_xaccount_role_arn"></a> [aws\_xaccount\_role\_arn](#input\_aws\_xaccount\_role\_arn) | Cross Account Role ARN. Required for CDP deployment on AWS. | `string` | `null` | no |
| <a name="input_azure_accept_image_terms"></a> [azure\_accept\_image\_terms](#input\_azure\_accept\_image\_terms) | Flag to automatically accept Azure Marketplace image terms during CDP cluster deployment. | `bool` | `true` | no |
| <a name="input_azure_aks_private_dns_zone_id"></a> [azure\_aks\_private\_dns\_zone\_id](#input\_azure\_aks\_private\_dns\_zone\_id) | The ID of an existing private DNS zone used for the AKS. | `string` | `null` | no |
| <a name="input_azure_cdp_flexible_server_delegated_subnet_names"></a> [azure\_cdp\_flexible\_server\_delegated\_subnet\_names](#input\_azure\_cdp\_flexible\_server\_delegated\_subnet\_names) | List of Azure Subnet Names delegated for Private Flexible servers. Required for CDP deployment on Azure. | `list(any)` | `null` | no |
| <a name="input_azure_cdp_gateway_subnet_names"></a> [azure\_cdp\_gateway\_subnet\_names](#input\_azure\_cdp\_gateway\_subnet\_names) | List of Azure Subnet Names CDP Endpoint Access Gateway. Required for CDP deployment on Azure. | `list(any)` | `null` | no |
Expand Down
1 change: 1 addition & 0 deletions modules/terraform-cdp-deploy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ module "cdp_on_azure" {
datalake_async_creation = var.datalake_async_creation
datalake_polling_timeout = var.datalake_polling_timeout

azure_accept_image_terms = var.azure_accept_image_terms
use_single_resource_group = var.use_single_resource_group
use_public_ips = local.use_public_ips

Expand Down
10 changes: 9 additions & 1 deletion modules/terraform-cdp-deploy/modules/azure/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ resource "cdp_environments_azure_credential" "cdp_cred" {
description = "Azure Cross Account Credential for Azure env ${var.environment_name}"
}

# ------- Accept Azure Image Terms -------
resource "cdp_environments_azure_image_terms" "cdp_azure_images" {
count = var.azure_accept_image_terms ? 1 : 0

accepted = true
}

# ------- CDP Environment -------
resource "cdp_environments_azure_environment" "cdp_env" {
environment_name = var.environment_name
Expand Down Expand Up @@ -86,7 +93,8 @@ resource "cdp_environments_azure_environment" "cdp_env" {
tags = var.tags

depends_on = [
cdp_environments_azure_credential.cdp_cred
cdp_environments_azure_credential.cdp_cred,
cdp_environments_azure_image_terms.cdp_azure_images
]

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

}

variable "azure_accept_image_terms" {
type = bool
description = "Flag to automatically accept Azure Marketplace image terms during CDP cluster deployment."

}

variable "enable_ccm_tunnel" {
type = bool

Expand Down
7 changes: 7 additions & 0 deletions modules/terraform-cdp-deploy/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,13 @@ variable "azure_create_private_endpoints" {
default = null
}

variable "azure_accept_image_terms" {
type = bool
description = "Flag to automatically accept Azure Marketplace image terms during CDP cluster deployment."

default = true
}

variable "azure_cdp_subnet_names" {
type = list(any)
description = "List of Azure Subnet Names for CDP Resources. Required for CDP deployment on Azure."
Expand Down
Loading