You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vote on this issue by adding a 👍 reaction to the original issue initial description to help the maintainers prioritize.
Do not leave "+1" or other comments that do not add relevant information or questions.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Description
For a long time, we waited for the workload management resource so first of all thank you.
Secondly:
The doc of the supervisor resource is very light!
It just has a simple description of each attribute.
it doesn't show what are the requested types
Cannot know whether an attribute is optional or required
Doesn't show schemas of resource structure
Doesn't show if a block might be repeatable or not
No specific examples, and no description of other stuff
Also since each workload can have more than one namespace configured under it, you should set the namespace to a list object type, so a user can put more than one namespace
You should take into account, that not everyone who is familiar with Tanzu(tkgs), has expertise in vSpehere.
Therefore you need to describe as well, if there are crucial dependencies, and there are.
Use Case(s)
I need to assign more namespaces under one workload management cluster, currently, it's not enabled in your code
Potential Terraform Provider Configuration
For the namespace thing please look at below
resource_vsphere_supervisor.go
under func resourceVsphereSupervisor() *schema.Resource {
"namespace": {
Type: schema.TypeSet, ==> make it to be "schema.TypeList" please
Optional: true,
Description: "List of namespaces associated with the cluster.",
Elem: namespaceSchema(),
},
more say to be it dynamically so we can add multiple blocks
I Suggest to : 1) adding MinItems
"namespace": {
Type: schema.TypeSet, ==> make it to be "schema.TypeList" please
Optional: true,
**MinItems:** 1, ==> tell it it can have more then one block and its repeatable
Description: "List of namespaces associated with the cluster.",
Elem: namespaceSchema(),
},
For not having to call a function and maybe have it more organized, For you your judgment of course
Change the namespace scheme from:
"namespace": {
Type: schema.TypeSet,
Optional: true,
Description: "List of namespaces associated with the cluster.",
Elem: namespaceSchema(),
},
To:
"namespace": {
Type: schema.TypeList,
Optional: true,
MinItem: 1
Description: "List of namespaces associated with the cluster.",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"name": {
Type: schema.TypeString,
Required: true,
Description: "The name of the namespace.",
},
"content_libraries": {
Type: schema.TypeList,
Optional: true,
Description: "A list of content libraries.",
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"vm_classes": {
Type: schema.TypeList,
Optional: true,
Description: "A list of virtual machine classes.",
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
},
Also, you can take all of the blocks and create the schema in particular for each block and assign the element without having to have a return function that constructs the scheme back to the Elem key
Also if you would like to do so in addition
you can create or have in the beginning some constant that will represent your resource keys/attributes and then use specKey whenever needed based on the scheme structure under the relevant schema
References
No response
The text was updated successfully, but these errors were encountered:
@spacegospod could you review the above and provide your thoughts. It's a mix of documentation questions and changesthat could potentially be breaking with tyoe changes.
You are absolutely right in your description of the docs for r/supervisor as "light".
The resource itself is not implemented to cover the full set of options for supervisor enablement.
There's a request to add more functionality that has been waiting in the backlog for a while and we can think about a second iteration of the implementation.
Turning namespace into a standalone resource would be considered a breaking change and would probably have to wait for a major release before it can be rolled out. Making the "namespace" input a list so that we support multiple assignments however can probably be called a "minor breaking change" that can be adopted by users with little effort. @tenthirtyam would that be something that we can roll out with a minor version?
Community Guidelines
Description
For a long time, we waited for the workload management resource so first of all thank you.
Secondly:
The doc of the supervisor resource is very light!
It just has a simple description of each attribute.
it doesn't show what are the requested types
Cannot know whether an attribute is optional or required
Doesn't show schemas of resource structure
Doesn't show if a block might be repeatable or not
No specific examples, and no description of other stuff
Also since each workload can have more than one namespace configured under it, you should set the namespace to a list object type, so a user can put more than one namespace
You should take into account, that not everyone who is familiar with Tanzu(tkgs), has expertise in vSpehere.
Therefore you need to describe as well, if there are crucial dependencies, and there are.
Use Case(s)
I need to assign more namespaces under one workload management cluster, currently, it's not enabled in your code
Potential Terraform Provider Configuration
For the namespace thing please look at below
resource_vsphere_supervisor.go
under func resourceVsphereSupervisor() *schema.Resource {
more say to be it dynamically so we can add multiple blocks
I Suggest to : 1) adding MinItems
For not having to call a function and maybe have it more organized, For you your judgment of course
Change the namespace scheme from:
To:
Also, you can take all of the blocks and create the schema in particular for each block and assign the element without having to have a return function that constructs the scheme back to the Elem key
Also if you would like to do so in addition
you can create or have in the beginning some constant that will represent your resource keys/attributes and then use specKey whenever needed based on the scheme structure under the relevant schema
References
No response
The text was updated successfully, but these errors were encountered: