Replies: 6 comments
-
@Dray56 The ID which is passed to v3/service_credential_bindings/2a00a2b9-00ca-4c34-aa07-8386ef31c641/parameters is the terraform object one not the service instance and the binding is supported as I successfully obtain the data by using the correct ID. This is a bug from my perspective so please share how is possible to obtain the data from this credential binding key in CF? |
Beta Was this translation helpful? Give feedback.
-
@Dray56 Could you please provide me an example how service_credential_bindings data can be obtained if there is a new approach? Thanks |
Beta Was this translation helpful? Give feedback.
-
Hi @yeborisov, The data source is working properly as expected and you should find no issues in accessing its attributes even with the warning being shown. For example if you want to output the credential details of the binding you can reference the below snippet assuming you got atleast one binding as output of the data source.
As for your doubt regarding the ID(2a00a2b9-00ca-4c34-aa07-8386ef31c641) - it is the GUID from the CloudFoundry for the service_credential_binding resource you have created and not the service instance linked to it. Since, we are trying to fetch details of the service_credential_binding parameters used during the creation of the binding, we need to hit that particular endpoint with the binding ID. |
Beta Was this translation helpful? Give feedback.
-
Thanks @Dray56
where you can see
vs
and again this ID 2a00a2b9-00ca-4c34-aa07-8386ef31c641 is not related to any CloudFoundry object, entity etc. So @Dray56 please tell me how to obtain the data source using the correct GUID in CloudFoundry. Thanks in advance |
Beta Was this translation helpful? Give feedback.
-
Hi @yeborisov, There is a confusion persisting on how CloudFoundry works. Every resource in Cloudfoundry has a unique GUID(aka ID). That's how CloudFoundry is designed. Please refer documentation for details. Here we are dealing with 2 different resources:
Please Note: The service-credential-binding GUID is NOT the same as Service Instance GUID For creating the Service Credential Binding, the service instance GUID is required. In your setup:-
This is NOT generated by terraform but by CloudFoundry For creating the Service Credential Binding, you are passing in the service_instance ID - 4a3dac77-0f77-4baf-9411-3634a7cd57a0 and once the service Credential Binding resource is created in Cloudfoundry, it gets its own unique GUID - 2a00a2b9-00ca-4c34-aa07-8386ef31c641 that is different from the existing service instance GUID. Now to fetch the finer details of the parameters passed during the creation of the service credential binding and the credential details of the Service Credential Binding, the cloudfoundry_service_credential_binding data source is used here as the attributes The warning that you are encountering is because of this particular reason - Hope there is greater clarity now. |
Beta Was this translation helpful? Give feedback.
-
Thanks @Dray56 for the clarification. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Originally posted by @Dray56 in #206
@Dray56 Could you please provide me with example how to obtain the data from the admin-key?
Beta Was this translation helpful? Give feedback.
All reactions