-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #367 from vmware/feature/provisioner
Management cluster provisioner resource support
- Loading branch information
Showing
26 changed files
with
1,377 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,6 +89,7 @@ run: | |
- helmfeature | ||
- helmrelease | ||
- managementcluster | ||
- provisioner | ||
|
||
linters-settings: | ||
funlen: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
--- | ||
Title: "Provisioner data source in a management cluster" | ||
Description: |- | ||
Provisioner data source in a management cluster. | ||
--- | ||
|
||
# Management Cluster Provisioner | ||
|
||
Read provisioner in a management cluster using this Terraform module. | ||
|
||
### Tanzu Kubernetes Grid Service and Tanzu Kubernetes Grid vSphere | ||
- Only provisioner read feature is enabled for Tanzu Kubernetes Grid Service and Tanzu Kubernetes Grid vSphere management clusters. | ||
- For a Tanzu Kubernetes cluster running in vSphere, you add a provisioner by creating | ||
a namespace in the management cluster, which you can do using kubectl. | ||
For more information, see [Create Namespaces in the Management Cluster] in the VMware Tanzu Kubernetes Grid Product Documentation. | ||
- For a Tanzu Kubernetes cluster running in vSphere with Tanzu, you add a provisioner by creating | ||
a vSphere namespace in the Supervisor Cluster, which you can do in your vSphere environment. | ||
For more information, see [Configuring and Managing vSphere Namespaces] in the vSphere with | ||
Tanzu Configuration and Management documentation. | ||
|
||
[Create Namespaces in the Management Cluster] : https://docs.vmware.com/en/VMware-Tanzu-Kubernetes-Grid/1.5/vmware-tanzu-kubernetes-grid-15/GUID-cluster-lifecycle-multiple-management-clusters.html#namespaces | ||
[Configuring and Managing vSphere 7.x Namespaces] : https://docs.vmware.com/en/VMware-vSphere/7.0/vmware-vsphere-with-tanzu/GUID-1544C9FE-0B23-434E-B823-C59EFC2F7309.html | ||
[Configuring and Managing vSphere 8.x Namespaces] : https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-with-tanzu-services-workloads/GUID-1544C9FE-0B23-434E-B823-C59EFC2F7309.html | ||
|
||
### Example Usage | ||
|
||
```terraform | ||
# Read Tanzu Mission Control provisioner : fetch the given provisioner details | ||
data "tanzu-mission-control_provisioner" "read_provisioner" { | ||
name = "test-provisioner" # Optional | ||
management_cluster = "eks" # Required | ||
} | ||
# Read Tanzu Mission Control provisioner : fetch all the provisioner details for the given management cluster | ||
data "tanzu-mission-control_provisioner" "read_provisioner" { | ||
management_cluster = "eks" # Required | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `management_cluster` (String) Name of the management cluster | ||
|
||
### Optional | ||
|
||
- `meta` (Block List, Max: 1) Metadata for the resource (see [below for nested schema](#nestedblock--meta)) | ||
- `name` (String) Name of the provisioner | ||
- `org_id` (String) ID of the organization | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
|
||
<a id="nestedblock--meta"></a> | ||
### Nested Schema for `meta` | ||
|
||
Optional: | ||
|
||
- `annotations` (Map of String) Annotations for the resource | ||
- `description` (String) Description of the resource | ||
- `labels` (Map of String) Labels for the resource | ||
|
||
Read-Only: | ||
|
||
- `resource_version` (String) Resource version of the resource | ||
- `uid` (String) UID of the resource |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
--- | ||
Title: "Provisioner resource in a management cluster" | ||
Description: |- | ||
Provisioner resource lifecycle management. | ||
--- | ||
|
||
# Management Cluster Provisioner | ||
|
||
Lifecycle management of provisioner in a management cluster using this Terraform module. | ||
|
||
Addition of a provisioner resource refers to creation of namespace in the management cluster. | ||
|
||
### Tanzu Kubernetes Grid Service and Tanzu Kubernetes Grid vSphere | ||
- Only provisioner read only feature is enabled for Tanzu Kubernetes Grid Service and Tanzu Kubernetes Grid vSphere management clusters. | ||
- For a Tanzu Kubernetes cluster running in vSphere, you add a provisioner by creating | ||
a namespace in the management cluster, which you can do using kubectl. | ||
For more information, see [Create Namespaces in the Management Cluster] in the VMware Tanzu Kubernetes Grid Product Documentation. | ||
- For a Tanzu Kubernetes cluster running in vSphere with Tanzu, you add a provisioner by creating | ||
a vSphere namespace in the Supervisor Cluster, which you can do in your vSphere environment. | ||
For more information, see [Configuring and Managing vSphere Namespaces] in the vSphere with | ||
Tanzu Configuration and Management documentation. | ||
|
||
[Create Namespaces in the Management Cluster] : https://docs.vmware.com/en/VMware-Tanzu-Kubernetes-Grid/1.5/vmware-tanzu-kubernetes-grid-15/GUID-cluster-lifecycle-multiple-management-clusters.html#namespaces | ||
[Configuring and Managing vSphere 7.x Namespaces] : https://docs.vmware.com/en/VMware-vSphere/7.0/vmware-vsphere-with-tanzu/GUID-1544C9FE-0B23-434E-B823-C59EFC2F7309.html | ||
[Configuring and Managing vSphere 8.x Namespaces] : https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-with-tanzu-services-workloads/GUID-1544C9FE-0B23-434E-B823-C59EFC2F7309.html | ||
|
||
### Example Usage | ||
|
||
```terraform | ||
# Create provisioner resource | ||
resource "tanzu-mission-control_provisioner" "create_provisioner" { | ||
name = "demo-test" # Required | ||
management_cluster = "eks" # Required | ||
meta { | ||
description = "Create provisioner through terraform" | ||
labels = { | ||
"key1" : "value1", | ||
"key2" : "value2", | ||
} | ||
} | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `management_cluster` (String) Name of the management cluster. Edit operation such as create, update and delete is not supported for TKG vSphere & TKG service vSphere management cluster provisioners. | ||
- `name` (String) Name of the provisioner | ||
|
||
### Optional | ||
|
||
- `meta` (Block List, Max: 1) Metadata for the resource (see [below for nested schema](#nestedblock--meta)) | ||
- `org_id` (String) ID of the organization | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
|
||
<a id="nestedblock--meta"></a> | ||
### Nested Schema for `meta` | ||
|
||
Optional: | ||
|
||
- `annotations` (Map of String) Annotations for the resource | ||
- `description` (String) Description of the resource | ||
- `labels` (Map of String) Labels for the resource | ||
|
||
Read-Only: | ||
|
||
- `resource_version` (String) Resource version of the resource | ||
- `uid` (String) UID of the resource |
10 changes: 10 additions & 0 deletions
10
examples/data-sources/provisioner/data_source_provisioner.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Read Tanzu Mission Control provisioner : fetch the given provisioner details | ||
data "tanzu-mission-control_provisioner" "read_provisioner" { | ||
name = "test-provisioner" # Optional | ||
management_cluster = "eks" # Required | ||
} | ||
|
||
# Read Tanzu Mission Control provisioner : fetch all the provisioner details for the given management cluster | ||
data "tanzu-mission-control_provisioner" "read_provisioner" { | ||
management_cluster = "eks" # Required | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Create provisioner resource | ||
resource "tanzu-mission-control_provisioner" "create_provisioner" { | ||
name = "demo-test" # Required | ||
management_cluster = "eks" # Required | ||
|
||
meta { | ||
description = "Create provisioner through terraform" | ||
labels = { | ||
"key1" : "value1", | ||
"key2" : "value2", | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.