machines
Fixes: #12898
The way aws_instance works is that we call the Create func then the
Update func then the Read func. The way the work to implement the change
to iam_instance_profile was added meant that when a machine was created
with an iam_instance_profile, it would then try and update that
iam_instance_profile because the state hadn't been updated at that point
We have changed the Update func to only check for the change to
iam_instance_profile when it *is an existing machine* - this will solve
the problem of those bringing up new machines and getting hit with the
permissions error
As requested, added a test that adds an IAM Instance Profile from
creation
```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSInstance_withIamInstanceProfile'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/21 17:51:32 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSInstance_withIamInstanceProfile -timeout 120m
=== RUN TestAccAWSInstance_withIamInstanceProfile
--- PASS: TestAccAWSInstance_withIamInstanceProfile (154.29s)
PASS
ok github.com/hashicorp/terraform/builtin/providers/aws 154.325s
```
* add option zone_id
- Ref: http://docs.idcf.jp/cloud/api/address/#listpublicipaddresses
* Exclusion of `network_id`, `vpc_id` and `zone_id`
* Revert "Exclusion of `network_id`, `vpc_id` and `zone_id`"
This reverts commit 9684c8b0b65b3353aea4e0bfbeaf21986282812b.
* remove zone_id from one of required option.
Adds support for `name_prefix` to the `aws_autoscaling_group` and `aws_elb` resources. Unfortunately when using `name_prefix` with `aws_elb`, this means that the specified prefix can only be a maximum of 6 characters in length. This is because the maximum length for an ELB name is 32 characters, and `resource.PrefixedUniqueId` generates a 26-character unique identifier. I was considering truncating the unique identifier to allow for a longer `name_prefix`, but I worried that doing so would increase the risk of collisions.
* Allow priority attribute of dnsimple_record to be set
Some DNS record types (like MX) allow a priority to specified, and the
ability to do so is important in many environments.
This diff will change dnsimple_record.priority from computed to
optional, allowing it to be used in terraform configs like so:
resource "dnsimple_record" "mx1" {
domain = "example.com"
name = ""
value = "mx1.example.com"
type = "MX"
priority = "1"
}
resource "dnsimple_record" "mx2" {
domain = "example.com"
name = ""
value = "mx2.example.com"
type = "MX"
priority = "2"
}
* mention new priority attribute of dnsimple_record
* add acceptance specs for creating/updating MX records at dnsimple
* Vendor update `github.com/circonus-labs/circonus-gometrics`
* Add the `statsd` check type to the `circonus_check` resource.
* Noop change: Alpha-sort members of maps, variables, and docs.
This will make it possible/easier to make decisions based on supported EC2 platforms (VPC and/or EC2 Classic)
in the context of any AWS resource which needs make such decisions.
Fixes: #12752
Weight was replaced with weighted_routing_policy in June 2016. But for
some reason we were still doing the following in the Read func:
```
d.Set("weight", -1)
```
As this field was removed, we shouldn't be setting it to state
Adds plan-level validation for both IPv4 and IPv6 CIDR Blocks in an AWS SecurityGroup resource, as well as the AWS Security Group Rule resource.
```
$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSecurityGroup_invalidCIDRBlock'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/16 11:32:54 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSSecurityGroup_invalidCIDRBlock -timeout 120m
=== RUN TestAccAWSSecurityGroup_invalidCIDRBlock
--- PASS: TestAccAWSSecurityGroup_invalidCIDRBlock (0.01s)
PASS
ok github.com/hashicorp/terraform/builtin/providers/aws 0.017s
```
```
$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSecurityGroupRule_ExpectInvalidCIDR'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/16 11:46:21 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSSecurityGroupRule_ExpectInvalidCIDR -timeout 120m
=== RUN TestAccAWSSecurityGroupRule_ExpectInvalidCIDR
--- PASS: TestAccAWSSecurityGroupRule_ExpectInvalidCIDR (0.01s)
PASS
ok github.com/hashicorp/terraform/builtin/providers/aws 0.016s
```