|
2 | 2 |
|
3 | 3 | - This example provisions OCP cluster and set taints for worker pools. |
4 | 4 | - The example also enables a key protect provider for the cluster, as well as the required COS instance. |
| 5 | + - The OCP cluster created has a private endpoint. |
| 6 | + |
| 7 | + ## Private Cluster |
| 8 | + |
| 9 | + ## Usage |
| 10 | +```hcl |
| 11 | +# Replace "master" with a GIT release version to lock into a specific release |
| 12 | +module "ocp_base" { |
| 13 | + # update this value to the value of your IBM Cloud API key |
| 14 | + ibmcloud_api_key = "ibm cloud api key" # pragma: allowlist secret |
| 15 | + source = "git::https://github.com/terraform-ibm-modules/terraform-ibm-base-ocp-vpc.git?ref=master" |
| 16 | + cluster_name = "example-cluster-name" |
| 17 | + # modify the value for resource_group_id with and id of a group you own |
| 18 | + resource_group_id = "id of existing resource group" |
| 19 | + region = "us-south" |
| 20 | + force_delete_storage = true |
| 21 | + vpc_id = "id of existing VPC" |
| 22 | + ## obtain the below values from the targeted VPC and adjust to the number of zones, |
| 23 | + ## subnets, subnet name, cidr_block, id, zone |
| 24 | + vpc_subnets = { |
| 25 | + zone-1 = [ |
| 26 | + { |
| 27 | + cidr_block = "192.168.32.0/22" |
| 28 | + id = "0717-afc29fbb-0dbe-493a-a5b9-f3c5899cb8b9" |
| 29 | + zone = "us-south-1" |
| 30 | + }, |
| 31 | + { |
| 32 | + cidr_block = "192.168.36.0/22" |
| 33 | + id = "0727-d65c1eda-9e38-4200-8452-cb8ff5bb3140" |
| 34 | + zone = "us-south-2" |
| 35 | + }, |
| 36 | + { |
| 37 | + cidr_block = "192.168.40.0/22" |
| 38 | + id = "0737-9a823cd3-16bf-4ba4-a429-9e1fc7db74b8" |
| 39 | + zone = "us-south-3" |
| 40 | + } |
| 41 | + ] |
| 42 | + zone-2 = [ |
| 43 | + { |
| 44 | + cidr_block = "192.168.0.0/22" |
| 45 | + id = "0717-846b9490-34ae-4a6c-8288-28112dca1ba3" |
| 46 | + zone = "us-south-1" |
| 47 | + }, |
| 48 | + { |
| 49 | + cidr_block = "192.168.4.0/22" |
| 50 | + id = "0727-ef8db7f6-ffa5-4d8b-a317-4631741a45ee" |
| 51 | + zone = "us-south-2" |
| 52 | + }, |
| 53 | + { |
| 54 | + cidr_block = "192.168.8.0/22" |
| 55 | + id = "0737-c9a6d871-d95b-4914-abf5-82c22f4161d1" |
| 56 | + zone = "us-south-3" |
| 57 | + } |
| 58 | + ] |
| 59 | + zone-3 = [ |
| 60 | + { |
| 61 | + cidr_block = "192.168.16.0/22" |
| 62 | + id = "0717-d46e227c-89d4-4b02-9008-d03907a275b6" |
| 63 | + zone = "us-south-1" |
| 64 | + }, |
| 65 | + { |
| 66 | + cidr_block = "192.168.20.0/22" |
| 67 | + id = "0727-93b1edcb-966c-4517-a7af-6ac63cd93adf" |
| 68 | + zone = "us-south-2" |
| 69 | + }, |
| 70 | + { |
| 71 | + cidr_block = "192.168.24.0/22" |
| 72 | + id = "0737-807ec4f1-4d84-484e-b2f4-62dd5e431065" |
| 73 | + zone = "us-south-3" |
| 74 | + } |
| 75 | + ] |
| 76 | + } |
| 77 | + disable_public_endpoint = true |
| 78 | + ## verify_worker_network_readiness should be set to false when runtime does not have access to the kube-api-server. |
| 79 | + ## For example, if we are running terraform apply from a vsi server which is connected to the cluster vpc using a vpn or transit gateway that time verify_worker_network_readiness can be set to true. |
| 80 | + verify_worker_network_readiness = false |
| 81 | +} |
| 82 | +
|
| 83 | +``` |
0 commit comments