Commit Graph

17898 Commits

Author SHA1 Message Date
clint shryock 95c58269b9 provider/aws: fix TestAccAWSCloudwatchLogSubscriptionFilter_basic by linking the name 2017-04-05 13:48:13 -05:00
clint shryock 403e48f1cf provider/aws: Randomize ElastiCache param group name. Fixes TestAccAWSElasticacheParameterGroupOnly,
TestAccAWSElasticacheParameterGroup_basic, TestAccAWSElasticacheParameterGroup_importBasic
2017-04-05 13:01:17 -05:00
Clint 114856ec9a Update CHANGELOG.md 2017-04-05 12:48:44 -05:00
Clint 66124fb343 provider/aws: Fix KMS Key reading with Exists method (#13348)
* provider/aws: Fix KMS Key reading with Exists method

Fixes #13322 by checking if the key Exists and offering to recreate if
not found, or pending delete

* remove redundant code
2017-04-05 12:48:11 -05:00
James Bardin 6e136c848a use the aws provider client initialization
Use the aws provider code to create the clients for the s3 backend, so
that all the behavior matches that of the provider.

Remove the fake creds from the test, as the aws provider will attempt to
validate them.
2017-04-05 12:39:50 -04:00
Martin Atkins 1eb744c6cf website: clarify some aspects of the aws_lambda_function docs
The docs on aws_lambda_function used some differing terminology to
what's currently used in the official AWS lambda docs, which
caused some confusion for users trying to use the Java runtime
where the "deployment package" is a JAR archive rather than a plain
zip file.

This change attempts to be consistent with the terminology used in the
AWS docs and also clarifies that the implementation now allows
source_code_hash to be used regardless of which deployment package
upload method is in use.

This fixes #12443.
2017-04-05 09:33:03 -07:00
Paul Stack 4a804db415 Update CHANGELOG.md 2017-04-05 19:29:32 +03:00
James Bardin 0ec2a5cfd3 add AWSClient methods to get s3 and dyndb conns
Add getters for the AWSClient s3.S3 and dynamodb.DynamoDB clients so the
s3 remote-state backend can use all the same initialization code as the
aws provider.
2017-04-05 12:29:25 -04:00
Paul Stack 6d9384aeeb provider/aws: Add support for evaluate_low_sample_count_percentiles to cloudwatch_metric_alarm (#13371)
```

```
2017-04-05 19:28:57 +03:00
= e2a1f5e25e Fixed TestAccAWSEcsDataSource_ecsTaskDefinition 2017-04-05 09:07:49 -06:00
Sander van Harmelen 815c085b8f Update CHANGELOG.md 2017-04-05 15:37:47 +02:00
Joakim Sernbrant b608f0beca provider/cloudstack: do not force a new resource when updating load balancer members (#11786) 2017-04-05 15:34:35 +02:00
James Bardin eeddc3f8ea add some nil checks for unexpected lock failures 2017-04-05 09:06:47 -04:00
Paul Stack c3bfbe6756 Update CHANGELOG.md 2017-04-05 15:18:19 +03:00
Paul Stack d938d263f6 provider/aws: Add support for treat_missing_data to cloudwatch_metric_alarm (#13358)
* provider/aws: Add support for treat_missing_data to cloudwatch_metric_alarm

Fixes: #13263

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSCloudWatchMetricAlarm'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/04/05 08:51:06 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSCloudWatchMetricAlarm -timeout 120m
=== RUN   TestAccAWSCloudWatchMetricAlarm_importBasic
--- PASS: TestAccAWSCloudWatchMetricAlarm_importBasic (23.93s)
=== RUN   TestAccAWSCloudWatchMetricAlarm_basic
--- PASS: TestAccAWSCloudWatchMetricAlarm_basic (27.81s)
=== RUN   TestAccAWSCloudWatchMetricAlarm_treatMissingData
--- PASS: TestAccAWSCloudWatchMetricAlarm_treatMissingData (43.39s)
=== RUN   TestAccAWSCloudWatchMetricAlarm_extendedStatistic
--- PASS: TestAccAWSCloudWatchMetricAlarm_extendedStatistic (26.80s)
=== RUN   TestAccAWSCloudWatchMetricAlarm_missingStatistic
--- PASS: TestAccAWSCloudWatchMetricAlarm_missingStatistic (5.95s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	127.899s
```

* provider/aws: Set cloudwatch_metric_alarm treamt_missing_data to missing

This follows what the AWS API does. We had to add a state migration for
this to make sure that the user doesn't see any unexpected activity on
their Terraform plans

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAWSCloudWatchMetricAlarmMigrateState'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/04/05 14:51:32 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAWSCloudWatchMetricAlarmMigrateState -timeout 120m
=== RUN   TestAWSCloudWatchMetricAlarmMigrateState
2017/04/05 14:52:13 [INFO] Found AWS CloudWatch Metric Alarm State v0; migrating to v1
2017/04/05 14:52:13 [DEBUG] Attributes before migration: map[string]string{}
2017/04/05 14:52:13 [DEBUG] Attributes after migration: map[string]string{"treat_missing_data":"missing"}
--- PASS: TestAWSCloudWatchMetricAlarmMigrateState (0.00s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	0.018s
```
2017-04-05 13:17:47 +01:00
Radek Simko 2dbde462fe Update CHANGELOG.md 2017-04-05 13:15:09 +01:00
Radek Simko cd79471ecb provider/aws: Increase Beanstalk 'ready' timeout (#13359) 2017-04-05 13:11:55 +01:00
Radek Simko 0bab530de2 Update CHANGELOG.md 2017-04-05 13:11:30 +01:00
Radek Simko affce99a8e provider/aws: Increase launch_configuration creation timeout (#13357) 2017-04-05 13:10:46 +01:00
Radek Simko ed5acac2b7 Update CHANGELOG.md 2017-04-05 13:10:25 +01:00
Radek Simko 77150880e0 provider/aws: Increase subnet deletion timeout (#13356) 2017-04-05 13:09:44 +01:00
Radek Simko 1c0cd0dd8f provider/aws: Fix wrong config in ES domain acceptance test (#13362) 2017-04-05 12:27:56 +01:00
Ringo De Smet 9ce2b12ec9 Document the `environment` attribute. (#13360)
The existence of the attribute is mentioned here already: https://www.terraform.io/docs/state/environments.html
2017-04-05 09:53:18 +01:00
Paul Stack 98623ecaed provider/aws: Bump SDK version to 1.8.8 (#13354) 2017-04-05 08:45:27 +01:00
Paul Stack 71c92fcc3f Update CHANGELOG.md 2017-04-05 06:49:58 +01:00
Paul Stack 5cad27bb2e provider/aws: Migrate aws_dms_* resources away from AWS waiters (#13291)
The AWS waiter package has changed location in the 1.8.0 version of the
SDK. DMS will need to mitigate a breaking change because of this

Between @radeksimko and myself, we think that we should migrate the DMS
resources to using the Terraform state refresh func pattern that is used
across the entire of the AWS provider. DMS is the *only* resource that
currently uses the AWS waiters, so the LOE to migrate is pretty low
2017-04-05 06:48:37 +01:00
Paul Stack a58aff4a0e Update CHANGELOG.md 2017-04-05 06:44:32 +01: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
Brandon Galbraith d310670550 Specify that only elastic load balancers can be defined for `load_balancers` (#13344) 2017-04-04 17:03:20 -05:00
Jake Champlin cc872f9132 Update CHANGELOG.md 2017-04-04 17:04:36 -04:00
Jake Champlin 74a53f71b1 Merge pull request #13261 from harijayms/whiskeyjay/9198fix
provider/azurerm: Fixing crash when importing Local Network Gateways #13301
2017-04-04 17:03:10 -04:00
James Bardin 37e2c23eb9 Merge pull request #13222 from hashicorp/jbardin/init-locks
Fix some backend locking issues
2017-04-04 16:53:21 -04:00
Martin Atkins f57cf5cc05 website: note that destroy provisioners can't run if resource removed
This addresses (via documentation) the issue raised in #13097.
2017-04-04 13:37:37 -07:00
Jake Champlin fed7b6e781 Merge pull request #13129 from tombuildsstuff/validation
provider/azurerm: Moving Reused JSON Validation -> Core
2017-04-04 16:11:13 -04:00
KensoDev 8ac077022e some comments explaining the reason 2017-04-04 13:02:05 -07:00
KensoDev 169afb2351 tag params as optional based on ELB type 2017-04-04 13:00:08 -07:00
Martin Atkins 9f9fac58e0 Update CHANGELOG.md 2017-04-04 12:17:20 -07:00
Martin Atkins 28d6d913e4 core: basic test of EvalVariableBlock
This previously lacked tests altogether. This new test verifies the
"happy path", ensuring that both literal and computed values pass through
correctly into the VariableValues map.
2017-04-04 12:16:19 -07:00
Martin Atkins c1c5c9a2f6 core: fix crash when computed nested map given in module block
This crash resulted because the type switch checked for either of two
types but the type assertion within it assumed only one of them.

A straightforward (if inelegant) fix is to simply duplicate the relevant
case block and change the type assertion, thus allowing the types to match
up in all cases.

This fixes #13297.
2017-04-04 12:16:19 -07:00
James Bardin fb4a365d12 noop migrate copy, add -lock and -input
A couple commits got rebased together here, and it's easier to enumerate
them in a single commit.

Skip copying of states during migration if they are the same state. This
can happen when trying to reconfigure a backend's options, or if the
state was manually transferred. This can fail unexpectedly with locking
enabled.

Honor the `-input` flag for all confirmations (the new test hit some
more). Also unify where we reference the Meta.forceInitCopy and transfer
the value to the existing backendMigrateOpts.force field.
2017-04-04 14:54:48 -04:00
James Bardin aad143b6d1 set stateLock to true when building meta flagSet
Any commands that use `stateLock` should have a flag to set that
value, but set a failsafe to true just in case.
2017-04-04 14:44:58 -04:00
James Bardin 54aa466b74 initialize the s3 lock path in one place 2017-04-04 14:44:58 -04:00
James Bardin 6980e14191 Update CHANGELOG.md 2017-04-04 14:32:34 -04:00
James Bardin d059939f88 Merge pull request #13262 from hashicorp/jbardin/lock-timeouts
lock timeouts
2017-04-04 14:30:20 -04:00
James Bardin 7cfb515a03 update command docs 2017-04-04 13:50:38 -04:00
Martin Atkins 736ad1e9d8 Update CHANGELOG.md 2017-04-04 10:33:36 -07:00
Martin Atkins dd8af65c82 core: Input walk shouldn't clobber dynamic provider config
During the input walk we stash the values resulting from user input
(if any) in the eval context for use when later walks need to resolve
the provider config.

However, this repository of input results is only able to represent
literal values, since it does not retain the record of which of the keys
have values that are "computed".

Previously we were blindly stashing all of the results, failing to
consider that some of them might be computed. That resulted in the
UnknownValue placeholder being misinterpreted as a literal value when
the data is used later, which ultimately resulted in it clobbering the
actual expression evaluation result and thus causing the provider to
fail to configure itself.

Now we are careful to only retain in this repository the keys whose values
are known statically during the input phase. This eventually gets merged
with the dynamic evaluation results on subsequent walks, with the dynamic
keys left untouched due to their absence from the stored input map.

This fixes #11264.
2017-04-04 10:31:42 -07:00
Matthew Frahry c3175a556f Merge pull request #13337 from hashicorp/p-aws-iam-keybase-test
Removed newline from keybase username
2017-04-04 09:55:39 -06:00
= 92e75ff2cb Removed newline from keybase username 2017-04-04 09:33:49 -06:00
Paul Stack 543c0f4144 Update CHANGELOG.md 2017-04-04 16:21:35 +01:00