Commit graph

11 commits

Author SHA1 Message Date
Radek Simko
0fe906fa8c make copyrightfix 2026-02-17 13:56:34 +00:00
James Bardin
4a9d46f9df avoid unknowns in OpenEphemeralResource
Ephemeral resources can't be opened if the configuration contains
unknown values.
2024-11-06 13:16:34 -05:00
James Bardin
dad380ffe0 don't claim missing instances are not live
Ephemeral instances are only removed as whole resources, so there should
not be missing instances from an ephemeral resource. We can't error on
missing instances, because evaluation of checks may be pulling only a
single instance for evaluation before other sibling instances have been
opened.
2024-10-30 15:23:00 -04:00
James Bardin
eb184a5213 refactor ephemeral interface to better match protocol 2024-09-30 10:51:04 -04:00
James Bardin
cd2631d657 make ephemeral calls cancellable 2024-09-25 12:51:59 -04:00
James Bardin
9c3dc8f73a ephemeral protocol rename
Add `Resource` to all the ephemeral protocol symbols to make them
consistent with existing naming conventions.
2024-09-20 11:08:53 -04:00
James Bardin
133dd4b725 upgrade Resources lock to RWMutex 2024-09-18 11:16:57 -04:00
James Bardin
baab7639ca update failed ephemeral Close error handling
Increase the wait to 10 seconds to try and wait for any pending renew
calls.
2024-09-17 10:51:26 -04:00
James Bardin
5cfe1123b6 remove the 1 minute advance in renew timer
There doesn't seem to be an objective reason for the 1 minute advance in
renew operation. If renewing requires some additional buffer, 1 minute
may not be correct and leaves provider guessing at terraform's behavior
based on experimentation. If additional time is needed around renewing
of ephemeral values, then the provider should take that into
consideration with their own expiration times.
2024-09-17 10:51:26 -04:00
James Bardin
056232c794 don't leak renew goroutines 2024-09-17 10:51:26 -04:00
James Bardin
0e80c0b791 resources/ephemeral implementation
Create a package for managing ephemeral resources and lifecycle.

Ephemeral resources have a very different lifecycle from managed
resources, and need to be managed more similarly to named values than
resources. The resources/ephemeral package is a separate database for
tracking ephemeral resource values, refreshing those resources as
required, and closing down the resources when they are no longer needed.
2024-09-17 10:50:55 -04:00