From 70cee9c1c634a1a2518b8c733f2e704c483d1be3 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 12 Oct 2016 19:03:41 +0800 Subject: [PATCH] terraform: clean up any final TODOs with comments and placeholders --- terraform/shadow_context.go | 8 +++++++- terraform/shadow_resource_provider.go | 8 +------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/terraform/shadow_context.go b/terraform/shadow_context.go index 1a289793b..fdadea370 100644 --- a/terraform/shadow_context.go +++ b/terraform/shadow_context.go @@ -48,9 +48,15 @@ func newShadowContext(c *Context) (*Context, *Context, Shadow) { module: c.module, state: c.state.DeepCopy(), targets: targetRaw.([]string), - uiInput: nil, // TODO variables: varRaw.(map[string]interface{}), + // NOTE(mitchellh): This is not going to work for shadows that are + // testing that input results in the proper end state. At the time + // of writing, input is not used in any state-changing graph + // walks anyways, so this checks nothing. We set it to this to avoid + // any panics but even a "nil" value worked here. + uiInput: new(MockUIInput), + // Hardcoded to 4 since parallelism in the shadow doesn't matter // a ton since we're doing far less compared to the real side // and our operations are MUCH faster. diff --git a/terraform/shadow_resource_provider.go b/terraform/shadow_resource_provider.go index 967817597..4d7643438 100644 --- a/terraform/shadow_resource_provider.go +++ b/terraform/shadow_resource_provider.go @@ -738,14 +738,8 @@ func (p *shadowResourceProviderShadow) ReadDataApply( return result.Result, result.ResultErr } -// TODO -// TODO -// TODO -// TODO -// TODO - func (p *shadowResourceProviderShadow) ImportState(info *InstanceInfo, id string) ([]*InstanceState, error) { - return nil, nil + panic("import not supported by shadow graph") } // The structs for the various function calls are put below. These structs