From 2b84d6c5771b8b2b03b27df44a121fcaf432d416 Mon Sep 17 00:00:00 2001 From: Duncan Mac-Vicar P Date: Sun, 28 Feb 2016 01:35:56 +0100 Subject: update README --- README.md | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index fa1a33f1..d38b89d0 100644 --- a/README.md +++ b/README.md @@ -31,10 +31,28 @@ Here is an example that will setup the following: (create this as libvirt.tf and run terraform commands from this directory): ```hcl provider "libvirt" { - uri = "" + uri = "qemu:///system" } ``` +You can also set the URI in the LIBVIRT_DEFAULT_URI environment variable. + +Now, define a libvirt domain: + +```hcl +resource "libvirt_domain" "terraform_test" { + name = "terraform_test" +} +``` + +Now you can see the plan, apply it, and then destroy the infrastructure: + +```console +$ terraform plan +$ terraform apply +$ terraform destroy +``` + ## Building from source 1. [Install Go](https://golang.org/doc/install) on your machine @@ -50,10 +68,22 @@ provider "libvirt" { 2. terraform plan 3. terraform apply +## Running acceptance tests + +You need to define the LIBVIRT_DEFAULT_URI and TF_ACC variables: + +```console +export LIBVIRT_DEFAULT_URI=qemu:///system +export TF_ACC=1 +go test ./... +``` + ## Author * Duncan Mac-Vicar P. +The structure and boilerplate is inspired from the [Softlayer](https://github.com/finn-no/terraform-provider-softlayer) and [Google](https://github.com/hashicorp/terraform/tree/master/builtin/providers/google) Terraform provider sources. + ## License -* Apache 2.0, See LICENSE file \ No newline at end of file +* Apache 2.0, See LICENSE file -- cgit v1.2.3