|
1 | | -# Starter kit for a Terraform module |
| 1 | +# IBM Cloud OpenShift VPC cluster |
2 | 2 |
|
3 | | -This is a Starter kit to help with the creation of Terraform modules. The basic structure of a Terraform module is fairly |
4 | | -simple and consists of the following basic values: |
5 | | - |
6 | | -- README.md - provides a description of the module |
7 | | -- main.tf - defiens the logic for the module |
8 | | -- variables.tf (optional) - defines the input variables for the module |
9 | | -- outputs.tf (optional) - defines the values that are output from the module |
10 | | - |
11 | | -Beyond those files, any other content can be added and organized however you see fit. For example, you can add a `scripts/` directory |
12 | | -that contains shell scripts executed by a `local-exec` `null_resource` in the terraform module. The contents will depend on what your |
13 | | -module does and how it does it. |
14 | | - |
15 | | -## Instructions for creating a new module |
16 | | - |
17 | | -1. Update the title and description in the README to match the module you are creating |
18 | | -2. Fill out the remaining sections in the README template as appropriate |
19 | | -3. Implement your logic in the in the main.tf, variables.tf, and outputs.tf |
20 | | -4. Use releases/tags to manage release versions of your module |
| 3 | +Provisions an IBM Cloud OpenShift VPC cluster using a provided VPC instance and COS |
| 4 | +instance. |
21 | 5 |
|
22 | 6 | ## Software dependencies |
23 | 7 |
|
24 | 8 | The module depends on the following software components: |
25 | 9 |
|
26 | 10 | ### Command-line tools |
27 | 11 |
|
28 | | -- terraform - v12 |
| 12 | +- terraform - v13 |
29 | 13 | - kubectl |
30 | 14 |
|
31 | 15 | ### Terraform providers |
32 | 16 |
|
33 | | -- IBM Cloud provider >= 1.5.3 |
| 17 | +- IBM Cloud provider >= 1.18 |
34 | 18 | - Helm provider >= 1.1.1 (provided by Terraform) |
35 | 19 |
|
36 | 20 | ## Module dependencies |
37 | 21 |
|
38 | 22 | This module makes use of the output from other modules: |
39 | 23 |
|
40 | | -- Cluster - github.com/ibm-garage-cloud/terraform-ibm-container-platform.git |
41 | | -- Namespace - github.com/ibm-garage-clout/terraform-cluster-namespace.git |
42 | | -- etc |
| 24 | +- Object Storage - github.com/cloud-native-toolkit/terraform-ibm-object-storage.git |
| 25 | +- VPC - github.com/cloud-native-toolkit/terraform-ibm-vpc.git |
43 | 26 |
|
44 | 27 | ## Example usage |
45 | 28 |
|
46 | 29 | ```hcl-terraform |
47 | | -module "dev_tools_argocd" { |
48 | | - source = "github.com/ibm-garage-cloud/terraform-tools-argocd.git?ref=v1.0.0" |
49 | | -
|
50 | | - cluster_config_file = module.dev_cluster.config_file_path |
51 | | - cluster_type = module.dev_cluster.type |
52 | | - app_namespace = module.dev_cluster_namespaces.tools_namespace_name |
53 | | - ingress_subdomain = module.dev_cluster.ingress_hostname |
54 | | - olm_namespace = module.dev_software_olm.olm_namespace |
55 | | - operator_namespace = module.dev_software_olm.target_namespace |
56 | | - name = "argocd" |
| 30 | +module "cluster" { |
| 31 | + source = "github.com/cloud-native-toolkit/terraform-ibm-ocp-vpn.git?ref=v1.0.0" |
| 32 | +
|
| 33 | + resource_group_name = var.resource_group_name |
| 34 | + region = var.region |
| 35 | + ibmcloud_api_key = var.ibmcloud_api_key |
| 36 | + name = var.cluster_name |
| 37 | + worker_count = var.worker_count |
| 38 | + ocp_version = var.ocp_version |
| 39 | + exists = var.cluster_exists |
| 40 | + name_prefix = var.name_prefix |
| 41 | + vpc_name = module.vpc.name |
| 42 | + vpc_subnet_count = module.vpc.subnet_count |
| 43 | + cos_id = module.cos.id |
57 | 44 | } |
58 | 45 | ``` |
59 | 46 |
|
0 commit comments