add extensions as exported parameter in resource instance #1686
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We(Event Streams) is working on Terraform support, and we would like to define the resource and user scenario in this way
ibm_event_streams_topic
as a resource for user to create under an instancce, and useibm_resource_instance
as it is.extensions
as an output parameters inibm_resource_instance
, then our service broker will store this connection string in that map, then customer application can uselookup(ibm_resource_instance.es_instance.extensions, "kafka_brokers_sasl", "")
to get it. An alternative way(as database implemented as such) is defining a resourceibm_event_streams
that is equivalent toibm_resource_instance
and export thekafka_brokers_sasl
in that resource, but it has to duplicate all the CRUD operations thatibm_resource_instance
already has done. Thus I do not prefer this way.While exporting
extensions
fromibm_resource_instance
gives more flexibility for all services who want to export some properties for their consumers at instance level.a dependent PR is done: IBM-Cloud/bluemix-go#229