Commit Graph

4258 Commits

Author SHA1 Message Date
Chris Marchesi 2d65e9dbd2 provider/aws: Add tests for aws_availability_zones data source
Closing off my other AWS availability zone branch, I'm adding tests for
the existing aws_availability_zones data source.

This closes hashicorp/terraform#4848.
2016-05-29 18:23:42 -07:00
djuke c1eee521f3 reading the aws instance it was assumed that eth0 was the first in the list of network interfaces (#6761) 2016-05-29 23:01:58 +01:00
James Nugent 46f81401b9 Merge pull request #6829 from hashicorp/aws-dynamodb-forcenew
provider/aws: Change to `aws_dynamodb_table` hash_key forces a new resource
2016-05-29 12:14:58 -07:00
James Nugent 5cb38c5041 Merge pull request #6911 from paybyphone/paybyphone_aws_ami_description_data_source
provider/aws: aws_ami_description - data source edition (now aws_ami)
2016-05-29 12:07:33 -07:00
James Nugent 5a0f6565d3 Merge pull request #6672 from apparentlymart/random-provider
Logical Resources for Random Values
2016-05-29 11:58:42 -07:00
Chris Marchesi 9ac7fb0276 provider/aws: New data source: aws_ami
This data source allows one to look up the most recent AMI for a specific
set of parameters, much like aws ec2 describe-images in the AWS CLI.

Basically a refresh of hashicorp/terraform#4396, in data source form.
2016-05-29 09:55:12 -07:00
Joe Topjian e0d343906d provider/openstack: Add lb_provider argument to lb_pool_v1
This commit adds the lb_provider argument to the lb_pool_v1 resource.
This argument can be used to specify a backend load balancing system.
2016-05-28 21:53:27 +00:00
Joe Topjian c7107e2228 provider/openstack: Devstack and fmt fixes
This commit adds the newly required OS_EXT_GW environment variable to
the devstack acceptance environment build suite. It also fixes some
space formatting in a test.
2016-05-28 21:32:49 +00:00
Joe Topjian 3aadc19e02 Merge pull request #6837 from carlpett/f-openstack-floatingip-fixed-binding
provider/openstack: Implement fixed_ip on floating ip allocations
2016-05-28 15:30:08 -06:00
Joe Topjian 6430d790e7 Merge pull request #6844 from jtopjian/openstack-instance-network-fnr
provider/openstack: Rebuild On Network Changes
2016-05-28 15:10:26 -06:00
Sander van Harmelen 23801b5507 Add the option to assign affinity groups to a VM 2016-05-27 09:46:59 +02:00
Clint 3355c1528d provider/aws: Fix typo in ELB import test (#6886) 2016-05-26 03:38:39 -05:00
clint shryock 6f04c36a1a provider/aws: Ranomize LB names so tests can run at the same time 2016-05-26 03:37:54 -05:00
Clint 983b6710a5 provider/aws: Add per user, role and group policy attachment (supersedes #5816) (#6858)
* Add per user, role and group policy attachment

* Add docs for new IAM policy attachment resources.

* Make policy attachment resources manage only 1 entity<->policy attachment

* provider/aws: Tidy up IAM Group/User/Role attachments
2016-05-25 11:03:43 -05:00
David Glasser b3425447e5 provider/aws: fix aws_security_group_rule refresh (#6730)
When two rules differ only in source security group, EC2 APIs return
them as a single rule, but Terraform requires separate
aws_security_group_rule resources.

6bdab07174 changed Read to set source_security_group_id (and
cidr_blocks) from the rule returned from EC2 and chose the first
source_security_group_id arbitrarily, which is wrong.

Makes TestAccAWSSecurityGroupRule_PartialMatching_Source pass again.

Also adds a comment noting that there is a bug in the new resource
importing feature.

Fixes #6728.
2016-05-25 10:59:41 -05:00
Calle Pettersson 00be33eb40 Implement fixed_ip on floating ip allocations 2016-05-25 13:50:32 +02:00
Joe Topjian 9f53f77ad9 provider/openstack: Ensure CIDRs Are Lower Case (#6864)
This commit ensures that CIDR arguments are converted into lower
case values, specifically for IPv6 addresses.
2016-05-25 11:24:07 +01:00
dkalleg a47ad103e2 Adding volume resource creation to vSphere provider (#6273)
Allows the user to create a vmdk in vSphere to the given path. In the
future this could support updates for rename and move.
2016-05-25 11:21:16 +01:00
Linda Xu 38ac748b88 support aurora instance's parameter group and modifyinstance 2016-05-24 21:46:00 -07:00
Joe Topjian f3eae849da Merge pull request #6454 from cristicalin/neutron_floatingip_tenant_id
provider/openstack allow floating ip to target a specific tenant
2016-05-24 20:04:24 -06:00
Paul Stack 1d6493f721 provider/azurerm: Remove storage containers and blobs when storage (#6855)
accounts are not found
2016-05-24 23:01:26 +01:00
Paul Stack ce4841e6a6 provider/aws: Add support to `aws_redshift_cluster` for ``iam_roles`` (#6647) 2016-05-24 22:44:46 +01:00
Paul Stack d997b3fb5e provider/azurerm: Add support for storage container name validation (#6852) 2016-05-24 22:30:27 +01:00
James Nugent 1ea727eb13 provider/aws: Add aws_availability_zones source
This commit adds a data source with a single list, `instance` for the
schema which gets populated with the availability zones to which an
account has access.
2016-05-24 15:42:45 -05:00
Paul Stack 1df8290134 provider/aws: Support tags for AWS redshift cluster (#5356) 2016-05-24 18:43:12 +01:00
Clint 171c1e39d2 provider/aws: SQS use raw policy string if compact fails (#6724) 2016-05-24 10:38:32 -05:00
Cristian Calin d2b33d51b8 provider/openstack allow specifying tenant_id on a floatingip resource
Allow a cloud admin to target a specific tenant in which to allocate
a floating IP. This is useful when the cloud admin does not want to
delegate network privileges to the tenants or various Q&A scenarios.
2016-05-24 16:31:09 +03:00
stack72 68d035bc50 provider/aws: Change to `aws_dynamodb_table` hash_key forces a new
resource

We had a line on the Update func that said:

```
Hash key can only be specified at creation, you cannot modify it.
```

The resource has now been changed to ForceNew on the hashkey

```
aws_dynamodb_table.demo-user-table: Refreshing state... (ID: Users)
aws_dynamodb_table.demo-user-table: Destroying...
aws_dynamodb_table.demo-user-table: Destruction complete
aws_dynamodb_table.demo-user-table: Creating...
aws_dynamodb_table.demo-user-table: Creation complete
```
2016-05-24 11:39:55 +01:00
Joe Topjian 803522a7ce provider/openstack: Rebuild On Network Changes
This commit makes it so that openstack_compute_instance_v2 resources
are recreated when any network setting (except Floating IPs) is
changed.
2016-05-24 03:47:27 +00:00
James Nugent ce729c1a82 provider/google: Provide valid config in acctest
The changes to allow for testing ID-only refresh conflict with passing
in "" as Config for tests. In this case we instead construct a config
with a known-non-existent bucket name.
2016-05-23 17:20:19 -05:00
dkalleg a6a6352759 vSphere virtual machine update disk (#6619)
Changed schema type for disks to support dynamic non-ordered disk
swapping.  All Disk attributes have been made non ForceNew since
any changes should be handled in the upgrade() function.
Added 'name' attribute to disks to act as a unique
identifier for when users request for new disks. It is also used as
the filename for the new disk. Templates are considered immutable.
2016-05-23 22:37:06 +01:00
Joe Topjian f674179109 Merge pull request #6693 from jtopjian/openstack-blockstorage-v2
provider/openstack: openstack_blockstorage_volume_v2 resource
2016-05-23 15:18:23 -06:00
Joe Topjian 93cc77e67f provider/openstack: Enable DHCP By Default
The openstack_networking_subnet_v2 resource was originally designed
to have DHCP disabled by default; however, a bug in the original
implementation caused DHCP to always be enabled and never be
disabled. This bug was fixed in #6052.

Recent discussions have shown that users prefer if DHCP is enabled
by default. This commit implements makes the change.
2016-05-23 20:44:34 +00:00
Clint 9437912d3f provider/fastly: Add support for Cache Settings (#6781)
* provider/fastly: Add cache settings

Docs, tests, and implementation for Cache Settings support
2016-05-23 15:07:00 -05:00
Sander van Harmelen b20744b133 Merge pull request #6741 from svanharmelen/f-swap-network-acl
provider/cloudstack: make replacing the ACL of a network update the network in place
2016-05-23 21:12:55 +02:00
Sander van Harmelen cd5ada186c Merge pull request #6743 from svanharmelen/b-network-acl
provider/cloudstack: list network ACLs with VPC IDs
2016-05-23 21:12:35 +02:00
clint shryock 5fcc089266 provider/aws: Randomize an ASG/LC test 2016-05-23 10:20:14 -05:00
stack72 fd8ab99ffe provider/aws: Remove the description test from the Attributes tests as this now has a default value 2016-05-23 13:48:23 +01:00
Joshua Spence c193cbdc03 Add default description
Closes #6100. Set the default value for the `description` field to be "Managed by Terraform".
2016-05-23 06:46:45 +10:00
dkalleg c34ea953b0 provider/vSphere Disk Controller Type (#6785)
Gives the user the ability to specify the controller type they would
like to connect their disk to.  Supported options are scsi and ide.
2016-05-21 07:21:42 +01:00
James Nugent 4b89e0802b Merge pull request #6689 from evandbrown/disk-delete
providers/google: Don't fail deleting disks that don't exist.
2016-05-20 16:58:17 -05:00
James Nugent 3356acc1f7 Merge pull request #6790 from hashicorp/b-arm-nic-iphash
provider/azurerm: `azurerm_network_interface` diffs didn't match during apply
2016-05-20 16:56:12 -05:00
Paul Stack 2c8c587ca5 provider/azurerm: Add support for EnableIPForwarding to (#6807)
`azurerm_network_interface`

As requested in #6803

```

```
2016-05-20 22:43:18 +01:00
Paul Stack ec8c242ebf provider/aws: Add support for Skipping Final Snapshot in RDS Cluster (#6795)
* provider/aws: Add support for Skipping Final Snapshot in RDS Cluster
2016-05-20 12:52:26 -05:00
James Rasell e3352e855c provider/aws: Make 'stage_name' required in api_gateway_deployment (#6797)
When stage_name is not passed to the resource
aws_api_gateway_deployment a terraform apply will fail. This is
because the stage_name is required and not optional.
2016-05-20 15:55:08 +01:00
Martin Atkins 158a90b25b Grafana Provider, with Data Source and Dashboard resources (#6206)
* Grafana provider

* grafana_data_source resource.

Allows data sources to be created in Grafana. Supports all data source
types that are accepted in the current version of Grafana, and will
support any future ones that fit into the existing structure.

* Vendoring of apparentlymart/go-grafana-api

This is in anticipation of adding a Grafana provider plugin.

* grafana_dashboard resource

* Website documentation for the Grafana provider.
2016-05-20 10:20:17 +01:00
stack72 a869d2f8a9 provider/azurerm: `azurerm_network_interface` diffs didn't match during
apply

The IP COnfiguration block of `azurerm_network_interface` didn't have a
hash created in a way that changes to the optional params were being
picked up:

```
~ azurerm_network_interface.test
    ip_configuration.273485505.name:                                       "testconfiguration1" => ""
    ip_configuration.273485505.private_ip_address_allocation:              "dynamic" => ""
    ip_configuration.273485505.subnet_id:                                  "/subscriptions/34ca515c-4629-458e-bf7c-738d77e0d0ea/resourceGroups/acctestrg/providers/Microsoft.Network/virtualNetworks/acctvn/subnets/acctsub" => ""
    ip_configuration.~273485505.load_balancer_backend_address_pools_ids.#: "" => "<computed>"
    ip_configuration.~273485505.load_balancer_inbound_nat_rules_ids.#:     "" => "<computed>"
    ip_configuration.~273485505.name:                                      "" => "testconfiguration1"
    ip_configuration.~273485505.private_ip_address:                        "" => "<computed>"
    ip_configuration.~273485505.private_ip_address_allocation:             "" => "dynamic"
    ip_configuration.~273485505.public_ip_address_id:                      "" => "${azurerm_public_ip.test.id}"
    ip_configuration.~273485505.subnet_id:                                 "" => "/subscriptions/34ca515c-4629-458e-bf7c-738d77e0d0ea/resourceGroups/acctestrg/providers/Microsoft.Network/virtualNetworks/acctvn/subnets/acctsub"
```

This caused the following error:

```
Error applying plan:

1 error(s) occurred:

* azurerm_network_interface.test: diffs didn't match during apply. This is a bug with Terraform and should be reported as a GitHub Issue.

Please include the following information in your report:
```

Notice that the hash didn't change. This change adds the remaining optional params to the hash so that the hash id will change.

```
~ azurerm_network_interface.test
    ip_configuration.4255411321.load_balancer_backend_address_pools_ids.#: "" => "<computed>"
    ip_configuration.4255411321.load_balancer_inbound_nat_rules_ids.#:     "" => "<computed>"
    ip_configuration.4255411321.name:                                      "" => "testconfiguration1"
    ip_configuration.4255411321.private_ip_address:                        "" => "<computed>"
    ip_configuration.4255411321.private_ip_address_allocation:             "" => "dynamic"
    ip_configuration.4255411321.public_ip_address_id:                      "" => "/subscriptions/34ca515c-4629-458e-bf7c-738d77e0d0ea/resourceGroups/acctestrg/providers/Microsoft.Network/publicIPAddresses/public-ip"
    ip_configuration.4255411321.subnet_id:                                 "" => "/subscriptions/34ca515c-4629-458e-bf7c-738d77e0d0ea/resourceGroups/acctestrg/providers/Microsoft.Network/virtualNetworks/acctvn/subnets/acctsub"
    ip_configuration.966273186.name:                                       "testconfiguration1" => ""
    ip_configuration.966273186.private_ip_address_allocation:              "dynamic" => ""
    ip_configuration.966273186.subnet_id:                                  "/subscriptions/34ca515c-4629-458e-bf7c-738d77e0d0ea/resourceGroups/acctestrg/providers/Microsoft.Network/virtualNetworks/acctvn/subnets/acctsub" => ""
```

This allows the Update to work as expected :)

```
azurerm_network_interface.test: Modifications complete

Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
```
2016-05-20 09:34:40 +01:00
Maxime Bury bd073c539e Fixes terraform crash when using SSH keys with Azure VMs (#6766) 2016-05-19 16:45:58 +01:00
Maxime Bury b33bd427e1 Normalizes availability_set_id to lowercase to avoid spurious diffs (#6768) 2016-05-19 16:44:29 +01:00
Otto Jongerius 58e1c94335 provider/datadog Add test for no_data_timeframe. (#6765) 2016-05-19 14:51:27 +01:00
Kirill Shirinkin 2dc254af13 provider/openstack Increase timeouts 2016-05-19 11:28:55 +02:00
Otto Jongerius dc7a7219bf provider/datadog add 'require full window' and 'locked' (#6738)
* provider/datadog Update go-datadog-api.

* provider/datadog Add support for "require_full_window" and "locked".

* provider/datadog Update tests, update doco, gofmt.

* provider/datadog Add options to update resource.

* provider/datadog "require_full_window" defaults to True, "locked" to False. Use
those initial values as the starting configuration.

* provider/datadog Update notify_audit tests to use the default value for
testAccCheckDatadogMonitorConfig and a custom value for
testAccCheckDatadogMonitorConfigUpdated.

This catches a situation where the code ignores setting the option on creation,
and the update function merely asserts the default value, versus actually changing
the value.
2016-05-19 09:29:23 +01:00
Mitchell Hashimoto 55583baa7e
Merge branch 'f-aws-import' 2016-05-18 15:28:12 -06:00
Mitchell Hashimoto 24c0adb2d4
providers/aws: revert LC change 2016-05-18 15:28:01 -06:00
Mitchell Hashimoto 4967f3ff08
providers/aws: route53 delegation set import 2016-05-18 13:26:52 -06:00
Mitchell Hashimoto 801d342496
providers/aws: route53 health check import 2016-05-18 13:15:59 -06:00
Mitchell Hashimoto 1c0a6bc6d3
providers/aws: basic route 53 zone import 2016-05-18 13:09:56 -06:00
James Nugent 3ea3c657b5 core: Use OutputState in JSON instead of map
This commit forward ports the changes made for 0.6.17, in order to store
the type and sensitive flag against outputs.

It also refactors the logic of the import for V0 to V1 state, and
fixes up the call sites of the new format for outputs in V2 state.

Finally we fix up tests which did not previously set a state version
where one is required.
2016-05-18 13:25:20 -05:00
Paul Stack 811667023b provider/aws: Add support for S3 Bucket Acceleration (#6628) 2016-05-18 11:33:03 -05:00
Paul Stack be0db001db provider/azurerm: Add support for exporting the (#6742)
`azurerm_storage_account` access keys

Please note that we do NOT have the ability to manage the access keys -
we are just getting the keys that the account creates for us. To manage
the keys, you would need to use the azure portal still
2016-05-18 16:31:43 +01:00
stack72 27f05b8e3b Merge branch 'wowgroup-aws-rds-cluster-param-group' 2016-05-18 14:11:47 +01:00
stack72 21a65fd085 provider/aws: Refreshing the state when `DBParameterGroupNotFound`
happens
2016-05-18 14:10:32 +01:00
Sander van Harmelen 6a08e893e3 Use the new option to list ACLs based on the ID and VPC ID 2016-05-18 14:43:21 +02:00
Sander van Harmelen ecb41d478a Make replacing the ACL of a network update the network in place
This prevents having to recreate the whole network and fixes #6630
2016-05-18 12:22:32 +02:00
thetuxkeeper 62639620e1 merged createVirtualMachine and deployVirtualMachine to setupVirtualMachine (#6659) 2016-05-17 22:18:35 +01:00
Clint 073f629447 provider/fastly: add support for custom VCL configuration (supersedes #6587) (#6662)
* provider/fastly: add support for custom VCL configuration
2016-05-17 14:49:51 -05:00
Joe Topjian d3b0a301c7 Merge pull request #6718 from buzztroll/vet/keyed_fields
provider/openstack: Fixes an vet error.
2016-05-17 13:53:57 -05:00
thetuxkeeper 790115fe43 provider/vsphere: wait for network enhanced (#6377)
* - use WaitForNetIP
- removed duplicate wait for network parts

* gofmt fix

* fixes
2016-05-17 19:35:06 +01:00
James Nugent 3b6cd9918a Merge pull request #6622 from hashicorp/f-fastly-request-settings
provider/fastly: Add support for Service Request Settings
2016-05-17 13:22:25 -05:00
James Nugent 55002086e5 Merge pull request #6592 from hashicorp/b-aws-r53-name-state
provider/aws: Update Route53 Record to schema v1, normalizing name
2016-05-17 12:56:13 -05:00
James Nugent b08d741eb0 Merge pull request #6687 from hashicorp/b-aws-elasticache-param-crash
provider/aws: Fix crash in ElastiCache param group
2016-05-17 12:38:34 -05:00
John Bresnahan 99ab233740 Fixes an vet error. 2016-05-17 06:23:53 -10:00
Robert Conrad faa6ddb2ee provider/aws: Support for Redshift Cluster encryption using a KMS key (#6712) 2016-05-17 11:12:39 -05:00
clint shryock 91a1097041 provider/aws: Randomize key names in KMS alias test 2016-05-17 10:40:42 -05:00
Joe Topjian b204d35e19 provider/openstack openstack_blockstorage_volume_v2 resource
This commit adds an openstack_blockstorage_volume_v2 resource. This
resource is able to create volumes using the OpenStack Block Storage
v2 API.
2016-05-17 13:20:26 +00:00
Evan Brown f075b0214d providers/google: Don't fail deleting disks that don't exist.
Addresses #5942
2016-05-16 11:57:04 -07:00
James Nugent a2950c76d9 Merge pull request #6598 from hashicorp/f-data-sources
Data-driven Terraform Configuration
2016-05-16 13:00:41 -05:00
Mitchell Hashimoto f64f470807
providers/aws: fix placement group import 2016-05-16 10:38:53 -07:00
Mitchell Hashimoto dc3163c464
providers/aws: placement group import 2016-05-16 10:35:44 -07:00
Mitchell Hashimoto 519f0ae4d6
providers/aws: launch configuration import 2016-05-16 10:26:49 -07:00
clint shryock 23340d3c84 provider/aws: Fix crash in ElastiCache param group 2016-05-16 12:20:06 -05:00
Mitchell Hashimoto a992860b8d
providers/aws: key_pair import 2016-05-16 10:13:20 -07:00
Mitchell Hashimoto 4e3488afb8
providers/aws: customer gateway import 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto 2a30178413
providers/aws: flow log import 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto f6b77a6c02
providers/aws: import network ACLs 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto 2d5745328b
providers/aws: import main route table association 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto ab7b5dab2d
providers/aws: route tables import assocations 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto a1035804d4
providers/aws: route table import should ignore default rule 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto 08b7f67227
providers/aws: route table import 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto a4e48b19c0
providers/aws ENI import 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto 9cdbed11ff
providers/aws: ebs volume and autoscaling group 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto 884980da1a
providers/aws: instance, nat, internet gateway 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto 830708a882
providers/aws: elb 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto 91938cf55f
providers/aws: resource aws_subnet import 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto b75d5bb46d
providers/aws: vpc dhcp options 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto da353c3637
aws/aws_vpc: import 2016-05-16 10:03:57 -07:00
Mitchell Hashimoto 420e13d2f2
providers/aws: eip uses passthrough importstate 2016-05-16 10:03:57 -07:00
clint shryock b9d0e14d2a provider/aws: Update Lambda tests for more random names 2016-05-16 10:31:46 -05:00
Joe Topjian f69d95d01f Merge pull request #6579 from Fodoj/reassociate-fip-on-update
provider/openstack: Reassociate FIP on network changes
2016-05-14 21:55:16 -05:00
Joe Topjian b53c74a9ae Merge pull request #6279 from ZZelle/support-client-cert
provider/openstack: Support client certificates
2016-05-14 20:44:57 -05:00