Skip to content

Commit

Permalink
Add Terraform provider versions to quickstart modules
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Enright <jenright@cloudera.com>
  • Loading branch information
jimright committed Jul 23, 2024
1 parent a1f6e07 commit 3a3fb5f
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 10 deletions.
38 changes: 28 additions & 10 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 Down Expand Up @@ -79,7 +104,8 @@ 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
30 changes: 30 additions & 0 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 Down
27 changes: 27 additions & 0 deletions gcp/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,32 @@
# 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
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

0 comments on commit 3a3fb5f

Please sign in to comment.