terraform-provider-feilong

command module
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

README

Terraform Feilong Provider

This terraform provider enables to deploy s390 virtual machines on z/VM via Feilong.

NOTE: this is the branch for terraform 1.0.10 and upper (protocol version 6). The code for terraform 0.13.4 (protocol version 5) is in terraform-protocol-5 branch.

Requirements

Building The Provider

  1. Clone the repository
  2. Enter the repository directory
  3. Build the provider using the Go install command:
go install

The provider will be installed into $GOPATH/bin.

The Feilong provider is in HashiCorp's registry. To bypass the registry, you can do one of these:

Create a system-wide symbolic link:

# mkdir -p /usr/share/terraform/plugins/registry.terraform.io/bischoff/feilong/0.0.6/linux_amd64/
# cd /usr/share/terraform/plugins/registry.terraform.io/bischoff/feilong/0.0.6/linux_amd64/
# ln -s <GOPATH>/bin/terraform-provider-feilong

Or define this override in the .terraformrc file in your home directory:

provider_installation {

  dev_overrides {
      "registry.terraform.io/bischoff/feilong" = "<GOPATH>/bin/"
  }

  direct {}
}

Replace <GOPATH> with the value of your $GOPATH environment variable.

Using the Provider

In your main.tf file, use:

terraform {
  required_version = ">= 1.0.10"
  required_providers {
    feilong = {
      source = "bischoff/feilong"
      version = "0.0.6"
    }
  }
}

provider "feilong" {
  connector = "http://1.2.3.4"     // URL of your z/VM cloud connector
                                   // (i.e. the VM where Feilong runs)
}

resource "feilong_guest" "opensuse" {
  name   = "leap"                  // arbitrary name for the resource
  memory = "2G"                    // memory size
  disk   = "20G"                   // disk size of first disk
  image  = "opensuse155"           // image

  // optional parameters:
  userid = "LINUX097"              // name for z/VM
  vcpus  = 2                       // virtual CPUs count
  mac    = "12:34:56:78:9a:bc"     // MAC address of first interface
                                   // (first 3 bytes may be changed by Feilong)
}

Then use Terraform commands:

$ terraform init
$ terraform apply
(use the VMs)
$ terraform destroy

For more details, refer to the documentation.

License

Apache 2.0, See LICENSE file

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL