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

Pin to release 0.7.3 of CDP TF modules and add provider versions #34

Merged
merged 4 commits into from
Jul 24, 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
40 changes: 29 additions & 11 deletions aws/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,31 @@
# See the License for the specific language governing permissions and
# limitations under the License.

terraform {
required_version = ">= 1.5.7"
required_providers {
cdp = {
source = "cloudera/cdp"
version = "~> 0.6.1"
}
aws = {
source = "hashicorp/aws"
version = "~>5.30"
}
tls = {
source = "hashicorp/tls"
version = "~> 4.0.5"
}
local = {
source = "hashicorp/local"
version = "~> 2.5.1"
}
http = {
source = "hashicorp/http"
version = "~> 3.2.1"
}
}
}
provider "aws" {
region = var.aws_region

Expand All @@ -22,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.1"
source = "git::https://github.com/cloudera-labs/terraform-cdp-modules.git//modules/terraform-cdp-aws-pre-reqs?ref=v0.7.3"

env_prefix = var.env_prefix
aws_region = var.aws_region
Expand Down Expand Up @@ -50,7 +75,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.1"
source = "git::https://github.com/cloudera-labs/terraform-cdp-modules.git//modules/terraform-cdp-deploy?ref=v0.7.3"

env_prefix = var.env_prefix
infra_type = "aws"
Expand Down Expand Up @@ -79,6 +104,7 @@ module "cdp_deploy" {
aws_xaccount_role_arn = module.cdp_aws_prereqs.aws_xaccount_role_arn
aws_datalake_admin_role_arn = module.cdp_aws_prereqs.aws_datalake_admin_role_arn
aws_ranger_audit_role_arn = module.cdp_aws_prereqs.aws_ranger_audit_role_arn
aws_raz_role_arn = module.cdp_aws_prereqs.aws_datalake_admin_role_arn

aws_log_instance_profile_arn = module.cdp_aws_prereqs.aws_log_instance_profile_arn
aws_idbroker_instance_profile_arn = module.cdp_aws_prereqs.aws_idbroker_instance_profile_arn
Expand All @@ -91,15 +117,7 @@ module "cdp_deploy" {
]
}

# Use the CDP Terraform Provider to find the xaccount account and external ids
terraform {
required_providers {
cdp = {
source = "cloudera/cdp"
version = "0.6.1"
}
}
}
# Use the CDP Terraform Provider to find the xaccount account and external ids
data "cdp_environments_aws_credential_prerequisites" "cdp_prereqs" {}


Expand Down
34 changes: 32 additions & 2 deletions azure/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,36 @@
# See the License for the specific language governing permissions and
# limitations under the License.

terraform {
required_version = ">= 1.5.7"
required_providers {
cdp = {
source = "cloudera/cdp"
version = "~> 0.6.1"
}
azurerm = {
source = "hashicorp/azurerm"
version = "3.84.0"
}
azuread = {
source = "hashicorp/azuread"
version = "2.46.0"
}
tls = {
source = "hashicorp/tls"
version = "~> 4.0.5"
}
local = {
source = "hashicorp/local"
version = "~> 2.5.1"
}
http = {
source = "hashicorp/http"
version = "~> 3.2.1"
}
}
}

provider "azurerm" {
features {
resource_group {
Expand All @@ -25,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.1"
source = "git::https://github.com/cloudera-labs/terraform-cdp-modules.git//modules/terraform-cdp-azure-pre-reqs?ref=v0.7.3"

env_prefix = var.env_prefix
azure_region = var.azure_region
Expand All @@ -46,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.1"
source = "git::https://github.com/cloudera-labs/terraform-cdp-modules.git//modules/terraform-cdp-deploy?ref=v0.7.3"

env_prefix = var.env_prefix
infra_type = "azure"
Expand Down
31 changes: 29 additions & 2 deletions gcp/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,40 @@
# See the License for the specific language governing permissions and
# limitations under the License.

terraform {
required_version = ">= 1.5.7"
required_providers {
cdp = {
source = "cloudera/cdp"
version = "~> 0.6.1"
}
google = {
source = "hashicorp/google"
version = "4.84.0"
}
tls = {
source = "hashicorp/tls"
version = "~> 4.0.5"
}
local = {
source = "hashicorp/local"
version = "~> 2.5.1"
}
http = {
source = "hashicorp/http"
version = "~> 3.2.1"
}
}
}

provider "google" {
project = var.gcp_project
region = var.gcp_region
}


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

env_prefix = var.env_prefix
gcp_region = var.gcp_region
Expand All @@ -36,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.1"
source = "git::https://github.com/cloudera-labs/terraform-cdp-modules.git//modules/terraform-cdp-deploy?ref=v0.7.3"

env_prefix = var.env_prefix
infra_type = "gcp"
Expand Down Expand Up @@ -68,6 +94,7 @@ module "cdp_deploy" {
gcp_datalake_admin_service_account_email = module.cdp_gcp_prereqs.gcp_datalake_admin_service_account_email
gcp_ranger_audit_service_account_email = module.cdp_gcp_prereqs.gcp_ranger_audit_service_account_email
gcp_log_service_account_email = module.cdp_gcp_prereqs.gcp_log_service_account_email
gcp_raz_service_account_email = module.cdp_gcp_prereqs.gcp_datalake_admin_service_account_email

# Tags to apply resources (omitted by default)
env_tags = var.env_tags
Expand Down
Loading