Commit Graph

429 Commits

Author SHA1 Message Date
Joe Topjian 42ff9103b7 provider/openstack: Adding Timeouts to FWaaS v1 Resources (#12863) 2017-03-19 17:09:22 +00:00
Joe Topjian e37b26a3fa provider/openstack: Adding Timeouts to Blockstorage Resources (#12862) 2017-03-19 17:07:26 +00:00
Joe Topjian f54b0a88a7 provider/openstack: Add timeout support for Compute resources (#12794)
This commit adds support for specifying timeout values for the
openstack_compute_* family of resources.
2017-03-17 16:08:02 +00:00
Joe Topjian 9683f705f7 provider/openstack: Force Deletion of Instances (#12689)
This commit adds the `force_delete` argument, enabling instances
to be forcefully deleted.
2017-03-14 18:26:59 +02:00
Karol Stępniewski 1fef190b68 Check for ErrDefault500 when creating/deleting pool member (#12664)
If LBaaSV2 member creation/deletion is attempted while LB resource is
busy (for example it's in PENDING_UPDATE state), Neutron will return 500
error. Currently This being caught by type assertion to
ErrUnexpectedResponseCode, however error 500 has a dedicated type
ErrDefault500, which makes the current type assertion to miss it and
eventually the error slips out through the check. This patch
changes the type assertion to explicitly check for ErrDefault500.

Also similar check has been added when member is deleted.
2017-03-14 12:45:43 +02:00
Joe Topjian aa4676e622 provider/openstack: Add network_id to Network data source (#12615)
This commit adds the ability to search for a network by its ID. This
is useful for doing ID-to-name translations.
2017-03-12 18:39:25 +02:00
Joe Topjian 20c88bcdf4 provider/openstack: Change Port fixed_ip to a Set (#12613)
This commit changes the openstack_networking_port_v2 fixed_ip
parameter from a List to a Set. This is because OpenStack does not
preserve the original ordering of the fixed IPs.
2017-03-12 16:00:47 +02:00
Joe Topjian f4e74650f0 provider/openstack: Set Availability Zone in Instances (#12610)
* provider/openstack: Set Availability Zone in Instances

This commit configures the openstack_compute_instance_v2 resource
to set the Availability Zone of the instance resource.

* vendor: Updating Gophercloud for OpenStack
2017-03-12 15:59:50 +02:00
yanndegat 09b1f4e1be provider/openstack: Add openstack_networking_network_v2 datasource (#12304) 2017-03-06 13:25:08 +02:00
Joe Topjian 120e3af178 provider/openstack: Toggle Creation of Default Security Group Rules (#12119)
This commit modifies the behavior implemented in #9799 by enabling
the user to be able to toggle the creation of the default security
group rules.
2017-03-05 16:18:00 +02:00
Joe Topjian 4ba145a3ac provider/openstack: Handle cases where volumes are disabled (#12374)
This commit handles the case where the volume API extensions are
disabled.
2017-03-05 15:53:09 +02:00
Joe Topjian 959c197dc3 provider/openstack: rename image data source files (#12439) 2017-03-04 20:24:19 +02:00
Joe Topjian 1ab3750085 provider/openstack: Redesign openstack_blockstorage_volume_attach_v2 (#12071)
* provider/openstack: Redesign openstack_blockstorage_volume_attach_v2

The current design of openstack_blockstorage_volume_attach_v2 does
not correctly implement the Block Storage API attachment call. It
was only partially implemented, only marking volumes as being
attached, while never actually attaching them.

This redesign is a closer alignment to how creating attachments
to a standalone Block Storage service works.

For creating attachments specifically in the case of OpenStack
Compute instances, the openstack_compute_volume_attach_v2 resource
is required.

* provider/openstack: re-adding instance_id for backwards compatibility
2017-03-02 05:20:56 +00:00
Joe Topjian 1dba855daf provider/openstack: openstack_compute_floatingip_associate_v2 resource (#12190)
This commit adds the openstack_compute_floatingip_associate_v2
resource which specifically handles associating a floating IP
address to an instance. This can be used instead of the existing
floating_ip options in the openstack_compute_instance_v2 resource.
2017-03-02 05:18:57 +00:00
Joe Topjian 85de5f1e04 provider/openstack: Rename provider to loadbalancer_provider (#12239)
* provider/openstack: Rename provider to loadbalancer_provider

This commit renames provider to loadbalancer_provider in the
openstack_lb_loadbalancer_v2 resource.

It also changes security_group_ids to Computed so default
security groups are added to the state correctly.

* provider/openstack: Switch to a deprecation path for loadbalancer provider

This commit switches to using a deprecation path for removal of the
previous "provider" argument in favor of the new "loadbalancer_provider".
2017-02-28 16:06:49 +00:00
Joe Topjian 5a514f22f7 provider/openstack: Add Additional Targets for LBaaS v1 Member (#12266)
This commit adds CREATED and DOWN as additional valid targets
for creating LBaaS v1 members.
2017-02-27 10:32:16 +00:00
Joe Topjian 9d3606c1b2 provider/openstack: Update Development Documentation (#12265)
This commit removes the bundled devstack script and updates the
documentation to point to the latest build scripts used for
testing. It also mentions that development should be possible on
any OpenStack environment.
2017-02-27 10:27:55 +00:00
Joe Topjian 8ea8588c52 provider/openstack: Image Data Source (#12097)
* vendor: Updating Gophercloud

* provider/openstack: Image Data Source

This commit adds the openstack_images_image_v2 data source which
is able to query the Image Service v2 API for a specific image.
2017-02-20 19:03:17 +02:00
Joe Topjian 1b5694b7f4 provider/openstack: Enable HTTP Logging (#12089)
This commit adds the ability to log all requests and responses
between Terraform and the OpenStack cloud. To enable, set the
OS_DEBUG environment variable to 1.
2017-02-20 14:36:05 +02:00
Joe Topjian 6d4fc8d21a provider/openstack: Don't allow floating IP and port (#12099)
This commit adds a check to prevent a user from specifying both
a floating IP and a port on a specific network. While this
configuration is currently allowed, the Port will be chosen and
applying the configuration again will show a state mismatch. This
attempts to prevent such a misconfiguration.
2017-02-20 14:32:28 +02:00
Joe Topjian 9188a80192 provider/openstack: Updates to openstack_images_image_v2 resource
This commit has a few more fixes to the recently added
openstack_images_image_v2 resource:

* tags were changed to a Set because the OpenStack Image API does
not seem to respect ordering.
* The visibility argument was fixed.
* Acceptance tests for all updatable fields has been implemented.
* Documentation updates, including a new entry in the sidebar.
2017-02-19 21:20:29 +00:00
Joe Topjian 96d2ac21d4 provider/openstack: Fix Creation of Empty Tags
This commit fixes a bug where images would be created with empty tags.
Acceptance tests were also tidied up.
2017-02-19 18:44:42 +00:00
Joe Topjian b3b9247ad0 Merge pull request #11942 from yanndegat/master
Add resource_openstack_images_image_v2
2017-02-19 10:21:58 -07:00
Yann DEGAT e3a6b00db0 provider/openstack: Adding Image Resource 2017-02-17 09:35:16 +01:00
Joe Topjian 47bf2eff09 provider/openstack BlockStorage v1 availability_zone Fix (#11949)
* vendor: Updating Gophercloud

* provider/openstack: Fix upstream AvailabilityZone field

This commit complements an upstream fix where "availability" was being sent instead of
"availability_zone".
2017-02-15 09:37:05 +00:00
Joe Topjian beb00e287d Merge pull request #10271 from ljfranklin/PR-openstack-ssl-content
Allow OpenStack SSL certs + keys to take path or content
2017-02-08 22:11:31 -07:00
Lyle Franklin 3b7cf41b83 Allow OpenStack SSL fields to be specified by contents
- OpenStack provider now supports either a path or the file contents for
  `cacert_file`, `cert`, and `key`
- Makes it easier to automate TF by passing in certs as environment
  variables
- set `OS_SSL_TESTS=true` to run the acceptance tests
2017-02-05 11:17:00 -08:00
Joe Topjian 5f8dc6cc34 provider/openstack: Remove Default Security Group Rules (#11466)
This commit removes the default security group rules that are automatically
created when a security group is created. These rules are usually
permissive egress rules which makes it difficult to add more strict egress
security group rules.
2017-01-29 16:07:33 +00:00
Joe Topjian b593d6903d provider/openstack: Volume Attachment Updates (#11285)
This commit adds a StateRefresh func for volume attachments. Mostly
this is to add a buffer of time between the request and the return
of the attachment to give time for the volume to become attached,
however, in some cases the refresh function could work as specified.

Docs have also been updated to reflect that a device could be specified,
but to use with caution.
2017-01-23 22:19:50 +00:00
Joe Topjian e31269d721 provider/openstack: Fix Instance Metadata Deletion (#11252)
This commit fixes a bug where instance metadata removed from the
configuration was not removed from the actual instance.
2017-01-18 11:50:59 +00:00
Joe Topjian d240ddcde8 provider/openstack: Increase deletion timeout for router interfaces (#11250) 2017-01-18 09:39:41 +00:00
Joe Topjian 91147fe11c provider/openstack: LoadBalancer Security Groups (#11074)
* provider/openstack: LoadBalancer Security Groups

This commit adds the ability to specify security groups on a loadbalancer
resource.

* provider/openstack: LoadBalancer Security Groups Refactor

Moving common security group code into a dedicated function.
2017-01-12 16:00:32 +02:00
Joe Topjian 414b566d2e provider/openstack: Updating LBaaSV1 acceptance tests (#10979) 2017-01-02 13:46:15 +00:00
Joe Topjian af5baf7b13 provider/openstack: Network and Object Storage Acceptance Test Cleanup (#10967)
* provider/openstack: Updating Networking acceptance tests

* provider/openstack: Updating Object Storage acceptance tests
2016-12-31 18:09:56 +00:00
Joe Topjian b55cf9d601 provider/openstack: Updating FWaaS and LBaaS v2 Acceptance Tests (#10959)
* provider/openstack: Updating FWaaS acceptance tests

* provider/openstack: Updating LBaaS v2 acceptance tests
2016-12-29 23:37:01 +00:00
Joe Topjian 64051f9214 provider/openstack: Updating Compute acceptance tests (#10954) 2016-12-29 16:01:30 +00:00
Joe Topjian c8ac1f7f4e provider/openstack: Acceptance Test Cleanup: Provider & Block Storage (#10839)
* provider/openstack: Updating provider test configuration

* provider/openstack: Updating Block Storage acceptance tests
2016-12-28 16:56:49 +00:00
Joe Topjian b2417ce880 provider/openstack: 409 Response on Member Create
This commit accounts for a 409 response when a LBaaS v2 member is
being created. Rather than error out, this should be considered a
pending state.
2016-12-23 04:29:39 +00:00
Joe Topjian 504407c1cb provider/openstack: Block Device Tests and Docs (#10830)
This commit adds some basic tests for block device functionality. It also
expands the existing block device documentation as well references the
new "volume attach" resources for further block storage functionality.
2016-12-19 10:29:37 +00:00
Joe Topjian 7843a5c6e6 provider/openstack: Handle Volume Creation Errors (#10821)
This commit makes the openstack_blockstorage_volume resources better able
to handle volume creation errors upon resource creation. The cause of this
change is because there could be some storage backend error that happens
during storage provisioning that won't manifest in an "err" but will set
the volume's status to "error". We now check for a status of "error" and
propagate the error up the stack.
2016-12-18 22:38:55 +00:00
Joe Topjian fd40eb3421 provider/openstack: More Import and Region Fixes (#10662)
This has a few more import and region fixes from #10509
2016-12-12 09:14:38 +00:00
Joe Topjian 1c9853ec1b provider/openstack: Fix Ordering of Port Allowed Address Pairs (#10250)
This commit changes allowed_address_pairs from a TypeList to a TypeSet
allowing for arbitrary ordering. This solves the issue where a user
specifies an address pair one way and OpenStack returns a different
order.
2016-12-05 15:36:37 +00:00
Joe Topjian b2f9a3a6fd provider/openstack: Detect Region for Importing Resources (#10509)
* provider/openstack: Detect Region for Importing Resources

This commit changes the way the OpenStack region is detected and set.
Any time a region is required, the region attribute will first be
checked. Next, the OS_REGION_NAME environment variable will be checked.
While schema.EnvDefaultFunc handles this same situation, it is not
applicable when importing resources.

* provider/openstack: No longer ignore region in importing tests

* provider/openstack: Network and Subnet Import Fixes

This commit fixes the OpenStack Network and Subnet resources so that
importing of those resources is successful.
2016-12-04 14:24:07 +00:00
Joe Topjian 1aff30dd5e Merge pull request #10260 from jtopjian/openstack-compute-volume-attach
provider/openstack: openstack_compute_volume_attach_v2 resource
2016-11-22 20:43:59 -07:00
Joe Topjian d16ba26495 Merge pull request #10259 from jtopjian/openstack-blockstorage-volume-attach
provider/openstack: openstack_blockstorage_volume_attach_v2 resource
2016-11-22 09:28:31 -07:00
Joe Topjian 4cc46937e8 provider/openstack: blockstorage volume attach code review updates 2016-11-22 15:27:23 +00:00
Joe Topjian 74189c5211 provider/openstack: Add Swauth/Swift Authentication
This commit adds the ability to authenticate with Swauth/Swift. This can
be used in Swift-only environments that do not have a Keystone service
for authentication.
2016-11-22 04:26:06 +00:00
Joe Topjian 24d7ada0e4 provider/openstack: openstack_compute_volume_attach_v2 resource
This commit adds the openstack_compute_volume_attach_v2 resource. This
resource enables a volume to be attached to an instance by using the
OpenStack Compute (Nova) v2 volumeattach API.
2016-11-20 21:22:07 +00:00
Joe Topjian 672d4d20d7 provider/openstack: openstack_blockstorage_volume_attach_v2 resource
This commit adds the openstack_blockstorage_volume_attach_v2 resource. This
resource enables a volume to be attached to an instance by using the OpenStack
Block Storage (Cinder) v2 API.
2016-11-20 21:19:11 +00:00
Gavin Williams b0981566ec provider/openstack: Add 'value_specs' option to 'openstack_fw_firewall_v1' resource
Refactor to use common 'types.go' and 'MapValueSpecs' function.
Website docs updated to reflect changes.
2016-11-05 10:17:33 +00:00