Skip to content

Commit

Permalink
Pin to release 0.8.0 of modules (#40)
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Enright <jenright@cloudera.com>
  • Loading branch information
jimright authored Aug 27, 2024
1 parent 5116399 commit 27ebd6f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
25 changes: 20 additions & 5 deletions aws/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ provider "aws" {
}

module "cdp_aws_prereqs" {
source = "git::https://github.com/cloudera-labs/terraform-cdp-modules.git//modules/terraform-cdp-aws-pre-reqs?ref=v0.7.4"
source = "git::https://github.com/cloudera-labs/terraform-cdp-modules.git//modules/terraform-cdp-aws-pre-reqs?ref=v0.8.0"

env_prefix = var.env_prefix
aws_region = var.aws_region
Expand All @@ -56,8 +56,23 @@ module "cdp_aws_prereqs" {
ingress_extra_cidrs_and_ports = local.ingress_extra_cidrs_and_ports

# Using CDP TF Provider cred pre-reqs data source for values of xaccount account_id and external_id
xaccount_account_id = data.cdp_environments_aws_credential_prerequisites.cdp_prereqs.account_id
xaccount_external_id = data.cdp_environments_aws_credential_prerequisites.cdp_prereqs.external_id
xaccount_account_id = data.cdp_environments_aws_credential_prerequisites.cdp_prereqs.account_id
xaccount_external_id = data.cdp_environments_aws_credential_prerequisites.cdp_prereqs.external_id
xaccount_account_policy_doc = base64decode(data.cdp_environments_aws_credential_prerequisites.cdp_prereqs.policy)

# Policy documents from CDP TF Provider cred pre-reqs
idbroker_policy_doc = base64decode(data.cdp_environments_aws_credential_prerequisites.cdp_prereqs.policies["Idbroker_Assumer"])

data_bucket_access_policy_doc = base64decode(data.cdp_environments_aws_credential_prerequisites.cdp_prereqs.policies["Bucket_Access"])
log_bucket_access_policy_doc = base64decode(data.cdp_environments_aws_credential_prerequisites.cdp_prereqs.policies["Bucket_Access"])
backup_bucket_access_policy_doc = base64decode(data.cdp_environments_aws_credential_prerequisites.cdp_prereqs.policies["Bucket_Access"])

datalake_admin_s3_policy_doc = base64decode(data.cdp_environments_aws_credential_prerequisites.cdp_prereqs.policies["Datalake_Admin"])
datalake_backup_policy_doc = base64decode(data.cdp_environments_aws_credential_prerequisites.cdp_prereqs.policies["Datalake_Backup"])
datalake_restore_policy_doc = base64decode(data.cdp_environments_aws_credential_prerequisites.cdp_prereqs.policies["Datalake_Restore"])

log_data_access_policy_doc = base64decode(data.cdp_environments_aws_credential_prerequisites.cdp_prereqs.policies["Log_Policy"])
ranger_audit_s3_policy_doc = base64decode(data.cdp_environments_aws_credential_prerequisites.cdp_prereqs.policies["Ranger_Audit"])

# Inputs for BYO-VPC
create_vpc = var.create_vpc
Expand All @@ -75,7 +90,7 @@ module "cdp_aws_prereqs" {
}

module "cdp_deploy" {
source = "git::https://github.com/cloudera-labs/terraform-cdp-modules.git//modules/terraform-cdp-deploy?ref=v0.7.4"
source = "git::https://github.com/cloudera-labs/terraform-cdp-modules.git//modules/terraform-cdp-deploy?ref=v0.8.0"

env_prefix = var.env_prefix
infra_type = "aws"
Expand Down Expand Up @@ -117,7 +132,7 @@ module "cdp_deploy" {
]
}

# Use the CDP Terraform Provider to find the xaccount account and external ids
# Use the CDP Terraform Provider to find the xaccount account, external ids and policy contents
data "cdp_environments_aws_credential_prerequisites" "cdp_prereqs" {}


Expand Down
4 changes: 2 additions & 2 deletions azure/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ provider "azuread" {
}

module "cdp_azure_prereqs" {
source = "git::https://github.com/cloudera-labs/terraform-cdp-modules.git//modules/terraform-cdp-azure-pre-reqs?ref=v0.7.4"
source = "git::https://github.com/cloudera-labs/terraform-cdp-modules.git//modules/terraform-cdp-azure-pre-reqs?ref=v0.8.0"

env_prefix = var.env_prefix
azure_region = var.azure_region
Expand All @@ -76,7 +76,7 @@ module "cdp_azure_prereqs" {
}

module "cdp_deploy" {
source = "git::https://github.com/cloudera-labs/terraform-cdp-modules.git//modules/terraform-cdp-deploy?ref=v0.7.4"
source = "git::https://github.com/cloudera-labs/terraform-cdp-modules.git//modules/terraform-cdp-deploy?ref=v0.8.0"

env_prefix = var.env_prefix
infra_type = "azure"
Expand Down
4 changes: 2 additions & 2 deletions gcp/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ provider "google" {


module "cdp_gcp_prereqs" {
source = "git::https://github.com/cloudera-labs/terraform-cdp-modules.git//modules/terraform-cdp-gcp-pre-reqs?ref=v0.7.4"
source = "git::https://github.com/cloudera-labs/terraform-cdp-modules.git//modules/terraform-cdp-gcp-pre-reqs?ref=v0.8.0"

env_prefix = var.env_prefix
gcp_region = var.gcp_region
Expand All @@ -62,7 +62,7 @@ module "cdp_gcp_prereqs" {
}

module "cdp_deploy" {
source = "git::https://github.com/cloudera-labs/terraform-cdp-modules.git//modules/terraform-cdp-deploy?ref=v0.7.4"
source = "git::https://github.com/cloudera-labs/terraform-cdp-modules.git//modules/terraform-cdp-deploy?ref=v0.8.0"

env_prefix = var.env_prefix
infra_type = "gcp"
Expand Down

0 comments on commit 27ebd6f

Please sign in to comment.