add SkipRefresh to the terraform context
This commit is contained in:
parent
c2566bff7b
commit
eebb4dfcb2
|
@ -54,6 +54,7 @@ type ContextOpts struct {
|
||||||
Variables InputValues
|
Variables InputValues
|
||||||
Meta *ContextMeta
|
Meta *ContextMeta
|
||||||
Destroy bool
|
Destroy bool
|
||||||
|
SkipRefresh bool
|
||||||
|
|
||||||
Hooks []Hook
|
Hooks []Hook
|
||||||
Parallelism int
|
Parallelism int
|
||||||
|
@ -97,6 +98,7 @@ type Context struct {
|
||||||
changes *plans.Changes
|
changes *plans.Changes
|
||||||
state *states.State
|
state *states.State
|
||||||
refreshState *states.State
|
refreshState *states.State
|
||||||
|
skipRefresh bool
|
||||||
targets []addrs.Targetable
|
targets []addrs.Targetable
|
||||||
variables InputValues
|
variables InputValues
|
||||||
meta *ContextMeta
|
meta *ContextMeta
|
||||||
|
@ -233,6 +235,7 @@ func NewContext(opts *ContextOpts) (*Context, tfdiags.Diagnostics) {
|
||||||
config: config,
|
config: config,
|
||||||
state: state,
|
state: state,
|
||||||
refreshState: state.DeepCopy(),
|
refreshState: state.DeepCopy(),
|
||||||
|
skipRefresh: opts.SkipRefresh,
|
||||||
targets: opts.Targets,
|
targets: opts.Targets,
|
||||||
uiInput: opts.UIInput,
|
uiInput: opts.UIInput,
|
||||||
variables: variables,
|
variables: variables,
|
||||||
|
@ -299,6 +302,7 @@ func (c *Context) Graph(typ GraphType, opts *ContextGraphOpts) (*Graph, tfdiags.
|
||||||
Schemas: c.schemas,
|
Schemas: c.schemas,
|
||||||
Targets: c.targets,
|
Targets: c.targets,
|
||||||
Validate: opts.Validate,
|
Validate: opts.Validate,
|
||||||
|
skipRefresh: c.skipRefresh,
|
||||||
}).Build(addrs.RootModuleInstance)
|
}).Build(addrs.RootModuleInstance)
|
||||||
|
|
||||||
case GraphTypePlanDestroy:
|
case GraphTypePlanDestroy:
|
||||||
|
|
Loading…
Reference in New Issue