forked from dmacvicar/terraform-provider-libvirt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request dmacvicar#448 from MalloZup/docsmall
Improve ubuntu example and some contributing doc
- Loading branch information
Showing
12 changed files
with
129 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ script: | |
- make gofmtcheck | ||
- make vet | ||
- golint -set_exit_status libvirt/ | ||
- travis/validate_terraform_files.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,77 @@ | ||
provider "libvirt" { | ||
uri = "qemu:///system" | ||
uri = "qemu:///system" | ||
} | ||
|
||
resource "libvirt_network" "tf" { | ||
name = "tf" | ||
domain = "tf.local" | ||
mode = "nat" | ||
addresses = ["10.0.100.0/24"] | ||
name = "tf" | ||
domain = "tf.local" | ||
mode = "nat" | ||
addresses = ["10.0.100.0/24"] | ||
} | ||
|
||
# raw image from file | ||
resource "libvirt_volume" "debian8-raw" { | ||
name = "debian8-raw" | ||
name = "debian8-raw" | ||
format = "raw" | ||
source = "http://localhost:8000/debian8.img" | ||
} | ||
|
||
# qcow2 image from file | ||
resource "libvirt_volume" "debian8-qcow2" { | ||
name = "debian8-qcow2" | ||
name = "debian8-qcow2" | ||
source = "http://localhost:8000/debian8.qcow2" | ||
} | ||
|
||
# volume with raw backing storage | ||
resource "libvirt_volume" "vol-debian8-raw" { | ||
name = "vol-debian8-raw" | ||
name = "vol-debian8-raw" | ||
base_volume_id = "${libvirt_volume.debian8-raw.id}" | ||
} | ||
|
||
# volume with qcow2 backing storage | ||
resource "libvirt_volume" "vol-debian8-qcow2" { | ||
name = "vol-debian8-qcow2" | ||
name = "vol-debian8-qcow2" | ||
base_volume_id = "${libvirt_volume.debian8-qcow2.id}" | ||
} | ||
|
||
# domain using raw-backed volume | ||
resource "libvirt_domain" "domain-debian8-raw" { | ||
name = "domain-debian8-raw" | ||
name = "domain-debian8-raw" | ||
memory = "256" | ||
vcpu = 1 | ||
vcpu = 1 | ||
|
||
network_interface { | ||
network_name = "tf" | ||
} | ||
|
||
disk { | ||
volume_id = "${libvirt_volume.vol-debian8-raw.id}" | ||
} | ||
|
||
graphics { | ||
type = "spice" | ||
type = "spice" | ||
listen_type = "address" | ||
autoport = true | ||
autoport = true | ||
} | ||
} | ||
|
||
# domain using qcow2-backed volume | ||
resource "libvirt_domain" "domain-debian8-qcow2" { | ||
name = "domain-debian8-qcow2" | ||
name = "domain-debian8-qcow2" | ||
memory = "256" | ||
vcpu = 1 | ||
vcpu = 1 | ||
|
||
network_interface { | ||
network_name = "tf" | ||
} | ||
|
||
disk { | ||
volume_id = "${libvirt_volume.vol-debian8-qcow2.id}" | ||
} | ||
|
||
graphics { | ||
type = "spice" | ||
type = "spice" | ||
listen_type = "address" | ||
autoport = true | ||
autoport = true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.