Commit Graph

3 Commits

Author SHA1 Message Date
Paul Stack 9fc577547c provider/aws: Fix the panic in ssm_association with parameters (#12215)
Fixes: #12205

You cannot use an index of an empty slide therefore, we got a panic as follows:

```
aws_ssm_association.foo: Creating...
  instance_id:              "" => "i-002f3898dc95350e7"
  name:                     "" => "test_document_association-%s"
  parameters.%:             "" => "2"
  parameters.directoryId:   "" => "d-926720980b"
  parameters.directoryName: "" => "corp.mydomain.com"
Error applying plan:

1 error(s) occurred:

* aws_ssm_association.foo: 1 error(s) occurred:

* aws_ssm_association.foo: unexpected EOF

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
panic: runtime error: index out of range
2017/02/23 21:41:45 [DEBUG] plugin: terraform-provider-aws:
2017/02/23 21:41:45 [DEBUG] plugin: terraform-provider-aws: goroutine 1419 [running]:
2017/02/23 21:41:45 [DEBUG] plugin: terraform-provider-aws: panic(0x1567480, 0xc42000c110)
2017/02/23 21:41:45 [DEBUG] plugin: terraform-provider-aws: 	/usr/local/Cellar/go/1.7.4_1/libexec/src/runtime/panic.go:500 +0x1a1
```
2017-02-23 22:22:14 +02:00
stack72 f9183da2e3
provider/aws: Changing the tests for `aws_ssm_association` to align with
us-west-2

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSSMAssociation_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/09/02 16:56:09 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v
-run=TestAccAWSSSMAssociation_ -timeout 120m
=== RUN   TestAccAWSSSMAssociation_basic
--- PASS: TestAccAWSSSMAssociation_basic (136.23s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    136.246s
```
2016-09-02 17:04:43 +03:00
liamjbennett e98e5fb017
provider/aws: add aws_ssm_association resource 2016-09-02 16:46:05 +03:00