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

How to you indicate a computed attribute will change? #84

Open
5 of 6 tasks
bschaeffer opened this issue Apr 30, 2021 · 1 comment
Open
5 of 6 tasks

How to you indicate a computed attribute will change? #84

bschaeffer opened this issue Apr 30, 2021 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@bschaeffer
Copy link

bschaeffer commented Apr 30, 2021

Does this documenation exist?

  • This is new documentation
  • This is an enhancement to existing documentation

Where would you expect to find this documentation?

  • On terraform.io
  • In the GoDoc for this module
  • In this repo as a markdown file
  • Somewhere else

Details

Feel like this can go everywhere.

Description

I have got everything working as I expected to using this plugin with the exception of Computed attributes. There is no documentation about how to indicate a computed attribute will change in a Plan or Apply response? It would be super-helpful if there was even the most basic a tutorial on this in the docs.

I actually think even the simplest examples of reconciling plans and applies would be helpful, including how to make use of PriorState, PlannedState and Config in the PlanResourceRequest, as well as what further steps an Apply should take. I am unsure whether I need to do anything in Plan as it is quite duplicative of the work you need to do in Apply.

@bschaeffer bschaeffer added the documentation Improvements or additions to documentation label Apr 30, 2021
@paddycarver
Copy link
Contributor

This is a good point and something we should add.

The short answer for plan is "set the value to tftypes.UnknownValue". You can't return unknown values (values that will change) from apply.

Leaving this open to track documenting the expectations and requirements of the module on terraform.io.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants