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

Azure support #40

Merged
merged 7 commits into from
Aug 10, 2020
Merged

Azure support #40

merged 7 commits into from
Aug 10, 2020

Conversation

kerak19
Copy link
Contributor

@kerak19 kerak19 commented Aug 6, 2020

Added support for Azure:

  • icons
  • logic (for connections between VNets)
  • test
  • example tfstate
  • example tf

Closes #8

@kerak19 kerak19 self-assigned this Aug 6, 2020
Copy link
Member

@xescugc xescugc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, did you run go run scripts/assets/main.go --dry ? I see a lot of extra images that we do not want.

@@ -0,0 +1,673 @@
{
"version": 4,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not pruned

@@ -5,6 +5,7 @@
"lineage": "65f8a469-c021-ee9d-a634-45cdf74dff6b",
"outputs": {
"tls_private_key": {
"value": "-----",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?


var (
usedAttributes = []string{
"azurerm_virtual_network_peering",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think not, this should be attributes not resources, so basically it is virtual_network_name remote_virtual_network_id, id and name for what I see.

@kerak19
Copy link
Contributor Author

kerak19 commented Aug 10, 2020

Done.

I'm sorry about rebase, but I've done something wrong and had to.

Copy link
Member

@xescugc xescugc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Changelog is missing

kerak19 pushed a commit that referenced this pull request Aug 10, 2020
@kerak19
Copy link
Contributor Author

kerak19 commented Aug 10, 2020

Added

Copy link
Member

@xescugc xescugc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to link on the Changelog #8

CHANGELOG.md Outdated
Comment on lines 7 to 8
- Azure support
([PR #40](https://github.com/cycloidio/inframap/pull/40))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#8

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, modified the PR link to issue link

kerak19 pushed a commit that referenced this pull request Aug 10, 2020
@kerak19
Copy link
Contributor Author

kerak19 commented Aug 10, 2020

Done. Will have to modify the commit message during rebase

kerak19 pushed a commit that referenced this pull request Aug 10, 2020
Copy link
Member

@xescugc xescugc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rs

@kerak19
Copy link
Contributor Author

kerak19 commented Aug 10, 2020

Done

Comment on lines +52 to +68
func (a Provider) ResourceInOut(id, rs string, cfgs map[string]map[string]interface{}) ([]string, []string) {
var ins, outs []string
cfg := cfgs[id]
switch rs {
case "azurerm_virtual_network_peering":
vnn := cfg["virtual_network_name"]
vnID, ok := getRsIDByName(cfgs, vnn)
if !ok {
break
}
ins = append(ins, vnID)

rvni := cfg["remote_virtual_network_id"]
outs = append(outs, rvni.(string))
}
return ins, outs
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have test for ths on the other providers

@kerak19
Copy link
Contributor Author

kerak19 commented Aug 10, 2020

Done

Copy link
Member

@xescugc xescugc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RS

@kerak19
Copy link
Contributor Author

kerak19 commented Aug 10, 2020

Done

@kerak19 kerak19 merged commit e604e75 into master Aug 10, 2020
@kerak19 kerak19 deleted the lo-iv branch August 10, 2020 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "azurerm" provider
2 participants