Giter VIP home page Giter VIP logo

hashicorp / terraform-provider-softlayer Goto Github PK

View Code? Open in Web Editor NEW
1.0 10.0 7.0 1.84 MB

Terraform SoftLayer provider. Please note: This Terraform provider is archived per our provider archiving process: https://terraform.io/docs/internals/archiving.html

Home Page: https://www.terraform.io/docs/providers/softlayer/

License: Mozilla Public License 2.0

Makefile 4.56% Go 87.40% Shell 5.53% HTML 2.52%
terraform terraform-provider softlayer

terraform-provider-softlayer's Introduction

Please note: This Terraform provider is archived, per our provider archiving process. What does this mean?

  1. The code repository and all commit history will still be available.
  2. Existing released binaries will remain available on the releases site.
  3. Issues and pull requests are not being monitored.
  4. New releases will not be published.

If anyone from the community or an interested third party is willing to maintain it, they can fork the repository and publish it to the Terraform Registry. If you are interested in maintaining this provider, please reach out to the Terraform Provider Development Program at [email protected].


Note: The SoftLayer provider is deprecated and not under active development. It will not work with many IBM Cloud resources and is not compatible with the new IBM Cloud APIs.

Terraform Provider

Requirements

  • Terraform 0.10.x
  • Go 1.8 (to build the provider plugin)

Building The Provider

Clone repository to: $GOPATH/src/github.com/terraform-providers/terraform-provider-softlayer

$ mkdir -p $GOPATH/src/github.com/terraform-providers; cd $GOPATH/src/github.com/terraform-providers
$ git clone [email protected]:terraform-providers/terraform-provider-softlayer

Enter the provider directory and build the provider

$ cd $GOPATH/src/github.com/terraform-providers/terraform-provider-softlayer
$ make build

Using the provider

Fill in for each provider

Developing the Provider

If you wish to work on the provider, you'll first need Go installed on your machine (version 1.8+ is required). You'll also need to correctly setup a GOPATH, as well as adding $GOPATH/bin to your $PATH.

To compile the provider, run make build. This will build the provider and put the provider binary in the $GOPATH/bin directory.

$ make bin
...
$ $GOPATH/bin/terraform-provider-softlayer
...

In order to test the provider, you can simply run make test.

$ make test

In order to run the full suite of Acceptance tests, run make testacc.

Note: Acceptance tests create real resources, and often cost money to run.

$ make testacc

terraform-provider-softlayer's People

Contributors

aicarmic avatar cgriggs01 avatar gechr avatar grubernaut avatar jamtur01 avatar katbyte avatar kavu avatar radeksimko avatar randomcamel avatar stack72 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

terraform-provider-softlayer's Issues

This provider is scheduled to be archived on September 27th, 2018.

This Terraform provider is scheduled to be archived on September 27th, 2018. HashiCorp may archive providers when they have insufficient activity to maintain them at a level consistent with our open source guidelines and community expectations.

What does archiving mean?

  1. The code repository and all commit, issue, and PR history will still be available.
  2. Existing released binaries will remain available on the releases site and available to terraform init.
  3. Documentation for the provider will remain on the Terraform website.
  4. Issues and pull requests are not being monitored, merged, or added.
  5. No new releases will be published.
  6. Nightly acceptance tests may not be run.

If anyone from the community is willing to maintain this provider, please reach out to the Terraform Provider Development Program at [email protected].

Adding disks in SoftLayer not working

This issue was originally opened by @pat610 as hashicorp/terraform#9084. It was migrated here as part of the provider split. The original body of the issue is below.


I've been trying to add disks to a vm with terraform. Terraform gives a success message but the disks never show in my vm.

Terraform Version

Terraform v0.7.3

Terraform Configuration Files

resource "softlayer_virtual_guest" "terraform-test-pat4" {
    name = "terraform-test-pat4"
    domain = "somedomain.com"
    region = "tor01"
    public_network_speed = 100
    hourly_billing = true
    private_network_only = false
    cpu = 8
    ram = 16384
    dedicated_acct_host_only = false
    local_disk = false
    disks = [100, 500, 1000]
    block_device_template_group_gid = "4b36e2f4-02f7-4830-8dd2-c37988c76783"
}

Expected Behavior

New disks added to VM

Actual Behavior

terraform apply
softlayer_virtual_guest.terraform-test-pat4: Refreshing state... (ID: 24546589)
softlayer_virtual_guest.terraform-test-pat4: Modifying...
disks.#: "0" => "3"
disks.0: "" => "100"
disks.1: "" => "500"
disks.2: "" => "1000"
softlayer_virtual_guest.terraform-test-pat4: Still modifying... (10s elapsed)
softlayer_virtual_guest.terraform-test-pat4: Modifications complete

Apply complete! Resources: 0 added, 1 changed, 0 destroyed.

This message shows success but when lsblk I don't see my new drives.

[root@terraform-test-pat5 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 100G 0 disk
├─xvda1 202:1 0 815.8M 0 part /boot
├─xvda2 202:2 0 41.8G 0 part /
├─xvda3 202:3 0 28.3G 0 part /var/log
└─xvda4 202:4 0 23.4G 0 part /store/tmp
xvdb 202:16 0 2G 0 disk
└─xvdb1 202:17 0 2G 0 part

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Private Custom Image with SoftLayer not working

This issue was originally opened by @pat610 as hashicorp/terraform#8734. It was migrated here as part of the provider split. The original body of the issue is below.


I've used the SoftLayer API to get the globalIdentifier of one of my private custom images. However, when I specify that image and run terraform apply I get an error:

softlayer_virtual_guest.terraform-sample-BDTGroup: Creating...
backend_vlan_id: "" => "559104"
cpu: "" => "8"
dedicated_acct_host_only: "" => "false"
disks.#: "" => "1"
disks.0: "" => "100"
domain: "" => "somedomain.com"
frontend_vlan_id: "" => "559102"
hourly_billing: "" => "true"
image: "" => "4b36e2f4-02f7-4830-8dd2-c37988c76783"
ipv4_address: "" => ""
ipv4_address_private: "" => ""
local_disk: "" => "false"
name: "" => "terraform-vm"
private_network_only: "" => "false"
public_network_speed: "" => "1000"
ram: "" => "32768"
region: "" => "tor01"
Error applying plan:

1 error(s) occurred:

  • softlayer_virtual_guest.terraform-sample-BDTGroup: Error creating virtual guest: softlayer-go: could not SoftLayer_Virtual_Guest#createObject, HTTP error code: '500'

Terraform Version

Terraform v0.7.3

Terraform Configuration Files

resource "softlayer_virtual_guest" "terraform-sample-BDTGroup" {
    name = "terraform-vm"
    domain = "somedomain.com"
    image = "4b36e2f4-02f7-4830-8dd2-c37988c76783"
    region = "tor01"
    public_network_speed = 1000
    hourly_billing = true
    private_network_only = false
    cpu = 8
    ram = 32768
    disks = [100]
    dedicated_acct_host_only = false
    local_disk = false
    frontend_vlan_id = 559102
    backend_vlan_id = 559104    
}

Expected Behavior

Get a VM with my custom image

Actual Behavior

Error applying plan:

1 error(s) occurred:

  • softlayer_virtual_guest.terraform-sample-BDTGroup: Error creating virtual guest: softlayer-go: could not SoftLayer_Virtual_Guest#createObject, HTTP error code: '500'

Steps to Reproduce

  1. terraform apply

SoftLayer provider is grossly outdated. Behind by about 22 resources and tons of fixes.

This issue was originally opened by @renier as hashicorp/terraform#10207. It was migrated here as part of the provider split. The original body of the issue is below.


I'm one of the members of the team that got the SoftLayer provider into the Terraform tree.

After some attempts to continue updating the provider and months of waiting, we decided to create an out of the tree external provider to make it easy for users to install binaries of an updated provider.

Currently the internal SoftLayer provider only has 2 resources: SSH Key and Virtual Guest. Enough to do simple things. On the external provider, terraform-provider-softlayer, we are already up to 24 resources.

So the difference between the internal and external providers is pretty large by now. The external one even uses a different SoftLayer client under the covers. This is starting to confuse users who find the internal provider first and struggle through issues that have already been fixed in the external provider.

So it's clear that we need to get the internal provider updated. I would like to ask, after some failed attempts as referenced above, what should our strategy be here? Appreciate your advice.

Issue while creating basics resources with terraform

Hello Team,

I an finding the following error while trying to create a simple resource against softlayer provider.

* softlayer_ssh_key.ssh_sl_key: Error creating SSH Key: softlayer-go: could not SoftLayer_Security_Ssh_Key#createObject, HTTP error code: '401'

Terraform Version

Terraform v0.11.7

Affected Resource(s)

Please list the resources as a list, for example:

  • softlayer_ssh_key

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

provider "softlayer" {}

resource "softlayer_ssh_key" "ssh_sl_key" {
  name       = "ssh_sl_key"
  public_key = "XXX"
}

resource "softlayer_virtual_guest" "my_server" {
  name                 = "my_server_1"
  domain               = "example.com"
  ssh_keys             = ["${softlayer_ssh_key.ssh_sl_key.id}"]
  image                = "DEBIAN_7_64"
  region               = "ams01"
  public_network_speed = 10
  cpu                  = 1
  ram                  = 1024
  hourly_billing       = false
  local_disk           = false
}

Debug Output

Error: Error applying plan:

1 error(s) occurred:

* softlayer_ssh_key.ssh_sl_key: 1 error(s) occurred:

* softlayer_ssh_key.ssh_sl_key: Error creating SSH Key: softlayer-go: could not SoftLayer_Security_Ssh_Key#createObject, HTTP error code: '401'

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

Make SoftLayer provider's timeouts configurable

This issue was originally opened by @bondyk as hashicorp/terraform#9113. It was migrated here as part of the provider split. The original body of the issue is below.


Hi,

Terraform doesn't have a possibility to configure timeout for SoftLayer provider. In case if SoftLayer takes more than 10 minutes to create a new virtual guest than terraform exits with timeout error.
It would be great to be able to configure timeout values.
Currently timeout values are hard coded here: https://github.com/hashicorp/terraform/blob/master/builtin/providers/softlayer/resource_softlayer_virtual_guest.go (WaitForUpgradeTransactionsToAppear, WaitForPublicIpAvailable, WaitForNoActiveTransactions)

Terraform Version

Terraform v0.7.4

Affected Resource(s)

  • softlayer_virtual_guest

Debug Output

softlayer_virtual_guest.tor01-dev-ybt-vm-3178-sa: Still creating... (9m50s elapsed)
softlayer_virtual_guest.tor01-dev-ybt-vm-3178-sa: Still creating... (10m0s elapsed)
Error applying plan:

1 error(s) occurred:

softlayer_virtual_guest.tor01-dev-ybt-vm-3178-sa: Error waiting for virtual machine (24570963) to become ready: timeout while waiting for state to become 'idle' (last state: 'active', timeout: 10m0s)

Expected Behavior

It should be possible to configure timeouts for SoftLayer provider:

  • to wait for no active transactions
  • to wait for public IP available
  • to wait for upgrade transactions to appear

Actual Behavior

Terraform exits with timeout error if time for waiting active transactions takes more than 10 minutes

Steps to Reproduce

Use SoftLayer provider to create a new virtual guest

References

Terraform prints error 500 instead of showing actual error

This issue was originally opened by @bondyk as hashicorp/terraform#9241. It was migrated here as part of the provider split. The original body of the issue is below.


Hi,

Terraform prints generic error message instead of the actual message from SoftLayer.
In my example underscore char is forbidden to be used in host name. In such case SoftLayer API returns response (code 500) with following payload:

<?xml version="1.0" encoding="iso-8859-1"?>
<methodResponse>
<fault>
 <value>
  <struct>
   <member>
    <name>faultCode</name>
    <value>
     <string>SoftLayer_Exception_Public</string>
    </value>
   </member>
   <member>
    <name>faultString</name>
    <value>
     <string>The hostname and domain must be alphanumeric strings that may be separated by periods '.'.  The only other allowable special character is the dash '-'  However the special characters '.' and '-' may not be consecutive.  Each alphanumeric string separated by a period is considered a label.  Labels must begin and end with an alphanumeric character and must be between 1-63 characters in length.  The last label, the TLD (top level domain) must be between 2-24 alphabetic characters. The TLD label and hostname cannot be solely comprised of digits. The domain portion must consist of least one label followed by a period '.' then ending with the TLD label.  Combining the hostname, followed by a period '.', followed by the domain gives the FQDN (fully qualified domain name), which may not exceed 253 characters in total length.</string>
    </value>
   </member>
  </struct>
 </value>
</fault>
</methodResponse>

If use terraform with the same input data then it prints generic error 500 message.

Terraform Version

v0.7.5-dev

Affected Resource(s)

-softlayer_virtual_guest

Terraform Configuration

resource "softlayer_virtual_guest" "server1" {
    name = "server1_name"
    block_device_template_group_gid = "${var.block_device_template_group_gid}"
    domain = "${var.domain}"
    region = "${var.region}"
    hourly_billing = "${var.hourly_billing}"
    private_network_only = "${var.private_network_only}"
    public_network_speed = "${var.public_network_speed}"
    cpu = "${var.cpu}"
    ram = "${var.ram}"
    local_disk = "${var.local_disk}"
}

Expected Behavior

Terraform should print actual error message instead of showing generic Error 500:

The hostname and domain must be alphanumeric strings that may be separated by periods '.'.  The only other allowable special character is the dash '-'  However the special characters '.' and '-' may not be consecutive.  Each alphanumeric string separated by a period is considered a label.  Labels must begin and end with an alphanumeric character and must be between 1-63 characters in length.  The last label, the TLD (top level domain) must be between 2-24 alphabetic characters. The TLD label and hostname cannot be solely comprised of digits. The domain portion must consist of least one label followed by a period '.' then ending with the TLD label.  Combining the hostname, followed by a period '.', followed by the domain gives the FQDN (fully qualified domain name), which may not exceed 253 characters in total length.

Actual Behavior

Terraform prints Error 500:

Error applying plan:

1 error(s) occurred:

* softlayer_virtual_guest.server1: Error creating virtual guest: softlayer-go: could not SoftLayer_Virtual_Guest#createObject, HTTP error code: '500'

Steps to Reproduce

Run terraform apply with configured SoftLayer provider that has underscore in 'name'

Specifying disk in softlayer causes 500 error

This issue was originally opened by @pat610 as hashicorp/terraform#9083. It was migrated here as part of the provider split. The original body of the issue is below.


I'm installing a custom private image in SoftLayer which fails when I specify my disks. However it works when I leave disks out of the configuration.

softlayer_virtual_guest.terraform-sample-BDTGroup: Creating...
backend_vlan_id: "" => "559104"
cpu: "" => "8"
dedicated_acct_host_only: "" => "false"
disks.#: "" => "1"
disks.0: "" => "100"
domain: "" => "somedomain.com"
frontend_vlan_id: "" => "559102"
hourly_billing: "" => "true"
image: "" => "4b36e2f4-02f7-4830-8dd2-c37988c76783"
ipv4_address: "" => ""
ipv4_address_private: "" => ""
local_disk: "" => "false"
name: "" => "terraform-vm"
private_network_only: "" => "false"
public_network_speed: "" => "1000"
ram: "" => "32768"
region: "" => "tor01"
Error applying plan:

1 error(s) occurred:

softlayer_virtual_guest.terraform-sample-BDTGroup: Error creating virtual guest: softlayer-go: could not SoftLayer_Virtual_Guest#createObject, HTTP error code: '500'

Terraform Version

Terraform v0.7.3

Terraform Configuration Files

resource "softlayer_virtual_guest" "terraform-sample-BDTGroup" {
    name = "terraform-vm"
    domain = "somedomain.com"
    image = "4b36e2f4-02f7-4830-8dd2-c37988c76783"
    region = "tor01"
    public_network_speed = 1000
    hourly_billing = true
    private_network_only = false
    cpu = 8
    ram = 32768
    disks = [100]
    dedicated_acct_host_only = false
    local_disk = false
    frontend_vlan_id = 559102
    backend_vlan_id = 559104    
}

Expected Behavior

Get a VM with my custom image

Actual Behavior

Error applying plan:

1 error(s) occurred:

softlayer_virtual_guest.terraform-sample-BDTGroup: Error creating virtual guest: softlayer-go: could not SoftLayer_Virtual_Guest#createObject, HTTP error code: '500'

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Important Factoids

SoftLayer with a custom image

References

  • GH-8734

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.