Commit Graph

469 Commits

Author SHA1 Message Date
Gavin Williams a281a29cb6 provider/openstack: Optimize the printing of request/response headers… (#15086)
* provider/openstack: Optimize the printing of request/response headers when debugging Openstack HTTP requests

* provider/openstack: Log the response code aswell
2017-06-06 21:34:44 -06:00
Gavin Williams 401c6a95a7 provider/openstack: Add Terraform version to UserAgent string (#14955)
* core: Add 'UserAgentString' helper function to generate a standard UserAgent string. Example generation: 'Terraform 0.9.7-dev (go1.8.1)'

* provider/openstack: Add Terraform version to UserAgent string
2017-06-01 22:12:25 -06:00
Gavin Williams 1da7fda417 provider/openstack: Add support for FWaaS routerinsertion extension (#12589)
* vendor: Add gophercloud/routerinsertion package and update
gophercloud/firewall to support router insertion

* provider/openstack: Add support for associating
`openstack_fw_firewall_v1` resources with router(s).
Added `associated_routers` and `no_routers` arguments.

* website: Add documentation for `associated_routers`and `no_routers` arguments on `openstack_fw_firewall_v1` resource.

* provider/openstack: Add `AddValueSpecs` function and refactor existing
uses.
2017-05-31 23:19:59 -06:00
Joe Topjian 527b7af79e Merge pull request #14956 from fatmcgav/openstack_sort_headers
provider/openstack: Sort request/response headers whilst debugging
2017-05-31 18:21:54 -06:00
Gavin Williams 029ff9801b provider/openstack: Sort request/response headers whilst debugging 2017-05-31 11:16:55 +01:00
Joe Topjian ff1c2b10e0 Merge pull request #14917 from jtopjian/openstack-secgroup-numeric-protocol
provider/openstack: Allow numerical protocols in security group rules
2017-05-30 12:55:17 -06:00
Joe Topjian d311417122 provider/openstack: Allow numerical protocols in security group rules
This commit enables a user to specify protocols in numerical form
when creating security group rules.
2017-05-29 22:03:40 -06:00
Joe Topjian 19008e28af provider/openstack: Re-add missing create option logging 2017-05-29 21:34:25 -06:00
Ryo Takaishi c501cb1063 provider/openstack: Add support provider network (#10265)
* provider:openstack Add support provider network

* revert vendor file changes

* vendor: Updating Gophercloud for OpenStack Provider

* create provider network if parameter has segments

* segments is not computed resource

* extract to generate []provider.Segment

* change segmentstion id type
2017-05-29 21:30:41 -06:00
Gavin Williams 3c3c08a0cd provider/openstack: Fix issue with providing OS_IMAGE_ID or OS_IMAGE_NAME when running acceptance tests. 2017-05-29 13:04:50 +01:00
Joe Topjian db47721e15 provider/openstack: Enable Security Group Updates (#14815)
* vendor: Updating Gophercloud for OpenStack Provider

* provider/openstack: Enable Security Group Updates

This commit enables security group names and descriptions to
be updated without causing a recreate.
2017-05-25 07:53:26 +01:00
jrperritt e1c8d760d3 provider/openstack: Add DNS V2 RecordSet resource (#14813)
* vendor gophercloud dns v2 recordset deps

* openstack dns v2 recordset resource

* fix type assertion panic condition

* address pr review feedback
2017-05-24 22:58:44 -06:00
Joe Topjian da8f71d4c2 provider/openstack: Add support for updating Subnet Allocation Pools (#14782)
* vendor: Updating Gophercloud for OpenStack Provider

* provider/openstack: Add support for updating Subnet Allocation Pools

This commit adds the ability to update a subnet's allocation pool.
2017-05-24 11:38:05 +01:00
Joe Topjian cfb83f9d87 Merge pull request #14704 from jtopjian/openstack-instance-tenantnet-fix
provider/openstack: Catch error during instance network parsing
2017-05-22 09:29:11 -06:00
Joe Topjian e0b5f4f833 provider/openstack: dns zone v2 updates and docs 2017-05-22 01:44:11 +00:00
jrperritt 5792b9fe76 provider/openstack: Add openstack_dns_zone_v2 resource 2017-05-22 01:44:11 +00:00
Joe Topjian 6fe0471008 provider/openstack: Catch error during instance network parsing
This commit catches an error when the instance is parsing and building
its network list. This can happen when a cloud provider responds with
a non-JSON response for the list of networks.
2017-05-21 02:34:57 +00:00
Joe Topjian 5842642643 provider/openstack: Handle Deleted Resources in Floating IP Association (#14533)
This commit modifies the openstack_compute_floatingip_associate_v2 resource
to handle cases where the floating IP or instance were deleted outside of
Terraform.
2017-05-16 11:36:50 +03:00
r_takaishi 773d7bf4f0 fix test and const name 2017-05-14 21:00:36 +09:00
r_takaishi 848176588c add test 2017-05-14 20:59:18 +09:00
r_takaishi 7ec662b243 provider/openstack: Add to support protocols for resourceNetworkingSecGroupRuleV2 2017-05-14 20:59:18 +09:00
Gavin Williams 2d3f1ad222 provider/openstack: Handle disassociating FloatingIP's from a server
that's been deleted using the `CheckDeleted` function.
2017-05-04 20:23:02 +01:00
Joe Topjian 1af649ed5a provider/openstack: Ignore fixed_ip when importing ports (#13563) 2017-04-17 01:36:15 +03:00
Gavin Williams c63ad9c0f8 state/remote/swift: Support Openstack request logging (#13583)
* provider/openstack: Expose LogRoundTripper fields externally

* state/remote/swift: Add support for debugging Openstack calls using
OS_DEBUG env variable.

* provider/openstack: Update LogRoundTripper to log headers aswell as body.

* Add `RedactHeaders` function in order to redact sensitive http Headers.
Refactor `logRequest` and `logResponse` to use `RedactHeaders` func.
2017-04-15 17:11:28 +03:00
Joe Topjian 6efd0640ec Openstack port update fixes (#13604)
* provider/openstack: Handle 409 Errors Upon Security Group Deletion

If a security group is currently in use, it will throw a 409 error.
This commit catches the 409, allowing other resources to finish
deleting.

* Update openstack_networking_port_v2 resource to pass empty arrays for AllowedAddressPairs and SecurityGroups if not specified. Fixes #13531

* provider/openstack: Port Update comment
2017-04-13 13:37:15 +02:00
Joe Topjian 723a6e0860 provider/openstack: Fixing names for import tests (#13523) 2017-04-11 11:11:22 +03:00
Gavin Williams afb8bb27e8 provider/openstack: Add support for 'value_specs' options to (#13380)
`openstack_compute_servergroup_v2`
Refactor to use common `types.go` and `MapValueSpecs function`.
Added supporting website documentation.
2017-04-07 15:15:31 +03:00
Joe Topjian cfd4101055 provider/openstack: Add SOFT_DELETED to delete status (#13444)
This commit allows clean deletion of instances that have a
status of SOFT_DELETED.
2017-04-07 15:13:08 +03:00
dannytrigo 92cda8f75d Do not error if compute volume attachment is missing (#13342)
https://github.com/hashicorp/terraform/issues/13334
2017-04-05 06:43:16 +01:00
Joe Topjian 77a41ca859 provider/openstack: Resolve issues with Port Fixed IPs (#13056)
* provider/openstack: Add all_fixed_ips computed attribute to port resource

This commit adds the `all_fixed_ips` attribute to the
openstack_networking_port_v2 resource. This contains all of the port's
Fixed IPs returned by the Networking v2 API.

* provider/openstack: Revert Port fixed_ip back to a List

This commit reverts the changes made in a8c4e81a6e3f2. This
re-enables the ability to reference IP addresses using the
numerical-element notation.

This commit also makes fixed_ip a non-computed field, meaning
Terraform will no longer set fixed_ip with what was returned
by the API. This resolves the original issue about ordering.

The last use-case is for fixed_ips that received an IP address
via DHCP. Because fixed_ip is no longer computed, the DHCP IP
will not be set. The workaround for this use-case is to use the
new all_fixed_ips attribute.

In effect, users should use fixed_ip only as a way of inputting
data into Terraform and use all_fixed_ips as the output returned
by the API. If use-cases exist where fixed_ip can be used as an
output, that's a bonus feature.
2017-03-27 20:22:56 +03:00
Joe Topjian 7199a58ce7 provider/openstack: Adding all_metadata attribute (#13061)
This commit adds the all_metadata attribute which contains all
instance metadata returned from the OpenStack Compute API. This
is useful for gaining access to metadata which was applied
out of band of Terraform.

This commit also stops setting the original metadata attribute,
effectively making metadata an input and all_metadata the output
to reference all data from.
2017-03-27 20:09:18 +03:00
Joe Topjian fafd488a1c provider/openstack: 409 Response on Pool Create (#13074)
This commit accounts for a 409 response when a LBaaS v2 pool is
being created. Rather than error out, this should be considered a
pending state.
2017-03-26 14:35:01 +03:00
Joe Topjian 89905368b9 provider/openstack: Don't log the catalog (#13075)
The OS_DEBUG feature has worked out great, but frequent logging of
the service catalog during client initialization can make logging
very chatty. This commit omits the service catalog in the logs.
2017-03-26 12:35:40 +03:00
Joe Topjian 9af4c1da67 provider/openstack: Fix monitor_id typo in LBaaS v1 Pool (#13069) 2017-03-25 22:42:18 +02:00
Joe Topjian de255d43d6 provider/openstack: Decprecating Instance Floating IP attribute (#13063)
This commit deprecates the floating_ip attributes from the
openstack_compute_instance_v2 resource. It is recommended to use
either the openstack_compute_floatingip_associate resource or
configure an openstack_networking_port_v2 resource with a floating
IP.
2017-03-25 13:09:35 +02:00
Joe Topjian de8e2d7f2b provider/openstack: Deprecating Instance Volume attribute (#13062)
This commit deprecates the volume attribute in the
openstack_compute_instance_v2 resource. It's recommended to either
use the block_device attribute or the openstack_compute_volume_attach_v2
resource.
2017-03-25 13:08:07 +02:00
Joe Topjian 0d3190fd8f provider/openstack: Fixing typo in secgroup rule timeout test 2017-03-25 01:34:42 +00:00
Joe Topjian bd7ba34627 provider/openstack: Adding Timeouts to Network Resources (#12866) 2017-03-19 17:23:36 +00:00
Joe Topjian fbf1732a7b provider/openstack: Adding Timeouts to LBaaS v1 Resources (#12867) 2017-03-19 17:18:03 +00:00
Joe Topjian adbc87f1e7 provider/openstack: Adding Timeouts to Image v2 and LBaaS v2 Resources (#12865) 2017-03-19 17:14:20 +00:00
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