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

Added: AzureRM implementation #63

Merged
merged 6 commits into from
Dec 14, 2021
Merged

Added: AzureRM implementation #63

merged 6 commits into from
Dec 14, 2021

Conversation

xescugc
Copy link
Member

@xescugc xescugc commented Dec 7, 2021

Just supporting virtual_machine(linux) and linux_virtual_machine with the size.

Related #3

So we can avoid some configurations that are not standard for what we accept
For now just virtual_machine and linux_virtual_machine
So we can mock the API calls
So it's also part of the standard parsing
@xescugc xescugc self-assigned this Dec 7, 2021
Copy link
Contributor

@xlr-8 xlr-8 left a comment

Choose a reason for hiding this comment

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

Awesome! Minor comments 👍


allProds, err := backend.Products().Filter(ctx, &product.Filter{Provider: util.StringPtr(azurerm.ProviderName), Service: util.StringPtr(azurerm.VirtualMachines.String())})
require.NoError(t, err)
fmt.Println(len(allProds))
Copy link
Contributor

Choose a reason for hiding this comment

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

?

}
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't see any sensitive data, I assume it got cleaned up? Asking just to double check

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes double checked.

Comment on lines 180 to 219
### Extra resources to add if needed!

## 1 - Attach extra storage to the VM
## Please copy the next section of code into a separate .tf file in the config branch of your stack
## NOTE! Check the comments to know more about the available options

# a) Creates an extra volume
#resource "azurerm_managed_disk" "extra" {
# name = "${var.customer}-${var.project}-${var.env}-extra-disk"
# location = var.azure_location
# resource_group_name = module.vm.resource_group_name
# storage_account_type = "Standard_LRS" # Available options: Standard_LRS, StandardSSD_ZRS, Premium_LRS, Premium_ZRS, StandardSSD_LRS or UltraSSD_LRS
# create_option = "Empty" # Available options: "Import", "Empty", "Copy", "FromImage", "Restore"
# ##image_reference_id = ... # (Optional) ID of an existing platform/marketplace disk image to copy when create_option is FromImage
# disk_size_gb = 5 # in Gb
#}
## b) Attaches it to the instance created
#resource "azurerm_virtual_machine_data_disk_attachment" "vm_attach" {
# managed_disk_id = azurerm_managed_disk.extra.id
# virtual_machine_id = azurerm_virtual_machine.example.id
# lun = "10" # (Required) - The Logical Unit Number of the Data Disk, which needs to be unique within the Virtual Machine.
# caching = "ReadWrite" # Available options: "None", "ReadOnly" and "ReadWrite"
#}

## 2 - Add more network security rules
## Please copy the next section of code into a separate .tf file in the config branch of your stack
## NOTE! Check the comments to know more about the available options
#resource "azurerm_network_security_rule" "extra_rule" {
# name = "extra_rule"
# priority = 100 # Value : [100-4096]
# direction = "Outbound"
# access = "Allow"
# protocol = "Tcp" # Possible values: "Tcp", "Udp", "Icmp", "Esp", "Ah" or "*"
# source_port_range = "*"
# destination_port_range = "*"
# source_address_prefix = "*"
# destination_address_prefix = "*"
# resource_group_name = module.vm.resource_group_name
# network_security_group_name = module.vm.network_security_group_name
#}
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like it can be removed

@xescugc
Copy link
Member Author

xescugc commented Dec 13, 2021

Done :)

xlr-8
xlr-8 previously approved these changes Dec 14, 2021
Copy link
Contributor

@xlr-8 xlr-8 left a comment

Choose a reason for hiding this comment

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

RS

Also fixed some google things and added the testdata  from AZ
@xescugc
Copy link
Member Author

xescugc commented Dec 14, 2021

Done

@xescugc xescugc merged commit 6557f47 into master Dec 14, 2021
@xescugc xescugc deleted the fg-3 branch December 14, 2021 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants