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
Previously the check for if we are setting `CidrBlock` or `IPv6CidrBlock` during an `Update` of the `aws_network_acl` resource would populate the input struct with a nil string value `""`. This caused our acceptance tests to fail, and broke the resource's functionality if a user only set `CidrBlock` or `IPv6CidrBlock` for either an `ingress` or `egress` rule as the API would error out with an `Invalid CidrBlock` error.
Previously:
```
aws_network_acl.bond: Error creating egress entry: InvalidParameterValue: CIDR block is malformed
status code: 400, request id: 0620e0b7-4e30-4c14-9a7a-5d373cc9f33b
```
Currently:
```
$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSNetworkAcl'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/15 15:41:17 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSNetworkAcl -timeout 120m
=== RUN TestAccAWSNetworkAcl_importBasic
--- PASS: TestAccAWSNetworkAcl_importBasic (26.96s)
=== RUN TestAccAWSNetworkAclRule_basic
--- PASS: TestAccAWSNetworkAclRule_basic (23.08s)
=== RUN TestAccAWSNetworkAclRule_ipv6
--- PASS: TestAccAWSNetworkAclRule_ipv6 (26.24s)
=== RUN TestAccAWSNetworkAcl_EgressAndIngressRules
--- PASS: TestAccAWSNetworkAcl_EgressAndIngressRules (25.11s)
=== RUN TestAccAWSNetworkAcl_OnlyIngressRules_basic
--- PASS: TestAccAWSNetworkAcl_OnlyIngressRules_basic (31.82s)
=== RUN TestAccAWSNetworkAcl_OnlyIngressRules_update
--- PASS: TestAccAWSNetworkAcl_OnlyIngressRules_update (48.59s)
=== RUN TestAccAWSNetworkAcl_OnlyEgressRules
--- PASS: TestAccAWSNetworkAcl_OnlyEgressRules (25.48s)
=== RUN TestAccAWSNetworkAcl_SubnetChange
--- PASS: TestAccAWSNetworkAcl_SubnetChange (57.12s)
=== RUN TestAccAWSNetworkAcl_Subnets
--- PASS: TestAccAWSNetworkAcl_Subnets (67.55s)
=== RUN TestAccAWSNetworkAcl_ipv6Rules
--- PASS: TestAccAWSNetworkAcl_ipv6Rules (31.52s)
=== RUN TestAccAWSNetworkAcl_espProtocol
acc--- PASS: TestAccAWSNetworkAcl_espProtocol (24.37s)
PASS
ok github.com/hashicorp/terraform/builtin/providers/aws 387.855s
```
This was already marked as removed, but the way the provider handled it,
people were still being prompted for input anyways. This removes it from
the provider entirely, so people won't be prompted for input.
* Revert "datadog: Fix incorrect schema of monitor for 'silenced' (#12720)"
This reverts commit 8730bf125f.
* Revert "schema: Allow *Resource as Elem of TypeMap in validation (#12722)"
This reverts commit 1df1c21d5b.
* Revert "provider/alicloud: change create ecs postpaid instance API (#12226)"
This reverts commit ffc5a06cb5.
when creating IPs concurrently the Scaleway API starts to return 500 internal
server errors.
since the error goes away when limiting concurrent requests, as well as the fact that the golang net/http client is safe for concurrent use,
I'm assuming this is an API error on Scaleways side.
this CS introduces a workaround so terraform does not crash for now.
the work around needs to be removed once Scaleway fixes their API
Fixes: #11824
A full set of acceptance tests for *all* OpsWorks tests are below. There is a single issue, opsworks_instance isn't ordering the layer_ids so it's non-deterministic which can come back. This introduces a false positive.
The opsworks tests are running both against us-east-1 for some and us-west-2 for others. This must be marked as a backwards incompatibility in 0.9 just incase people are using the opsworks region parameter to try and override the provider region
```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSOpsworksApplication' 2 ↵ ✹
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/14 17:11:36 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSOpsworksApplication -timeout 120m
=== RUN TestAccAWSOpsworksApplication
--- PASS: TestAccAWSOpsworksApplication (164.29s)
PASS
ok github.com/hashicorp/terraform/builtin/providers/aws 164.319s
```
```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSOpsworksCustomLayer' ✹
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/14 17:16:18 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSOpsworksCustomLayer -timeout 120m
=== RUN TestAccAWSOpsworksCustomLayerImportBasic
--- PASS: TestAccAWSOpsworksCustomLayerImportBasic (105.98s)
=== RUN TestAccAWSOpsworksCustomLayer
--- PASS: TestAccAWSOpsworksCustomLayer (92.68s)
PASS
ok github.com/hashicorp/terraform/builtin/providers/aws 198.684s
```
```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSOpsworksPermission' ✹
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/14 17:23:28 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSOpsworksPermission -timeout 120m
=== RUN TestAccAWSOpsworksPermission
--- PASS: TestAccAWSOpsworksPermission (226.36s)
PASS
ok github.com/hashicorp/terraform/builtin/providers/aws 226.386s
```
```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSOpsworksRailsAppLayer' ✹
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/14 17:28:01 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSOpsworksRailsAppLayer -timeout 120m
=== RUN TestAccAWSOpsworksRailsAppLayer
--- PASS: TestAccAWSOpsworksRailsAppLayer (129.39s)
PASS
ok github.com/hashicorp/terraform/builtin/providers/aws 129.426s
```
```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSOpsworksUserProfile' ✹
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/14 17:37:46 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSOpsworksUserProfile -timeout 120m
=== RUN TestAccAWSOpsworksUserProfile
--- PASS: TestAccAWSOpsworksUserProfile (42.60s)
PASS
ok github.com/hashicorp/terraform/builtin/providers/aws 42.624s
```
```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSOpsworksStack' 2 ↵ ✹
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/14 18:00:50 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSOpsworksStack -timeout 120m
=== RUN TestAccAWSOpsworksStackImportBasic
--- PASS: TestAccAWSOpsworksStackImportBasic (50.28s)
=== RUN TestAccAWSOpsworksStackNoVpc
--- PASS: TestAccAWSOpsworksStackNoVpc (25.92s)
=== RUN TestAccAWSOpsworksStackVpc
--- PASS: TestAccAWSOpsworksStackVpc (76.80s)
PASS
ok github.com/hashicorp/terraform/builtin/providers/aws 153.025s
```
```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSOpsworksRdsDbInstance' ✹
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/14 17:38:36 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSOpsworksRdsDbInstance -timeout 120m
=== RUN TestAccAWSOpsworksRdsDbInstance
--- PASS: TestAccAWSOpsworksRdsDbInstance (916.15s)
PASS
ok github.com/hashicorp/terraform/builtin/providers/aws 916.177s
```
```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSOpsworksInstance' 2 ↵
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/14 17:26:45 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSOpsworksInstance -timeout 120m
=== RUN TestAccAWSOpsworksInstance_importBasic
--- PASS: TestAccAWSOpsworksInstance_importBasic (85.52s)
=== RUN TestAccAWSOpsworksInstance
--- FAIL: TestAccAWSOpsworksInstance (114.09s)
testing.go:268: Step 1 error: After applying this step, the plan was not empty:
DIFF:
UPDATE: aws_opsworks_instance.tf-acc
layer_ids.0: "4c29b76f-df72-409e-a5c4-9459b7d9b4a4" => "a4a859cf-2a07-447e-a151-a97a6d827db7"
layer_ids.1: "a4a859cf-2a07-447e-a151-a97a6d827db7" => "4c29b76f-df72-409e-a5c4-9459b7d9b4a4"
FAIL
exit status 1
FAIL github.com/hashicorp/terraform/builtin/providers/aws 199.643s
make: *** [testacc] Error 1
```
Fixes the two failing aws_ami acceptance tests, by polling until the AMI is deleted before exiting.
```
$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSAMI_basic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/14 16:03:26 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSAMI_basic -timeout 120m
=== RUN TestAccAWSAMI_basic
--- PASS: TestAccAWSAMI_basic (43.98s)
PASS
ok github.com/hashicorp/terraform/builtin/providers/aws 43.989s
```
```
$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSAMI_snapshotSize'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/14 16:07:29 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSAMI_snapshotSize -timeout 120m
=== RUN TestAccAWSAMI_snapshotSize
--- PASS: TestAccAWSAMI_snapshotSize (28.64s)
PASS
ok github.com/hashicorp/terraform/builtin/providers/aws 28.654s
```
* Add rancher_host resource type
This adds a rancher_host resource type.
For now, the goal is to detect if the host already exists,
so that it can be purged cleanly when the host is deprovisioned.
The typical use is to create both an instance (e.g. aws_instance)
and a rancher_host resources with the same hostname. The rancher_host
resource will detect when the agent has registered itself.
When removing the host, both the instance and the rancher_host
resources can be removed, ensuring the host is purged from Rancher.
In future versions, this could support creating hosts as well.
* Use ro_labels to avoid removing internal Rancher labels
As reported in https://github.com/rancher/rancher/issues/8165
* Do not ForceNew on environment_id
Allows the ssh-key test to pass when ran in parallel with different branches.
```
$ make testacc TEST=./builtin/providers/packet TESTARGS='-run=TestAccPacketSSHKey_Basic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/03/14 11:10:28 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/packet -v -run=TestAccPacketSSHKey_Basic -timeout 120m
=== RUN TestAccPacketSSHKey_Basic
PASS
ok github.com/hashicorp/terraform/builtin/providers/packet 3.503s
```
We're providing a local test server for the consul backends, so we might
as well use it to make the provider acceptance tests more relible as
well.
TODO: the TLS test doesn't actualy test anything other than the Config.
The tests have been modified to make it apparent that they aren't
connecting to the server at all.