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

Move 'x-terraform-id' and 'x-terraform-status-field' to schema definition root level #52

Open
2 tasks done
dikhan opened this issue Sep 6, 2018 · 0 comments
Open
2 tasks done

Comments

@dikhan
Copy link
Owner

dikhan commented Sep 6, 2018

Is your feature request related to a problem?

Currently x-terraform-id and x-terraform-status-field extensions are defined on a property level; however this means that there's potential that multiple properties could be set with these extensions enabled.

Describe the solution you'd like

To avoid this issue, a better design would be to move the properties one level up along with the schema definitions root properties and if defined the corresponding value will define the expected id or status field to use; otherwise default value will fall to normal behaviour which is expect to have a property named 'id' and 'status' (for asynchronous operations)

  LBV1:
    type: "object"
    x-terraform-id: "id"
    x-terraform-status-field: "status"
    required:
      - name
      - backends
    properties:
      ...

Acceptance criteria

What's required to consider this feature request complete?

  • If the property is defined in the root level, the value should define the expected property to use. In the case of 'x-terraform-id' the value set will be used to identify the id of the resource and accordingly the value set for x-terraform-status-field will be used as status field.
  • If the properties are not present in the root level, then default names will be used instead. These being 'id' and 'status' by default.
  • If non of the above are met, an error should be throw upon validation

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant