vmware / terraform-provider-tanzu-mission-control

Terraform provider to manage resources of Tanzu Mission Control
Mozilla Public License 2.0
38 stars 31 forks source link

Fully Support for Tanzu Package #362

Closed imurata closed 4 months ago

imurata commented 8 months ago

Is your feature request related to a problem? Please describe.

Right now, when installing the Tanzu Package, inline_values can only be specified as String or float. https://registry.terraform.io/providers/vmware/tanzu-mission-control/latest/docs/resources/package_install https://github.com/vmware/terraform-provider-tanzu-mission-control/blob/001ba2285c941a691629f1c50e1ae5e1756f7fd2/internal/resources/tanzupackageinstall/spec/cluster_spec.go#L71

However, most of the Tanzu Package has structural parameters rather than String or Float.

envoy:
 service:
   type: LoadBalancer
   annotations: {}
   externalTrafficPolicy: Cluster
   disableWait: false
 hostPorts:
   enable: true
   http: 80
   https: 443
 hostNetwork: false
 terminationGracePeriodSeconds: 300
 logLevel: info
certificates:
 duration: 8760h
 renewBefore: 360h

Therefore, most Tanzu Packages cannot be deployed with the TMC Provider.

Describe the solution you'd like

Since values is written in YAML, YAML support is desirable. If this is difficult, Json should be supported.

  inline_values = jsonencode({
{
    "certificates": {
        "duration": "8760h",
        "renewBefore": "360h"
    },
    "contour": {
        "configFileContents": {},
        "logLevel": "info",
        "pspNames": "vmware-system-restricted",
        "replicas": 2,
        "useProxyProtocol": false
    },
    "envoy": {
        "hostNetwork": false,
        "hostPorts": {
            "enable": true,
            "http": 80,
            "https": 443
        },
        "logLevel": "info",
        "service": {
            "annotations": {},
            "disableWait": false,
            "externalTrafficPolicy": "Cluster",
            "type": "LoadBalancer"
        },
        "terminationGracePeriodSeconds": 300
    },
    "infrastructure_provider": "vsphere",
    "namespace": "tanzu-system-ingress"
}
  })

Describe alternatives you've considered

No response

Additional context

No response

jm-dros commented 4 months ago

Hi, do you know when this fix is going to get published?

Thanks!

ishangupta-ds commented 3 months ago

Cc: @ramya-bangera