Skip to content
This repository has been archived by the owner on Apr 7, 2023. It is now read-only.

runtastic/terraform-provider-opennebula

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-provider-opennebula

⚠️ Deprecation Notice: This repository is no longer maintained. Please use the official OpenNebula Terraform provider for the updated and actively maintained version.


OpenNebula provider for Terraform.

The provider tries to impose a lightweight level of abstraction on OpenNebula's resources. This means that only the most fundamental attributes are directly accessible (i.e. names, IDs, permissions and user/group identities). For maximum flexibility and portability, the remaining attributes can be specified using any of the formats natively accepted by OpenNebula (XML and String).

EXAMPLE

Create a file called demo_template.txt.

Notice how we need to escape native variables $$USER[SSH_PUBLIC_KEY] with two dollar signs, as terraform will try to replace all variables with a single dollar sign)

CUSTOM_ATTRIBUTE = "${CUSTOM_ATTRIBUTE_VALUE}"
CONTEXT = [
  DNS_HOSTNAME = "yes",
  NETWORK = "YES",
  SSH_PUBLIC_KEY = "$$USER[SSH_PUBLIC_KEY]",
  USERNAME = "root" ]
CPU = "0.5"
VCPU = "4"
MEMORY = "3000"
GRAPHICS = [
  KEYMAP = "en",
  LISTEN = "0.0.0.0",
  TYPE = "VNC" ]

And the following terraform.tf file:

provider "opennebula" {
  endpoint = "api's endpoint"
  username = "user's name"
  password = "user's password"
}

data "template_file" "demo" {
  template = "${file("demo_template.txt")}"
  vars = {
    CUSTOM_ATTRIBUTE_VALUE = "demo-me"
  }
}

resource "opennebula_template" "demo" {
  name = "terraform-demo"
  description = "${data.template_file.demo.rendered}"
  permissions = "600"
}

output "demo_template_id" {
  value = "${opennebula_template.demo.id}"
}

output "demo_template_uname" {
  value = "${opennebula_template.demo.uname}"
}

ROADMAP

The following list represent's all of OpenNebula's resources reachable through their API. The checked items are the ones that are fully functional and tested:

Collaborators

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/runtastic/terraform-provider-opennebula. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Check out our career page if you'd like to work with us.

License

The gem is available as open source under the terms of the MIT License.

About

Terraform OpenNebula Provider

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages