Skip to content

Commit

Permalink
Added support for h100 cluster, instance and template changes (#5776)
Browse files Browse the repository at this point in the history
* Added support for h100 cluster, instance and template changes

* doc fix for cluster network resources

* resolved conflicts and other merge issues
  • Loading branch information
ujjwal-ibm authored Nov 27, 2024
1 parent 9695d12 commit e068524
Show file tree
Hide file tree
Showing 79 changed files with 16,003 additions and 13 deletions.
430 changes: 430 additions & 0 deletions examples/ibm-is-ng/main.tf

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ github.com/IBM/logs-go-sdk v0.3.0 h1:FHzTCCMyp9DvQGXgkppzcOPywC4ggt7x8xu0MR5h8xI
github.com/IBM/logs-go-sdk v0.3.0/go.mod h1:yv/GCXC4/p+MZEeXl4xjZAOMvDAVRwu61WyHZFKFXQM=
github.com/IBM/logs-router-go-sdk v1.0.5 h1:r0kC1+HfmSeQCD6zQTUp4PDI/zp4Ueo1Zo19ipHuNlw=
github.com/IBM/logs-router-go-sdk v1.0.5/go.mod h1:tCN2vFgu5xG0ob9iJcxi5M4bJ6mWmu3nhmRPnvlwev0=
github.com/IBM/mqcloud-go-sdk v0.1.0 h1:fWt4uisg5GbbsfNmAxx5/6c5gQIPM+VrEsTtnimELeA=
github.com/IBM/mqcloud-go-sdk v0.1.0/go.mod h1:LesMQlKHXvdks4jqQLZH7HfATY5lvTzHuwQU5+y7b2g=
github.com/IBM/mqcloud-go-sdk v0.2.0 h1:QOWk8ZGk0QfIL0MOGTKzNdM3Qe0Hk+ifAFtNSFQo5HU=
github.com/IBM/mqcloud-go-sdk v0.2.0/go.mod h1:VZQKMtqmcdXKhmLhLiPuS/UHMs/5yo2tA/nD83cQt9E=
github.com/IBM/networking-go-sdk v0.49.0 h1:lPS34u3C0JVrbxH+Ulua76Nwl6Frv8BEfq6LRkyvOv0=
github.com/IBM/networking-go-sdk v0.49.0/go.mod h1:G9CKbmPE8gSLjN+ABh4hIZ1bMx076enl5Eekvj6zQnA=
github.com/IBM/platform-services-go-sdk v0.70.0 h1:G/jEzG/8SEEc+ZDXqAsPGPWcWD2UGy99LBhPX5iiD2E=
Expand All @@ -194,10 +194,6 @@ github.com/IBM/vmware-go-sdk v0.1.2 h1:5lKWFyInWz9e2hwGsoFTEoLa1jYkD30SReN0fQ10w
github.com/IBM/vmware-go-sdk v0.1.2/go.mod h1:2UGPBJju3jiv5VKKBBm9a5L6bzF/aJdKOKAzJ7HaOjA=
github.com/IBM/vpc-beta-go-sdk v0.8.0 h1:cEPpv4iw3Ba5W2d0AWg3TIbKeJ8y1nPuUuibR5Jt9eE=
github.com/IBM/vpc-beta-go-sdk v0.8.0/go.mod h1:hORgIyTFRzXrZIK9IohaWmCRBBlYiDRagsufi7M6akE=
github.com/IBM/vpc-go-sdk v0.62.0 h1:Xga74D70ziD7nzm51ue3othHz1epMLVkGP/L6/Be+/0=
github.com/IBM/vpc-go-sdk v0.62.0/go.mod h1:VBR6bAznHsNCFA89Ue4JFQpqCcFp8F5neqbCFCyks4Q=
github.com/IBM/vpc-go-sdk v0.63.0 h1:0eSG/8WLK4fW7AvPHlhCmPEe819pgWLF1OIxF0vR43A=
github.com/IBM/vpc-go-sdk v0.63.0/go.mod h1:VBR6bAznHsNCFA89Ue4JFQpqCcFp8F5neqbCFCyks4Q=
github.com/IBM/vpc-go-sdk v0.63.1 h1:HqQeq2wGI2pF4y0/m18EaPsOEEXFjyml+xwlLC9AiXE=
github.com/IBM/vpc-go-sdk v0.63.1/go.mod h1:VBR6bAznHsNCFA89Ue4JFQpqCcFp8F5neqbCFCyks4Q=
github.com/Jeffail/gabs v1.1.1 h1:V0uzR08Hj22EX8+8QMhyI9sX2hwRu+/RJhJUmnwda/E=
Expand Down
24 changes: 24 additions & 0 deletions ibm/acctest/acctest.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,13 @@ var (
PcsIamServiceRegistrationId string
)

// For cluster
var (
ISClusterNetworkProfileName string
ISInstanceGPUProfileName string
ISClusterNetworkSubnetPrefixesCidr string
)

func init() {
testlogger := os.Getenv("TF_LOG")
if testlogger != "" {
Expand Down Expand Up @@ -780,6 +787,23 @@ func init() {
fmt.Println("[INFO] Set the environment variable IS_ACCOUNT_ID for testing private_path_service_gateway_account_policy else it is set to default value 'fee82deba12e4c0fb69c3b09d1f12345'")
}

ISClusterNetworkProfileName = os.Getenv("IS_CLUSTER_NETWORK_PROFILE_NAME")
if ISClusterNetworkProfileName == "" {
ISClusterNetworkProfileName = "h100"
fmt.Println("[INFO] Set the environment variable IS_CLUSTER_NETWORK_PROFILE_NAME for testing cluster_network_profile else it is set to default value 'h100'")
}
ISInstanceGPUProfileName = os.Getenv("IS_INSTANCE_GPU_PROFILE_NAME")
if ISInstanceGPUProfileName == "" {
ISInstanceGPUProfileName = "gx3d-160x1792x8h100"
fmt.Println("[INFO] Set the environment variable IS_INSTANCE_GPU_PROFILE_NAME for testing cluster_network_attachments else it is set to default value 'gx3d-160x1792x8h100'")
}

ISClusterNetworkSubnetPrefixesCidr = os.Getenv("IS_CLUSTER_NETWORK_SUBNET_PREFIXES_CIDR")
if ISClusterNetworkSubnetPrefixesCidr == "" {
ISClusterNetworkSubnetPrefixesCidr = "10.1.0.0/24"
fmt.Println("[INFO] Set the environment variable IS_CLUSTER_NETWORK_SUBNET_PREFIXES_CIDR for testing cluster_network else it is set to default value '10.1.0.0/24'")
}

ISAddressPrefixCIDR = os.Getenv("SL_ADDRESS_PREFIX_CIDR")
if ISAddressPrefixCIDR == "" {
ISAddressPrefixCIDR = "10.120.0.0/24"
Expand Down
29 changes: 29 additions & 0 deletions ibm/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,20 @@ func Provider() *schema.Provider {
"ibm_is_bare_metal_server": vpc.DataSourceIBMIsBareMetalServer(),
"ibm_is_bare_metal_servers": vpc.DataSourceIBMIsBareMetalServers(),

// cluster
"ibm_is_cluster_network": vpc.DataSourceIBMIsClusterNetwork(),
"ibm_is_cluster_networks": vpc.DataSourceIBMIsClusterNetworks(),
"ibm_is_cluster_network_interface": vpc.DataSourceIBMIsClusterNetworkInterface(),
"ibm_is_cluster_network_interfaces": vpc.DataSourceIBMIsClusterNetworkInterfaces(),
"ibm_is_cluster_network_profile": vpc.DataSourceIBMIsClusterNetworkProfile(),
"ibm_is_cluster_network_profiles": vpc.DataSourceIBMIsClusterNetworkProfiles(),
"ibm_is_cluster_network_subnet": vpc.DataSourceIBMIsClusterNetworkSubnet(),
"ibm_is_cluster_network_subnets": vpc.DataSourceIBMIsClusterNetworkSubnets(),
"ibm_is_cluster_network_subnet_reserved_ip": vpc.DataSourceIBMIsClusterNetworkSubnetReservedIP(),
"ibm_is_cluster_network_subnet_reserved_ips": vpc.DataSourceIBMIsClusterNetworkSubnetReservedIps(),
"ibm_is_instance_cluster_network_attachment": vpc.DataSourceIBMIsInstanceClusterNetworkAttachment(),
"ibm_is_instance_cluster_network_attachments": vpc.DataSourceIBMIsInstanceClusterNetworkAttachments(),

"ibm_is_dedicated_host": vpc.DataSourceIbmIsDedicatedHost(),
"ibm_is_dedicated_hosts": vpc.DataSourceIbmIsDedicatedHosts(),
"ibm_is_dedicated_host_profile": vpc.DataSourceIbmIsDedicatedHostProfile(),
Expand Down Expand Up @@ -1176,6 +1190,13 @@ func Provider() *schema.Provider {
"ibm_is_backup_policy": vpc.ResourceIBMIsBackupPolicy(),
"ibm_is_backup_policy_plan": vpc.ResourceIBMIsBackupPolicyPlan(),

// cluster
"ibm_is_cluster_network_interface": vpc.ResourceIBMIsClusterNetworkInterface(),
"ibm_is_cluster_network_subnet_reserved_ip": vpc.ResourceIBMIsClusterNetworkSubnetReservedIP(),
"ibm_is_cluster_network_subnet": vpc.ResourceIBMIsClusterNetworkSubnet(),
"ibm_is_cluster_network": vpc.ResourceIBMIsClusterNetwork(),
"ibm_is_instance_cluster_network_attachment": vpc.ResourceIBMIsInstanceClusterNetworkAttachment(),

// bare_metal_server
"ibm_is_bare_metal_server_action": vpc.ResourceIBMIsBareMetalServerAction(),
"ibm_is_bare_metal_server_disk": vpc.ResourceIBMIsBareMetalServerDisk(),
Expand Down Expand Up @@ -1880,6 +1901,14 @@ func Validator() validate.ValidatorDict {
"ibm_is_bare_metal_server_network_interface": vpc.ResourceIBMIsBareMetalServerNetworkInterfaceValidator(),
"ibm_is_bare_metal_server": vpc.ResourceIBMIsBareMetalServerValidator(),

// cluster

"ibm_is_cluster_network_interface": vpc.ResourceIBMIsClusterNetworkInterfaceValidator(),
"ibm_is_cluster_network_subnet": vpc.ResourceIBMIsClusterNetworkSubnetValidator(),
"ibm_is_cluster_network_subnet_reserved_ip": vpc.ResourceIBMIsClusterNetworkSubnetReservedIPValidator(),
"ibm_is_cluster_network": vpc.ResourceIBMIsClusterNetworkValidator(),
"ibm_is_instance_cluster_network_attachment": vpc.ResourceIBMIsInstanceClusterNetworkAttachmentValidator(),

"ibm_is_dedicated_host_group": vpc.ResourceIbmIsDedicatedHostGroupValidator(),
"ibm_is_dedicated_host": vpc.ResourceIbmIsDedicatedHostValidator(),
"ibm_is_dedicated_host_disk_management": vpc.ResourceIBMISDedicatedHostDiskManagementValidator(),
Expand Down
Loading

0 comments on commit e068524

Please sign in to comment.