Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] App Deployment Breaks when params are added to service bindings #99

Closed
1 task done
vipinvkmenon opened this issue Apr 27, 2024 · 1 comment · Fixed by #104
Closed
1 task done

[BUG] App Deployment Breaks when params are added to service bindings #99

vipinvkmenon opened this issue Apr 27, 2024 · 1 comment · Fixed by #104
Labels
bug Something isn't working

Comments

@vipinvkmenon
Copy link
Member

Is there an existing issue for this?

  • I have searched the existing issues

What version of the Terraform provider are you using?

No response

What version of the Terraform CLI are you using?

1.8.0

What CF API version are you using?

3.159.0

What type of issue are you facing

bug report

Describe the bug

When trying to deploy an application with service_bindings, the provider fails with the error: Value Conversion Error

Full Log

 Error: Value Conversion Error
│ 
│   with cloudfoundry_app.http-bin-server,
│   on main.tf line 11, in resource "cloudfoundry_app" "http-bin-server":
│   11: resource "cloudfoundry_app" "http-bin-server" {
│ 
│ An unexpected error was encountered trying to build a value. This is always an error in the provider. Please report
│ the following to the provider developer:
│ 
│ don't know how to reflect tftypes.String into interface {}

Expected Behavior

The parameters are parsed successfully.

Steps To Reproduce

Execute terraform apply

Your Terraform Configuration

resource "cloudfoundry_app" "http-bin-server" {
  name         = "tf-test-do-not-delete-http-bin"
  space_name   = "Space-Name"
  org_name     = "Org-Name"
  docker_image = "kennethreitz/httpbin"

  no_route = true
  service_bindings = [
    {
      service_instance : "xsuaa_svc"
      params = {
        role = "Token_Exchange"
      }
    }
  ]
 }

Roles

No response

Add screenshots to help explain your problem

No response

Additional context

The error is thrown at mapAppValuesToType.

Seems like serviceManifest.Parameters expects map[string]interface{} but gets string instead

@vipinvkmenon vipinvkmenon added the bug Something isn't working label Apr 27, 2024
@vipinvkmenon
Copy link
Member Author

Note: If this conversion error is somehow bypassed for e.g #101 then the app gets created with the service bindings correctly bound

Gourab1998 added a commit that referenced this issue Apr 30, 2024
Gourab1998 added a commit that referenced this issue Apr 30, 2024
Dray56 pushed a commit that referenced this issue May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant