crossplane-contrib / provider-openstack

Crossplane provider for Openstack generated with Upjet from terraform-provider-openstack
Apache License 2.0
41 stars 10 forks source link

StackV1 Resource templateOpts.files Argument Always Fails with Errors Regardless of Format #124

Open yallic opened 1 month ago

yallic commented 1 month ago

I'm experiencing an issue with the StackV1 in the OpenStack provider. Specifically, in the templateOpts section of the YAML configuration, the files variable is expected to accept a file path.

The Bin variable works correctly and processes as expected. However, when I try to provide a file path for the Files argument, regardless of the format I use (e.g., string or map of string), I consistently encounter errors. Below is an example of the YAML configuration I am using:

apiVersion: orchestration.openstack.crossplane.io/v1alpha1
kind: StackV1
metadata:
  name: my-stack
spec:
  forProvider:
    name: crossplane-heat-example
    # Other configurations...
    templateOpts:
      Files: "/path/to/my/file"  # or { "/path/to/my/file": "content" }

Steps to Reproduce:

  1. Define a StackV1 resource with the templateOpts section containing a files variable.
  2. Provide a file path as a string or in a map of string format.
  3. Apply the configuration.

Expected Behavior: The files variable should accept the file path and process it correctly.

Actual Behavior:

When I provide the files variable, I receive the following error:

"Message: apply failed: Error building openstack_orchestration_stack_v1 template options: URL value is expected to be a map of string:" When I provide the files variable as a map of string, I encounter a different error:

"The request is invalid: patch: Invalid value: xxx" These errors occur regardless of the format I use for the files variable.