pub enum ResourceLifecycle {
Frozen,
Live,
LiveOnSetup,
}Expand description
Describes the lifecycle of a resource within a stack, determining how it’s managed and deployed.
Variants§
Frozen
Frozen resources are created once during initial setup and are rarely, if ever, modified. They typically require fewer permissions for ongoing management after the initial deployment. Example: S3 buckets for logs, VPCs, IAM roles.
Live
Live resources are frequently updated as part of ongoing deployments. They generally require more permissions for ongoing management to allow for these frequent updates. By default, live resources are not created during the initial setup phase unless specified. Example: Lambda functions, Cloud Run services.
LiveOnSetup
LiveOnSetup resources are live resources that are specifically designated to be created during the initial setup phase of the stack. This is useful for resources that need to be present from the beginning but are still expected to be updated frequently. Example: A managing function that orchestrates updates for other live resources.
Implementations§
Source§impl ResourceLifecycle
impl ResourceLifecycle
Sourcepub fn is_live(&self) -> bool
pub fn is_live(&self) -> bool
Returns true if the resource is considered live (i.e., Live or LiveOnSetup).
Sourcepub fn initial_setup(&self) -> bool
pub fn initial_setup(&self) -> bool
Returns true if the resource should be created or configured during the initial setup phase.
This applies to Frozen resources and LiveOnSetup resources.
Trait Implementations§
Source§impl Clone for ResourceLifecycle
impl Clone for ResourceLifecycle
Source§fn clone(&self) -> ResourceLifecycle
fn clone(&self) -> ResourceLifecycle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResourceLifecycle
impl Debug for ResourceLifecycle
Source§impl<'de> Deserialize<'de> for ResourceLifecycle
impl<'de> Deserialize<'de> for ResourceLifecycle
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for ResourceLifecycle
impl Hash for ResourceLifecycle
Source§impl PartialEq for ResourceLifecycle
impl PartialEq for ResourceLifecycle
Source§impl Serialize for ResourceLifecycle
impl Serialize for ResourceLifecycle
impl Copy for ResourceLifecycle
impl Eq for ResourceLifecycle
impl StructuralPartialEq for ResourceLifecycle
Auto Trait Implementations§
impl Freeze for ResourceLifecycle
impl RefUnwindSafe for ResourceLifecycle
impl Send for ResourceLifecycle
impl Sync for ResourceLifecycle
impl Unpin for ResourceLifecycle
impl UnsafeUnpin for ResourceLifecycle
impl UnwindSafe for ResourceLifecycle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.