Skip to content

Commit

Permalink
Merge pull request #71 from cycloidio/fg-azure-random
Browse files Browse the repository at this point in the history
provider/azurerm: Fixed function name
  • Loading branch information
xescugc committed Nov 24, 2020
2 parents e181532 + 034e9ce commit 1874a9e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
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

0 comments on commit 1874a9e

Please sign in to comment.