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

Support for write-only properties #352

Open
2 tasks
arjunrajinstaclustr opened this issue Aug 5, 2022 · 0 comments · May be fixed by #353
Open
2 tasks

Support for write-only properties #352

arjunrajinstaclustr opened this issue Aug 5, 2022 · 0 comments · May be fixed by #353

Comments

@arjunrajinstaclustr
Copy link

Is your feature request related to a problem?

The plugin seems to expect that all input properties on a terraform resource should be fetchable by the GET request for the resource, however there might be legitimate scenarios where an "input-only"/"write-only" property is needed. For example - providing some credentials to create a resource that only needs it at creation time (i.e on the POST request) and the service doesn't want to store these credentials to be fetched by the GET request.

Describe the solution you'd like

A new extension, example - x-terraform-write-only, which can be applied to input properties.

Using this extension, changes to the property should be ignored if they are changed to null, since the GET request would not return a value for it or return null.

When performing the diff on terraform state, the value of such properties could be obtained from the terraform state file rather than the API response.

Acceptance criteria

  • A new extension is introduced for write-only input properties
  • The new extension will ignore changes to null for the target property
  • The extension is compatible with terraform import

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Additional context

I've had a look through the feature set and documentation and I haven't found a way to deal with such properties, so feel free to close this issue if there is a workaround that I've missed.

Checklist (for admin only)

Don't forget to go through the checklist to make sure the issue is created properly:

  • I have added a corresponding label (feature request) 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
Labels
None yet
Projects
None yet
1 participant