Commit Graph

14180 Commits

Author SHA1 Message Date
Mitchell Hashimoto b313e55fe7
v0.7.9 2016-11-04 16:31:49 +00:00
Mitchell Hashimoto 57c0cadc79 Merge pull request #9666 from hashicorp/jbardin/debug
preliminary debug output
2016-11-04 09:03:58 -07:00
James Bardin 60873827da re-add "Graph after..." logs 2016-11-04 12:03:16 -04:00
Mitchell Hashimoto fda3912a70
update CHANGELOG 2016-11-04 08:53:11 -07:00
Mitchell Hashimoto 125b7f4d44 Merge pull request #9806 from hashicorp/f-modify-aws-user-agent
provider/aws: Modify AWS User-Agent to new format
2016-11-04 08:50:15 -07:00
Mitchell Hashimoto 3a4a41327a
whitespace in CHANGELOG 2016-11-04 08:48:56 -07:00
Mitchell Hashimoto f6dacab0ba Merge pull request #9794 from hashicorp/b-partial-input
command/meta: always ask for unset variable input
2016-11-04 08:48:05 -07:00
Mitchell Hashimoto 260fb81373 Merge pull request #9795 from hashicorp/b-formatlist-empty
config: formatlist accepts an empty list
2016-11-04 08:47:57 -07:00
Mitchell Hashimoto f0abe6d1a0 Merge pull request #9812 from hashicorp/b-bool-computed-crash
helper/schema: computed bool fields should not crash
2016-11-04 08:47:49 -07:00
Mitchell Hashimoto 29287937e3 Merge pull request #9818 from hashicorp/b-var-parse
config: manually parse variable blocks for better validation
2016-11-04 08:47:40 -07:00
Mitchell Hashimoto 060ed2f708 Merge pull request #9823 from hashicorp/b-unnamed-output
config: validate that outputs have a name
2016-11-04 08:47:29 -07:00
Mitchell Hashimoto 85062d6c1f Merge pull request #9825 from hashicorp/b-conflictswith-computed
helper/schema: allow ConflictsWith and Computed Optional fields
2016-11-04 08:47:20 -07:00
Mitchell Hashimoto cda968a23a Merge pull request #9855 from hashicorp/b-shadow-err
command: show shadow errors to the user
2016-11-04 08:47:07 -07:00
James Bardin 1cea51a9fa Record walk order in the debug graph
Insert the walk order into the graph labels. Removed some extra debug
output.
2016-11-04 11:39:46 -04:00
James Bardin 354f04f104 Add some basic tests
Also make DebugHook noop when there is no debuginfo set
2016-11-04 11:39:46 -04:00
James Bardin 797a1b339d DebugInfo and DebugGraph
Implement debugInfo and the DebugGraph

DebugInfo will be a global variable through which graph debug
information can we written to a compressed archive. The DebugInfo
methods are all safe for concurrent use, and noop with a nil receiver.
The API outside of the terraform package will be to call SetDebugInfo
to create the archive, and CloseDebugInfo() to properly close the file.
Each write to the archive will be flushed and sync'ed individually, so
in the event of a crash or a missing call to Close, the archive can
still be recovered.

The DebugGraph is a representation of a terraform Graph to be written to
the debug archive, currently in dot format. The DebugGraph also contains
an internal buffer with Printf and Write methods to add to this buffer.
The buffer will be written to an accompanying file in the debug archive
along with the graph.

This also adds a GraphNodeDebugger interface. Any node implementing
`NodeDebug() string` can output information to annotate the debug graph
node, and add the data to the log. This interface may change or be
removed to provide richer options for debugging graph nodes.

The new graph builders all delegate the build to the BasicGraphBuilder.
Having a Name field lets us differentiate the actual builder
implementation in the debug graphs.
2016-11-04 11:30:51 -04:00
James Bardin 8d3e6f445f Add Bytes method to dot.Graph
This way we can feed the buffer output directly to an io.Writer
2016-11-04 11:30:51 -04:00
Joe Topjian 2305d64a3b Update CHANGELOG.md 2016-11-04 09:16:15 -06:00
Joe Topjian c3d6bdd440 Merge pull request #9834 from fatmcgav/openstack_firewall_rule_v1_add_value_specs
provider/openstack: Add 'value_specs' option to 'openstack_fw_rule_v1' resource
2016-11-04 09:14:19 -06:00
Clint abcc766344 Merge pull request #9871 from hashicorp/b-aws-opsworks-tests
provider/aws: Decouple and randomize OpsWorks test configs
2016-11-04 09:40:48 -05:00
clint shryock 639a088897 provider/aws: Decouple and randomize OpsWorks test configs 2016-11-04 09:33:07 -05:00
James Bardin 07ec946e7e Merge pull request #9853 from hashicorp/jbardin/cbd-datasource
fix CreateBeforeDestroy with datasources
2016-11-04 09:44:42 -04:00
James Nugent 95992e681e Update CHANGELOG.md 2016-11-04 07:51:09 -04:00
James Nugent c75369d65d Merge pull request #8359 from hashicorp/f-aws-acm-datasource
provider/aws: New Data Source: aws_acm_certificate
2016-11-04 07:49:58 -04:00
Simon Thulbourn 43c432dc08 Remove pkg from vendor 2016-11-04 11:33:44 +00:00
Simon Thulbourn 1ca1f86713 Remove sthulb/mine/multipart
This dep was meant as a stopgap for a patch in the stdlib of Go which I
wrote.

The patch was released in Go 1.7. We can now remove my fork and go back
to the stdlib
2016-11-04 11:23:21 +00:00
Gavin Williams e3246bc63e provider/openstack: Add 'value_specs' option to 'openstack_fw_rule_v1' resource.
Refactor to use common 'types.go' and 'MapValueSpecs' function.
Website docs updated.
2016-11-04 07:19:50 +00:00
Mitchell Hashimoto 24e5ea8952 Merge pull request #9860 from hashicorp/b-update-hcl
vendor: update HCL
2016-11-03 18:54:12 -07:00
Mitchell Hashimoto 429373c47c
vendor: update HCL 2016-11-03 18:46:27 -07:00
Mitchell Hashimoto dc754d8ebe Update CHANGELOG.md 2016-11-03 18:44:44 -07:00
Joe Topjian a598d36082 Update CHANGELOG.md 2016-11-03 19:36:06 -06:00
Joe Topjian 41adcb8388 Merge pull request #9832 from fatmcgav/openstack_fw_firewall_v1_admin_state_up_default
provider/openstack: resource_openstack_fw_firewall_v1 'admin_state_up' should default to 'true'
2016-11-03 19:35:10 -06:00
Mitchell Hashimoto d429e82661
command: show shadow errors to the user 2016-11-03 18:14:07 -07:00
James Nugent 3361047e38 provider/aws: Address acm_certificate review items 2016-11-03 20:01:46 -04:00
Paul Hinze ccd745c96f provider/aws: New Data Source: aws_acm_certificate
Use this data source to get the ARN of a certificate in AWS Certificate
Manager (ACM). The process of requesting and verifying a certificate in ACM
requires some manual steps, which means that Terraform cannot automate the
creation of ACM certificates. But using this data source, you can reference
them by domain without having to hard code the ARNs as input.

The acceptance test included requires an ACM certificate be pre-created
in and information about it passed in via environment variables. It's a
bit sad but there's really no other way to do it.
2016-11-03 19:34:19 -04:00
Paul Hinze 194d7c6168 vendor: Add acm library to aws-sdk-go 2016-11-03 19:32:39 -04:00
Paddy 7d06ea8449 Fix EBS block device hashing in spot fleet requests.
When computing the set key for an EBS block device, we were using
the wrong function; we had hashEphemeralBlockDevice instead of
hashEbsBlockDevice. This caused a panic by trying to access the
virtual_name attribute that will never be set for EBS block
devices.

To fix this, I switched to the hashEbsBlockDevice function, which
is already being used to compute a Set key in the Schema. But in
the default case, where the snapshot_id attribute isn't specified,
this also caused a panic. I updated the way the string to hash is
generated to check for the existence of the device_name and
snapshot_id attributes before we use them, to avoid panics when
these optional attributes aren't set.
2016-11-03 16:24:19 -07:00
Paddy 24dd4273c7 Add an acceptance test for adding EBS volumes to a spot fleet req
Spot fleet requests can have EBS volumes attached to them, and at
the moment we're getting reports that crashes can be experienced
with them. This adds an acceptance test that exercises creating
a Spot Fleet request that has a non-instance EBS volume attached.
This successfully reproduces the panic.
2016-11-03 16:19:50 -07:00
James Bardin 40886218d5 Add test fixture for new CBD ancestor fix
This test will fail with a cycle before we check ancestors for
CreateBeforeDestroy.
2016-11-03 18:31:25 -04:00
clint shryock 6244463ffb Merge branch 'master' of github.com:hashicorp/terraform
* 'master' of github.com:hashicorp/terraform:
  Docs typo - s/instaces/instances
  Update CHANGELOG.md
  terraform: shadow graph uses GraphWalkerPanicwrap to catch errors
  terraform: GraphWalkerPanicwrap catches panics during graph walks
2016-11-03 16:14:33 -05:00
clint shryock 92eb13e9ef provider/aws: update AWS documentation on -1 protocol for Security Groups 2016-11-03 16:14:28 -05:00
James Bardin cf3a259cd9 fix CreateBeforeDestroy with datasources
The graph transformation we implement around create_before_destroy
need to re-order all resources that depend on the create_before_destroy
resource. Up until now, we've requires that users mark all of these
resources as create_before_destroy. Data soruces however don't have a
lifecycle block for create_before_destroy, and could not be marked this
way.

This PR checks each DestroyNode that doesn't implement CreateBeforeDestroy
for any ancestors that do implement CreateBeforeDestroy. If there are
any, we inherit the behavior and re-order the graph as such.
2016-11-03 17:08:24 -04:00
Cameron Stokes 2478d0291e Docs typo - s/instaces/instances 2016-11-03 14:07:59 -07:00
Mitchell Hashimoto 7291376c2d Update CHANGELOG.md 2016-11-03 13:37:42 -07:00
Mitchell Hashimoto 230ea92dff Merge pull request #9852 from hashicorp/b-walker-panic
terraform: GraphWalkerPanicwrap to catch panics, shadow graph uses it
2016-11-03 13:09:19 -07:00
Mitchell Hashimoto 90bfff3026
terraform: shadow graph uses GraphWalkerPanicwrap to catch errors 2016-11-03 12:09:51 -07:00
Mitchell Hashimoto da508d6a8b
terraform: GraphWalkerPanicwrap catches panics during graph walks 2016-11-03 12:08:55 -07:00
Mitchell Hashimoto 68d99b6ef6 Update CHANGELOG.md 2016-11-03 10:41:44 -07:00
Mitchell Hashimoto c405a7a682 Merge pull request #9846 from hashicorp/b-provisioner-crash
terraform: new apply graph creates provisioners in modules
2016-11-03 10:41:11 -07:00
Mitchell Hashimoto d2e9c35007
terraform: new apply graph creates provisioners in modules
Fixes #9840

The new apply graph wasn't properly nesting provisioners. This resulted
in reading the provisioners being nil on apply in the shadow graph which
caused the crash in the above issue.

The actual cause of this is that the new graphs we're moving towards do
not have any "flattening" (they are flat to begin with): all modules are
in the root graph from the beginning of construction versus building a
number of different graphs and flattening them. The transform that adds
the provisioners wasn't modified to handle already-flat graphs and so
was only adding provisioners to the root module, not children.

The change modifies the `MissingProvisionerTransformer` (primarily) to
support already-flat graphs and add provisioners for all module levels.
Tests are there to cover this as well.

**NOTE:** This PR focuses on fixing that specific issue. I'm going to follow up
this PR with another PR that is more focused on being robust against
crashing (more nil checks, recover() for shadow graph, etc.). In the
interest of focus and keeping a PR reviewable this focuses only on the
issue itself.
2016-11-03 10:25:11 -07:00