Skip to content

Commit a277df7

Browse files
Peter PouliotPeter Pouliot
authored andcommitted
updating README
1 parent 50b1241 commit a277df7

File tree

1 file changed

+1
-34
lines changed

1 file changed

+1
-34
lines changed

README.md

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -40,40 +40,7 @@ tenant_id = "87654321-dcba-4321-dcba-ba0987654321"
4040
```
4141
### Using as a Module
4242

43-
This can also be used as a terraform module. The following is example code for module usage supplying a custom cloud-init template:
44-
45-
```
46-
variable "subscription_id" {}
47-
variable "tenant_id" {}
48-
49-
locals {
50-
cloud_init_template_path = "${path.cwd}/cloud-init.yaml.tpl"
51-
}
52-
53-
module "azure-ampere-vm" {
54-
source = "github.com/amperecomputing/terraform-azure-ampere-vm"
55-
subscription_id = var.subscription_id
56-
tenant_id = var.tenant_id
57-
# Optional
58-
# resource_group = var.resource_group
59-
# rg_prefix = var.rg_prefix
60-
# virtual_network_name = var.virtual_network_name
61-
# address_space = var.address_space
62-
# subnet_prefix = var.subnet_prefix
63-
# vm_size = var.vm_size
64-
location = "westus2"
65-
azure_vm_count = 1
66-
azure_os_image = "ubuntu2004"
67-
instance_prefix = "azure-ampere-vm-ubuntu-2004"
68-
cloud_init_template_file = local.cloud_init_template_path
69-
}
70-
output "azure_ampere_vm_private_ips" {
71-
value = module.azure-ampere-vm.azure_ampere_vm_private_ipaddresses
72-
}
73-
output "azure_ampere_vm_public_ips" {
74-
value = module.azure-ampere-vm.azure_ampere_vm_public_ipaddresses
75-
}
76-
```
43+
This can also be used as a terraform module. The [examples](examples) directory contains example code for module usage showing different operating systems booting with a custom cloud-init templates. Doing a clone of this repository and changing directory to one of the examples, placing a terraform.tfvars into that directory, and running a typical terrafornm workflow will produce a working virtual machine in the os that was specified in the main.tf that is located within the chosen example directory.
7744

7845
### Running Terraform
7946

0 commit comments

Comments
 (0)