Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provider/azurerm: Fixed function name #71

Merged
merged 1 commit into from
Nov 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions provider/azurerm/azurerm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion provider/azurerm/azurerm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down