Commit Graph

2065 Commits

Author SHA1 Message Date
Trevor Pounds eba605fa6a Cleanup unrelated config to speed up AZ/VPC acc tests.
Removes overspecified config that is unrelated to the auto scaling
group's availability zone and VPC identifier acceptance tests. The
created auto scaling groups do not need to spin up any hosts since
the acceptance tests are only concerned with checking the existence
of the associated availability zones and VPC identifiers.
2016-02-08 19:55:11 -08:00
Paul Stack 4baa8fa691 Merge pull request #5044 from tpounds/fix-read-aws-asg-az
provider/aws: Fix reading auto scaling group availability zones
2016-02-08 21:37:23 +00:00
Radek Simko 05b6af5d83 Merge pull request #5051 from TimeIncOSS/f-aws-cloudtrail-fields
provider/aws: Add support for CloudTrail log validation + KMS encryption
2016-02-08 21:05:35 +00:00
Radek Simko 531e60047b provider/aws: Add support for CloudTrail log validation + KMS encryption 2016-02-08 11:51:25 +00:00
Trevor Pounds 0cd0ff0f8e Use built-in schema.HashString. 2016-02-07 16:29:34 -08:00
Trevor Pounds 8ceeaaf7ff Fix load balancers read logic. 2016-02-07 15:00:21 -08:00
Trevor Pounds dac7226a8e Check calculated availability zones. 2016-02-07 14:24:31 -08:00
Trevor Pounds 37eb1cba88 Make availability zones a computed attribute.
Fixes a diff calculation error when only a VPC zone
identifiers is provided. In this case the associated
availability zones are computed from the subnets per
the AWS documentation.
2016-02-07 14:14:00 -08:00
Trevor Pounds e0f4be47a8 Remove redundant metadata get. 2016-02-07 14:14:00 -08:00
Trevor Pounds cd42705bf1 Fix availability zones read logic. 2016-02-07 14:14:00 -08:00
Paul Stack 00ea9c969d Merge pull request #4943 from stack72/f-aws-dynamodbtable-refresh
provider/aws: DynamoDB Table Refresh State on Error
2016-02-06 23:47:41 +00:00
Cameron Stokes 24f034a2c6 Acc tests for aws_vpn_connection tunnel attributes. 2016-02-06 14:00:26 -08:00
Cameron Stokes 6a5cb5b109 Provide tunnel info from XML config. 2016-02-06 12:39:49 -08:00
Maxime Bury eaacf5c618 Add multi-region option to cloudtrail 2016-02-05 13:15:05 -05:00
clint shryock 52f3e9b8db update provider test and extend the delete timelimit 2016-02-04 15:48:54 -06:00
Paul Tyng 0961033400 Add tag support for elasticsearch 2016-02-04 12:53:11 -05:00
Paul Tyng 20efc7688f Update validation on domain name 2016-02-04 12:53:10 -05:00
clint shryock 840d2e7ccc Switch to acctest.RandInt for acceptance tests 2016-02-04 11:20:22 -06:00
clint shryock 53a42eaa0f provider/aws: Add a regression test for Route53 records
This is a follow up on #4892 with tests that demonstrate creating a record and a zone, then destroying said record, and confirming that a new plan is generated, using the ExpectNonEmptyPlan flag

This simulates the bug reported in #4641 by mimicking the state file that one would have if they created a record with Terraform v0.6.6, which is to say a weight = 0 for a default value.

When upgrading, there would be an expected plan change to get that to -1. To mimic the statefile we apply the record and then in a follow up step change the attributes directly. We then try to delete the record.

I tested this by grabbing the source of aws_resource_route53.go from Terraform v0.6.9 and running the included test, which fails. The test will pass with #4892 , because we no longer reconstruct what the record should be based on the state (instead finding via the API and elimination/matching)
2016-02-03 09:16:50 -06:00
Diego Rodriguez cfafa3f574 fix ec2 classic security group changing 2016-02-03 00:33:42 -08:00
stack72 9c17e5d3e8 DynamoDB Table now refreshes the state when NotFoundException occurs 2016-02-01 21:55:10 +00:00
clint shryock 772ac8522a provider/aws: Change VPC ClassicLink to be computed 2016-02-01 09:30:09 -06:00
Clint 41de3ee6bd Merge pull request #4892 from hashicorp/b-aws-r53-weight-update
provider/aws: Refactor Route53 record to fix regression in deleting
2016-01-29 13:36:32 -06:00
clint shryock 39f5a7e751 use the same error checking in DELETE 2016-01-29 12:38:22 -06:00
clint shryock 3bbb21d115 refactor error handling in findRecord 2016-01-29 11:56:19 -06:00
Clint b7582fa6d9 Merge pull request #4869 from hashicorp/b-aws-provider-auth-docs
provider/aws: Provide a better message if no AWS creds are found
2016-01-29 09:25:26 -06:00
Clint 800420cf9b Merge pull request #4856 from hashicorp/b-aws-test-randoms
provider/aws: Randomize all S3 bucket names per test, not per run
2016-01-29 06:52:29 -06:00
Clint 23cf9fdbd9 Merge pull request #4860 from hashicorp/b-aws-test-randoms-ops
provider/aws: Restructure OpsWorks test files
2016-01-29 06:52:16 -06:00
Paul Stack 2bc5d25bc0 Merge pull request #4891 from stack72/f-aws-sns-ui-deleted
provider/aws: SNS Topic State Refreshing correctly
2016-01-29 11:03:19 +00:00
Radek Simko 51f6a15803 Merge pull request #4894 from paultyng/pt/error-message
Add "lowercase" to error message
2016-01-29 10:39:43 +00:00
stack72 91cb65dd05 Provider/aws - SNS Topics deleted from the UI were causing Terraform to
throw an error:

* aws_sns_topic_subscription.checker: NotFound: Subscription does not
* exist
    status code: 404, request id: b8ca0c27-1a62-57b3-8b96-43038a0ead86

Terraform wasn't refreshing the state when the topic gave a 404
2016-01-28 23:26:05 +00:00
Paul Tyng 15f3091f9d Add "lowercase" to error message 2016-01-28 18:20:50 -05:00
clint shryock 125987994c provider/aws: Refactor Route53 record to fix regression in deleting
refactored to add a `findRecord` method to find the matching record set,
and use that for the `DELETE` method call.
2016-01-28 17:01:53 -06:00
Clint dd0475ca4e Merge pull request #4879 from hashicorp/b-aws-vpc-classiclink-fix
providers/aws: Fix issue with VPC Classic Link and regions that don't support it
2016-01-28 10:54:40 -06:00
clint shryock 2ac040bef2 providers/aws: Fix issue with VPC Classic Link and regions that don't support it
- use eu-central-1 to a config to check for #4874
- update documentation
2016-01-28 10:12:06 -06:00
Paul Stack 05d19b0fc3 Merge pull request #4693 from stack72/f-aws-asg-schedule-0values
provider/aws: aws autoscale schedule 0 values
2016-01-28 15:38:41 +00:00
clint shryock 45c9a10d0f provider/aws: Provide a better message if no AWS creds are found 2016-01-27 16:30:03 -06:00
clint shryock e64c23c69a patch up acc tests 2016-01-27 14:42:21 -06:00
Paul Hinze c70eab6500 aws: undeprecate min_elb_capacity; restore min capacity waiting
It was a mistake to switched fully to `==` when activating waiting for
capacity on updates in #3947. Users that didn't set `min_elb_capacity ==
desired_capacity` and instead treated it as an actual "minimum" would
see timeouts for every create, since their target numbers would never be
reached exactly.

Here, we fix that regression by restoring the minimum waiting behavior
during creates.

In order to preserve all the stated behavior, I had to split out
different criteria for create and update, criteria which are now
exhaustively unit tested.

The set of fields that affect capacity waiting behavior has become a bit
of a mess. Next major release I'd like to rework all of these into a
more consistently named block of config. For now, just getting the
behavior correct and documented.

(Also removes all the fixed names from the ASG tests as I was hitting
collision issues running them over here.)

Fixes #4792
2016-01-27 13:30:44 -06:00
clint shryock 99e9dca413 fix some typos 2016-01-27 11:46:46 -06:00
clint shryock 303554c8df restructure OpsWorks test files to use random stack name, and duplication 2016-01-27 11:32:40 -06:00
clint shryock dd0ca302de guard against a nil dereference 2016-01-27 10:56:33 -06:00
clint shryock 244e727c6f provider/aws: Randomize all S3 bucket names per test, not per run
The existing `randInt` is being use per run (so all tests use the same bucket
name), not per run (where each test would get a random int)

Fixes that
2016-01-27 10:45:52 -06:00
Clint 24f10b024f Merge pull request #4838 from hashicorp/b-aws-rds-db-name-fix
provider/aws: Workaround API issue with RDS Cluster DatabaseName
2016-01-26 14:08:42 -06:00
clint shryock d78e897b46 provider/aws: Fix SG leak in opsworks custom layer test 2016-01-26 11:43:35 -06:00
clint shryock 8d3f309f62 provider/aws: Workaround API issue with RDS Cluster DatabaseName 2016-01-26 10:35:21 -06:00
Clint 0f2f9da2fd Merge pull request #4779 from hashicorp/aws-sg-drift-fix
provider/aws: Fix issue with detecting drift in AWS Security Groups rules
2016-01-25 16:35:43 -06:00
Clint 2faf1c1422 Merge pull request #4829 from hashicorp/b-aws-efs-test-updates
provider/aws: Update EFS test destroy methods
2016-01-25 16:34:59 -06:00
Clint 577618b368 Merge pull request #4825 from hashicorp/b-aws-elb-listener-retry
provider/aws: Retry Listener Creation for ELBs
2016-01-25 16:32:40 -06:00
Clint 6ce5ade259 Merge pull request #4828 from hashicorp/b-aws-state-funcs
provider/aws: Update refresh state func target for DHCP options
2016-01-25 16:30:55 -06:00
clint shryock a3bfec2684 provider/aws: Update EFS test destroy methods 2016-01-25 16:27:58 -06:00
clint shryock 1e03c90238 provider/aws: use a known good ami for spot instance test 2016-01-25 16:16:55 -06:00
clint shryock 48ecc9b3a0 provider/aws: Update refresh state func target for DHCP options 2016-01-25 14:47:25 -06:00
clint shryock 86ad4c4340 provider/aws: Retry Listener Creation for ELBs 2016-01-25 11:38:04 -06:00
clint shryock e865c342cc provider/aws: fix ELB SG test 2016-01-25 11:05:22 -06:00
Clint 4708e66328 Merge pull request #4098 from csabapalfi/f-aws-s3-redirect-protocol
Enable specifying aws s3 redirect protocol
2016-01-22 15:51:40 -06:00
Clint 6befb714cc Merge pull request #4734 from hashicorp/b-network-acl-visibility
provider/aws: Wait for NACL rule to be visible
2016-01-22 14:26:21 -06:00
Csaba Palfi 8f6404a0e1 provider/aws enable specifying aws s3 redirect protocol
Signed-off-by: Csaba Palfi <csaba@palfi.me>
2016-01-21 23:26:13 +00:00
clint shryock 9ee6f822f6 provider/aws: Default Autoscaling Schedule min/max/desired to zero 2016-01-21 16:02:46 -06:00
clint shryock 7462eb1742 provider/aws: Fix issue with detecting drift in AWS Security Groups in-line rules 2016-01-21 11:21:25 -06:00
Ian Duffy 47ac10d66b Change resource.StateChangeConf to use an array for target states
Signed-off-by: Ian Duffy <ian@ianduffy.ie>
2016-01-21 01:20:41 +00:00
Paul Hinze 7d10d454e2 Merge pull request #4749 from hashicorp/b-1752
core: fix diff mismatch when RequiresNew field and list both change
2016-01-19 18:29:10 -06:00
Paul Hinze 4af2c5f5dd core: fix diff mismatch when RequiresNew field and list both change
fixes #1752

Includes AccTest reproducing example from the issue as well as a bunch
of explanatory comments in the tests and impls.
2016-01-19 15:38:04 -06:00
Clint 569e74c2e7 Merge pull request #4481 from ElliotG/feature/encryptedBlockDevice
provider/aws: Added support for the encryption flag on ebs_block_devices in launch configurations
2016-01-19 10:26:11 -06:00
James Nugent 7620381a4f provider/aws: Wait for NACL rule to be visible
Fixes #4721. It seems there may be some eventual consistency in the API
for network ACLs. This fix doesn't use resource.WaitForState() as there
the NACL is not something that can be looked up by ID and has a
property which determines if it is present.

Instead we reuse the findNetworkAclRule function which the Read function
exhibiting the problem uses, and retry over a 3 minute period, returning
an error message informing the user that running `terraform apply` again
will likely allow them to continue.
2016-01-19 08:12:20 -05:00
Srikalyan Swayampakula 3d256dd021 Found an issue with more testing aws api is responding with various of
"pending confirmation" such as "PendingConfirmation", "Pending Confirmation" etc.
2016-01-18 15:38:34 -08:00
Srikalyan Swayampakula 63d6d8dbe2 Forgot to add one last condition to ensure that non pending confirmation subscription is returned. 2016-01-18 14:00:11 -08:00
Srikalyan Swayampakula 9d125944c0 Added support for http/https endpoints that auto confirms SNS topic subscription.
http and https SNS topic subscription endpoints require confirmation to set a valid arn otherwise
arn would be set to "pending confirmation". If the endpoints auto confirm then arn is set
asynchronously but if we try to create another subscription with same parameters then api returns
"pending subscription" as arn but does not create another a duplicate subscription. In order to
solve this we should be fetching the subscription list for the topic and identify the subscription
with same parameters i.e., protocol, topic_arn, endpoint and extract the subscription arn.

Following changes were made to support the http/https endpoints that auto confirms

1. Added 3 extra parameters i.e.,
   1. endpoint_auto_confirms -> boolean indicates if end points auto confirms
   2. max_fetch_retries -> number of times to fetch subscription list for the topic to get the subscription arn
   3. fetch_retry_delay -> delay b/w fetch subscription list call as the confirmation is done asynchronously.

  With these parameters help added support http and https protocol based endpoints that auto confirm.

2. Update website doc appropriately
2016-01-17 12:24:32 -08:00
stack72 acabd4d407 Change ASG Lifecycle Default Result to be computed and added a test to record what the default value is 2016-01-15 22:34:16 +00:00
stack72 318db85623 Added a test to prove that 0 values cannot be specified for the Autoscale Group Schedule resource 2016-01-15 17:45:09 +00:00
Clint 79c32ddbe9 Merge pull request #4627 from ColinHebert/patch-1
provider/aws: EBS optimised to force new resource
2016-01-14 14:57:13 -06:00
Clint 8e6fba43ef Merge pull request #4564 from hashicorp/pr-3741
provider/aws: Supporting New AWS Route53 HealthCheck additions (supersedes #3741)
2016-01-14 14:41:19 -06:00
James Nugent 6acc7a14e4 Merge pull request #4632 from hashicorp/f-aws-profile
provider/aws: Add profile to provider config
2016-01-14 17:08:04 +00:00
James Nugent ace215481a provider/aws: Add profile to provider config
This allows specification of the profile for the shared credentials
provider for AWS to be specified in Terraform configuration. This is
useful if defining providers with aliases, or if you don't want to set
environment variables. Example:

$ aws configure --profile this_is_dog
... enter keys

$ cat main.tf
provider "aws" {
    profile = "this_is_dog"

    # Optionally also specify the path to the credentials file
    shared_credentials_file = "/tmp/credentials"
}

This is equivalent to specifying AWS_PROFILE or
AWS_SHARED_CREDENTIALS_FILE in the environment.
2016-01-14 15:39:35 +00:00
James Nugent ea4595840c Merge pull request #4674 from stack72/carl-youngblood/master
Fix recurrence on `aws_autoscaling_schedule` resource
2016-01-14 12:22:43 +00:00
Carl Youngblood 5c68858c5b Bug fixes for aws_autoscaling_schedule resource
- Fix typo s/recurrance/recurrence
- Fix missing nil check on EndTime that was crashing
2016-01-14 10:08:37 +00:00
clint shryock 8181a4ea24 minor clean ups after #3862 2016-01-13 16:58:07 -06:00
Clint 7f6624e926 Merge pull request #3862 from stack72/aws-redshift
provider/aws: AWS Redshift
2016-01-13 16:52:47 -06:00
Clint 64f44c53c6 Merge pull request #4597 from tpounds/support-aws-elb-az-and-subnet-updates
provider/aws: Support updating ELB availability zones and subnets
2016-01-13 15:30:44 -06:00
Clint eed2a2a0f6 Merge pull request #3139 from koendc/b-rds-snapshots-required-fields
provider/aws: aws_db_instance: make some fields optional
2016-01-13 15:15:09 -06:00
Clint 921f6eb806 Merge pull request #4388 from jszwedko/add-support-for-aws-directory-service-microsoft-active-directory
Add support for creating Managed Microsoft Active Directory and Directory Connectors in AWS
2016-01-13 13:39:29 -06:00
Paul Hinze 395b61825d Merge pull request #4654 from hashicorp/gofmts
Go fmt updates
2016-01-13 12:55:36 -06:00
Clint c9231a73ec Merge pull request #4240 from hashicorp/b-aws-catch-sg-name-id-error
provider/aws: Trap Instance error from mismatched SG IDs and Names
2016-01-13 11:57:58 -06:00
clint shryock f084871fad move the 'color' assignment 2016-01-13 11:16:36 -06:00
clint shryock aa7ba9ab9b provider/aws: OpsWorks updates
- add UseOpsworksSecurityGroups to the Create ops
- toggle waiting on said membership of groups
2016-01-13 11:13:09 -06:00
aibou 5e9c17d008 Implement some lacking parameters and stop waiting when in vpc and un-use opsworks default SG 2016-01-13 10:45:32 -06:00
clint shryock 73064bcb87 formatting 2016-01-13 10:10:15 -06:00
Johannes Boyne df7ac2d51b Add AWS lambda alias support and documentation 2016-01-13 10:05:32 -06:00
Koen De Causmaecker 45ef11e59f provider/aws: aws_db_instance: unrequire fields
When spinning up from a snapshot or a read replica, these fields are
now optional:
* allocated_storage
* engine
* password
* username

Some validation logic is added to make these fields required when
starting a database from scratch.
The documentation is updated accordingly.
2016-01-13 15:40:15 +01:00
Clint 5c3b88a0a7 Merge pull request #4140 from hashicorp/b-empty-element-sg
provider/aws: error with empty list item on security group
2016-01-12 17:03:02 -06:00
clint shryock 57b9097015 provider/aws: Default false for VPC Classic Link 2016-01-12 16:49:51 -06:00
Clint 90e5f5f655 Merge pull request #3994 from Pryz/master
Add AWS Classiclink for AWS VPC resource
2016-01-12 16:48:23 -06:00
clint shryock 317ab83743 Go fmt updates 2016-01-12 16:07:26 -06:00
Clint a5f8c39ddd Merge pull request #3332 from ross/aws-instance-migrate-nil-attr
Avoid nil map assign in aws instance migrateStateV0toV1
2016-01-12 15:55:16 -06:00
Clint 4f8e9713cf Merge pull request #3261 from fatih/show-instance-state
aws: store and read instance state
2016-01-12 11:06:30 -06:00
clint shryock ac60d6b959 provider/aws: Limit SNS Topic Subscription protocols
- update the ARN with the new ID
2016-01-12 09:57:09 -06:00
Clint a69df4b77c Merge pull request #4637 from discogestalt/aws-ap-northeast-2
provider/aws: Allow ap-northeast-2 (Seoul) as valid region
2016-01-11 16:50:55 -06:00
Mark Troyer b396bbb3e4 provider/aws: Allow ap-northeast-2 (Seoul) as valid region 2016-01-11 13:46:53 -08:00
Clint f0ef2c1a72 Merge pull request #4631 from wata727/add_new_parameter_elasticache
provider/aws: Add new parameter az_mode and availabiliy_zone(s) in ElastiCache
2016-01-11 15:46:04 -06:00
Paul Hinze 771fba4913 provider/aws: use random cert name in ELB test 2016-01-11 14:23:33 -06:00