Skip to content

Commit f9eb71a

Browse files
Bug fixes related to the custom CIDR (#15)
1 parent 0ba8992 commit f9eb71a

File tree

7 files changed

+272
-184
lines changed

7 files changed

+272
-184
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# **CHANGELOG**
22

3+
## **1.4.1**
4+
### **BUG FIXES**
5+
- Fixed bug related to the creation of new subnets with custom cidr under the existing vpc range.
6+
37
## **1.4.0**
48
### ENHANCEMENTS
59
- Support for Baremetal worker node.

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ $ ssh -J [email protected] [email protected]
276276
| [ibm_is_volume_profile.nfs](https://registry.terraform.io/providers/IBM-Cloud/ibm/1.46.0/docs/data-sources/is_volume_profile) | data source |
277277
| [ibm_is_vpc.existing_vpc](https://registry.terraform.io/providers/IBM-Cloud/ibm/1.46.0/docs/data-sources/is_vpc) | data source |
278278
| [ibm_is_vpc.vpc](https://registry.terraform.io/providers/IBM-Cloud/ibm/1.46.0/docs/data-sources/is_vpc) | data source |
279+
| [ibm_is_vpc_address_prefixes.existing_vpc](https://registry.terraform.io/providers/IBM-Cloud/ibm/1.46.0/docs/data-sources/is_vpc_address_prefixes) | data source |
279280
| [ibm_is_zone.zone](https://registry.terraform.io/providers/IBM-Cloud/ibm/1.46.0/docs/data-sources/is_zone) | data source |
280281
| [ibm_resource_group.rg](https://registry.terraform.io/providers/IBM-Cloud/ibm/1.46.0/docs/data-sources/resource_group) | data source |
281282
| [template_file.login_user_data](https://registry.terraform.io/providers/hashicorp/template/latest/docs/data-sources/file) | data source |
@@ -297,7 +298,7 @@ $ ssh -J [email protected] [email protected]
297298
| <a name="input_api_key"></a> [api\_key](#input\_api\_key) | This is the IBM Cloud API key for IBM Cloud account where the IBM Spectrum Symphony cluster needs to be deployed. For more information on how to create an API key, see [Managing user API keys](https://cloud.ibm.com/docs/account?topic=account-userapikey). | `string` | n/a | yes |
298299
| <a name="input_cluster_id"></a> [cluster\_id](#input\_cluster\_id) | Unique ID of the cluster used by Symphony for configuration of resources. This must be up to 39 alphanumeric characters including the underscore (\_), the hyphen (-), and the period (.). Other special characters and spaces are not allowed. Do not use the name of any host or user as the name of your cluster. You cannot change it after installation. | `string` | `"HPCCluster"` | no |
299300
| <a name="input_cluster_prefix"></a> [cluster\_prefix](#input\_cluster\_prefix) | Prefix that is used to name the Spectrum Symphony cluster and IBM Cloud resources that are provisioned to build the Spectrum Symphony cluster instance. You cannot create more than one instance of the Symphony cluster with the same name. Make sure that the name is unique. | `string` | `"hpcc-symphony"` | no |
300-
| <a name="input_dedicated_host_enabled"></a> [dedicated\_host\_enabled](#input\_dedicated\_host\_enabled) | Set to true to use dedicated hosts for compute hosts (default: false). Note that Symphony still dynamically provisions compute hosts at public virtual server instances and dedicated hosts are used only for static compute hosts provisioned at the time the cluster is created. The number of dedicated hosts and the profile names for dedicated hosts are calculated from worker\_node\_min\_count and dedicated\_host\_type\_name. | `bool` | `false` | no |
301+
| <a name="input_dedicated_host_enabled"></a> [dedicated\_host\_enabled](#input\_dedicated\_host\_enabled) | Set to true to use dedicated hosts for compute hosts (default: false). Note that Symphony still dynamically provisions compute hosts at public virtual server instances and dedicated hosts are used only for static compute hosts provisioned at the time the cluster is created. The number of dedicated hosts and the profile names for dedicated hosts are calculated from worker\_node\_min\_count and worker\_node\_instance\_type. | `bool` | `false` | no |
301302
| <a name="input_dedicated_host_placement"></a> [dedicated\_host\_placement](#input\_dedicated\_host\_placement) | Specify 'pack' or 'spread'. The 'pack' option will deploy virtual server instances on one dedicated host until full before moving on to the next dedicated host. The 'spread' option will deploy virtual server instances in round-robin fashion across all the dedicated hosts. The second option should result in mostly even distribution of instances on the hosts, while the first option might result in one dedicated host being mostly empty. | `string` | `"spread"` | no |
302303
| <a name="input_hyperthreading_enabled"></a> [hyperthreading\_enabled](#input\_hyperthreading\_enabled) | Setting this to true will enable hyper-threading in the worker nodes of the cluster(default). Otherwise, hyper-threading will be disabled. | `bool` | `true` | no |
303304
| <a name="input_ibm_customer_number"></a> [ibm\_customer\_number](#input\_ibm\_customer\_number) | Comma-separated list of the IBM Customer Number(s) (ICN) that is used for the Bring Your Own License (BYOL) entitlement check. For more information on how to find your ICN, see [What is my IBM Customer Number (ICN)?](https://www.ibm.com/support/pages/what-my-ibm-customer-number-icn). | `string` | n/a | yes |
@@ -323,7 +324,7 @@ $ ssh -J [email protected] [email protected]
323324
| <a name="input_volume_capacity"></a> [volume\_capacity](#input\_volume\_capacity) | Size in GB for the block storage that would be used to build the NFS instance and would be available as a mount on Spectrum Symphony primary node. Enter a value in the range 10 - 16000. | `number` | `100` | no |
324325
| <a name="input_volume_iops"></a> [volume\_iops](#input\_volume\_iops) | Number to represent the IOPS configuration for block storage to be used for NFS instance (valid only for volume\_profile=custom, dependent on volume\_capacity). Enter a value in the range 100 - 48000. For possible options of IOPS, see [Custom IOPS profile](https://cloud.ibm.com/docs/vpc?topic=vpc-block-storage-profiles#custom). | `number` | `300` | no |
325326
| <a name="input_volume_profile"></a> [volume\_profile](#input\_volume\_profile) | Name of the block storage volume type to be used for NFS instance. For possible options, see[Block storage profiles](https://cloud.ibm.com/docs/vpc?topic=vpc-block-storage-profiles). | `string` | `"general-purpose"` | no |
326-
| <a name="input_vpc_cidr_block"></a> [vpc\_cidr\_block](#input\_vpc\_cidr\_block) | IBM Cloud VPC address prefixes that are needed for VPC creation. Since the solution supports only a single availability zone, provide one CIDR address prefix for VPC creation. For more information, see [Bring your own subnet](https://cloud.ibm.com/docs/vpc?topic=vpc-configuring-address-prefixes). | `list(string)` | <pre>[<br> "10.241.0.0/18"<br>]</pre> | no |
327+
| <a name="input_vpc_cidr_block"></a> [vpc\_cidr\_block](#input\_vpc\_cidr\_block) | Creates the address prefix for the new VPC, when the vpc\_name variable is empty. Only a single address prefix is allowed. For more information, see [Setting IP ranges](https://cloud.ibm.com/docs/vpc?topic=vpc-vpc-addressing-plan-design). | `list(string)` | <pre>[<br> "10.241.0.0/18"<br>]</pre> | no |
327328
| <a name="input_vpc_cluster_login_private_subnets_cidr_blocks"></a> [vpc\_cluster\_login\_private\_subnets\_cidr\_blocks](#input\_vpc\_cluster\_login\_private\_subnets\_cidr\_blocks) | The CIDR block that's required for the creation of the login cluster private subnet. Modify the CIDR block if it has already been reserved or used for other applications within the VPC or conflicts with any on-premises CIDR blocks when using a hybrid environment. Provide only one CIDR block for the creation of the login subnet. Since login subnet is used only for the creation of login virtual server instance provide a CIDR range of /28. | `list(string)` | <pre>[<br> "10.241.4.0/28"<br>]</pre> | no |
328329
| <a name="input_vpc_cluster_private_subnets_cidr_blocks"></a> [vpc\_cluster\_private\_subnets\_cidr\_blocks](#input\_vpc\_cluster\_private\_subnets\_cidr\_blocks) | The CIDR block that's required for the creation of the compute and storage cluster private subnet. Modify the CIDR block if it has already been reserved or used for other applications within the VPC or conflicts with any on-premises CIDR blocks when using a hybrid environment. Provide only one CIDR block for the creation of the compute and storage subnet. Make sure to select a CIDR block size that will accommodate the maximum number of management, storage, and both static and dynamic worker nodes that you expect to have in your cluster. For more information on CIDR block size selection, see [Choosing IP ranges for your VPC](https://cloud.ibm.com/docs/vpc?topic=vpc-choosing-ip-ranges-for-your-vpc). | `list(string)` | <pre>[<br> "10.241.0.0/22"<br>]</pre> | no |
329330
| <a name="input_vpc_name"></a> [vpc\_name](#input\_vpc\_name) | Name of an existing VPC in which the cluster resources will be deployed. If no value is given, then a new VPC will be provisioned for the cluster. [Learn more](https://cloud.ibm.com/docs/vpc) | `string` | `""` | no |

datasources.tf

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
###################################################
2+
# Copyright (C) IBM Corp. 2023 All Rights Reserved.
3+
# Licensed under the Apache License v2.0
4+
###################################################
5+
/*
6+
Data source process to fetch all the existing value from IBM cloud environment
7+
*/
8+
9+
data "ibm_resource_group" "rg" {
10+
name = var.resource_group
11+
}
12+
13+
data "ibm_is_region" "region" {
14+
#name = join("-", slice(split("-", var.zone), 0, 2))
15+
name = local.region_name
16+
}
17+
18+
data "ibm_is_zone" "zone" {
19+
name = var.zone
20+
region = data.ibm_is_region.region.name
21+
}
22+
23+
data "ibm_is_vpc" "existing_vpc" {
24+
// Lookup for this VPC resource only if var.vpc_name is not empty
25+
count = var.vpc_name != "" ? 1:0
26+
name = var.vpc_name
27+
}
28+
29+
data "ibm_is_vpc" "vpc" {
30+
name = local.vpc_name
31+
// Depends on creation of new VPC or look up of existing VPC based on value of var.vpc_name,
32+
depends_on = [module.vpc, data.ibm_is_vpc.existing_vpc]
33+
}
34+
35+
data "ibm_is_vpc_address_prefixes" "existing_vpc" {
36+
#count = var.vpc_name != "" ? 1 : 0
37+
vpc = data.ibm_is_vpc.vpc.id
38+
}
39+
40+
data "ibm_is_instance_profile" "management_node" {
41+
name = var.management_node_instance_type
42+
}
43+
44+
data "ibm_is_instance_profile" "worker" {
45+
count = var.worker_node_type == "vsi" ? 1 : 0
46+
name = var.worker_node_instance_type
47+
}
48+
49+
data "ibm_is_instance_profile" "login" {
50+
name = var.login_node_instance_type
51+
}
52+
53+
data "ibm_is_instance_profile" "storage" {
54+
name = var.storage_node_instance_type
55+
}
56+
57+
data "ibm_is_bare_metal_server_profile" "worker_bare_metal_server_profile" {
58+
count = var.worker_node_type == "baremetal" ? 1 : 0
59+
name = var.worker_node_instance_type
60+
}
61+
62+
data "ibm_is_dedicated_host_profiles" "worker" {
63+
count = var.dedicated_host_enabled ? 1: 0
64+
}
65+
66+
data "ibm_is_volume_profile" "nfs" {
67+
name = var.volume_profile
68+
}
69+
70+
data "ibm_is_ssh_key" "ssh_key" {
71+
for_each = toset(split(",", var.ssh_key_name))
72+
name = each.value
73+
}
74+
75+
data "ibm_is_image" "stock_image" {
76+
name = local.stock_image_name
77+
}
78+
79+
data "ibm_is_image" "baremetal_image" {
80+
name = local.worker_bare_metal_server_osimage_name
81+
}
82+
83+
data "ibm_is_image" "image" {
84+
name = var.image_name
85+
count = local.image_mapping_entry_found ? 0:1
86+
}
87+
88+
data "http" "fetch_myip"{
89+
url = "http://ipv4.icanhazip.com"
90+
}

0 commit comments

Comments
 (0)