Skip to content

Commit 73baa32

Browse files
Jordan-Williams2Jordan-Williams2
authored andcommitted
tests: update test code
1 parent 29acf9a commit 73baa32

File tree

6 files changed

+78
-0
lines changed

6 files changed

+78
-0
lines changed

examples/basic/README.md

Whitespace-only changes.

examples/basic/main.tf

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
##############################################################################
2+
# ROKS Landing zone
3+
##############################################################################
4+
5+
module "roks_landing_zone" {
6+
source = "git::https://github.com/terraform-ibm-modules/terraform-ibm-landing-zone.git//patterns/roks-quickstart?ref=v6.6.1"
7+
ibmcloud_api_key = var.ibmcloud_api_key
8+
prefix = var.prefix
9+
region = var.region
10+
resource_tags = var.resource_tags
11+
}
12+
13+
##############################################################################
14+
# Deploy cloudpak_data
15+
##############################################################################
16+
module "cloudpak_data" {
17+
source = "../../solutions/deploy"
18+
ibmcloud_api_key = var.ibmcloud_api_key
19+
prefix = var.prefix
20+
region = var.region
21+
cluster_name = module.roks_landing_zone.workload_cluster_id
22+
cloud_pak_deployer_image = "quay.io/cloud-pak-deployer/cloud-pak-deployer"
23+
cpd_admin_password = "Passw0rd" #pragma: allowlist secret
24+
cpd_entitlement_key = "entitlementKey"
25+
install_odf_cluster_addon = var.install_odf_cluster_addon
26+
}

examples/basic/outputs.tf

Whitespace-only changes.

examples/basic/providers.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
provider "ibm" {
2+
ibmcloud_api_key = var.ibmcloud_api_key
3+
region = var.region
4+
}

examples/basic/variables.tf

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
##############################################################################
2+
# Account Variables
3+
##############################################################################
4+
5+
variable "ibmcloud_api_key" {
6+
description = "The IBM Cloud platform API key needed to deploy IAM enabled resources."
7+
type = string
8+
sensitive = true
9+
}
10+
11+
variable "prefix" {
12+
description = "A unique identifier for resources that is prepended to resources that are provisioned. Must begin with a lowercase letter and end with a lowercase letter or number. Must be 13 or fewer characters."
13+
type = string
14+
default = "lz-roks-cp4d"
15+
16+
validation {
17+
error_message = "Prefix must begin with a letter and contain only lowercase letters, numbers, and - characters. Prefixes must end with a lowercase letter or number and be 13 or fewer characters."
18+
condition = can(regex("^([a-z]|[a-z][-a-z0-9]*[a-z0-9])$", var.prefix)) && length(var.prefix) <= 13
19+
}
20+
}
21+
22+
variable "region" {
23+
description = "Region where VPC will be created. To find your VPC region, use `ibmcloud is regions` command to find available regions."
24+
type = string
25+
default = "au-syd"
26+
}
27+
28+
variable "resource_tags" {
29+
type = list(string)
30+
description = "List of resource tag to associate with all resource instances created by this example."
31+
default = []
32+
}
33+
34+
variable "install_odf_cluster_addon" {
35+
description = "Install the odf cluster addon"
36+
type = bool
37+
default = false
38+
}

examples/basic/version.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
terraform {
2+
required_version = ">= 1.3"
3+
required_providers {
4+
# renovate is set up to keep provider version at the latest for all DA solutions
5+
ibm = {
6+
source = "IBM-Cloud/ibm"
7+
version = "1.71.3"
8+
}
9+
}
10+
}

0 commit comments

Comments
 (0)