generator: третий режим destroy keep_on_destroy (state_only) для всех instance-ресурсов + предупреждения «заморожен/оставлен как есть»
This commit is contained in:
@@ -116,6 +116,11 @@ func LoadSpecs(dir string) ([]types.GenResource, []types.GenSubresource, []types
|
||||
suspendOnDestroy = *spec.Lifecycle.SuspendOnDestroyDefault
|
||||
}
|
||||
|
||||
keepOnDestroy := false
|
||||
if spec.Lifecycle.KeepOnDestroyDefault != nil {
|
||||
keepOnDestroy = *spec.Lifecycle.KeepOnDestroyDefault
|
||||
}
|
||||
|
||||
gr := types.GenResource{
|
||||
Name: spec.Name,
|
||||
ServiceID: spec.ServiceID,
|
||||
@@ -128,6 +133,7 @@ func LoadSpecs(dir string) ([]types.GenResource, []types.GenSubresource, []types
|
||||
HasRefSvcParams: HasRefSvcParams(schemaParams),
|
||||
SupportsSuspendDestroy: supportsSuspendDestroy,
|
||||
SuspendOnDestroy: suspendOnDestroy,
|
||||
KeepOnDestroy: keepOnDestroy,
|
||||
AdoptExistingOnCreate: adoptExistingOnCreate,
|
||||
HasDomainParam: hasDomainParam,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user