diff --git a/CHANGELOG.md b/CHANGELOG.md index f3c5e60..4248363 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,11 @@ - `tfdocs` version upgraded ([PR #69](https://github.com/cycloidio/inframap/pull/69)) +### Fixed + +- Azure not generating a correct tfstate due to renamed method + ([PR #71](https://github.com/cycloidio/inframap/pull/71)) + ## [0.3.3] _2020-10-22_ ### Changed diff --git a/provider/azurerm/azurerm.go b/provider/azurerm/azurerm.go index 59af847..3752b23 100644 --- a/provider/azurerm/azurerm.go +++ b/provider/azurerm/azurerm.go @@ -48,8 +48,8 @@ func (a Provider) DataSource(resource string) (*resource.Resource, error) { return r, nil } -// ResourceInOut returns the Ins and Outs of the rs based on the cfg -func (a Provider) ResourceInOut(id, rs string, cfgs map[string]map[string]interface{}) ([]string, []string) { +// ResourceInOutNodes returns the In, Out and Nodes of the rs based on the cfg +func (a Provider) ResourceInOutNodes(id, rs string, cfgs map[string]map[string]interface{}) ([]string, []string, []string) { var ins, outs []string cfg := cfgs[id] switch rs { @@ -64,7 +64,7 @@ func (a Provider) ResourceInOut(id, rs string, cfgs map[string]map[string]interf rvni := cfg["remote_virtual_network_id"] outs = append(outs, rvni.(string)) } - return ins, outs + return ins, outs, nil } // getRsIDByName ranges over all resources, looking for a same name as provided. diff --git a/provider/azurerm/azurerm_test.go b/provider/azurerm/azurerm_test.go index aee4daf..84a4a8e 100644 --- a/provider/azurerm/azurerm_test.go +++ b/provider/azurerm/azurerm_test.go @@ -23,7 +23,7 @@ func TestResourceInOut(t *testing.T) { }, } - ins, outs := aws.ResourceInOut(id, rs, cfg) + ins, outs, _ := aws.ResourceInOutNodes(id, rs, cfg) assert.Equal(t, []string{"src_v_network"}, ins) assert.Equal(t, []string{"remote_v_network"}, outs) })