You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a service provider
I want to be able to expose as data resource instance paths (e,g: /v1/cdns/{id})
So users can retrieve individual resource instance info by providing the id in the data source configuration
Acceptance criteria
Scenario: fetching an already existing cdn using cdn data source instanceGiven an already created cdn with id = 1234 and the swagger file below
When a data resource sl_cdn_v1_instance is configured with id = 1234 and terraform is executed
Then the resulted data source info should contain in the state both the id matching the input id from the user and the corresponding label for that given cdn id.
Input swagger file
swagger: "2.0"
paths:
/v1/cdns/{id}:
get:
summary: "Get cdn by id"
parameters:
- name: "id"
in: "path"
description: "The cdn id that needs to be fetched."
required: true
type: "string"
responses:
200:
schema:
$ref: "#/definitions/ContentDeliveryNetworkV1"
definitions:
ContentDeliveryNetworkV1:
type: object
properties:
id:
type: string
readOnly: true
label:
type: string
Terraform configuration file using cdn data source instance
data "sl_cdn_v1_instance" "my_cdn" {
id = "someID"
}
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
This ticket came out of realizing that some use cases may not necesarely need to depend on the list operation as supported in #5 ; but rather just retrieve an already existing resource instance by providing simply its id.
Checklist
Don't forget to go through the checklist to make sure the issue is created properly:
I have added a corresponding label (feature request/bug/etc) to the issue (right side menu)
I have added this issue to the 'API Terraform Provider' GitHub project (right side menu)
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem?
Currently data sources are supported for root level GET paths (https://github.com/dikhan/terraform-provider-openapi/blob/master/docs/how_to.md#terraform-data-source-compliant-requirements).
Describe the solution you'd like
Acceptance criteria
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
This ticket came out of realizing that some use cases may not necesarely need to depend on the list operation as supported in #5 ; but rather just retrieve an already existing resource instance by providing simply its id.
Checklist
Don't forget to go through the checklist to make sure the issue is created properly:
The text was updated successfully, but these errors were encountered: