Commit Graph

14097 Commits

Author SHA1 Message Date
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
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
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
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
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
Joe Topjian bf6852f38e Update CHANGELOG.md 2016-11-03 09:10:50 -06:00
Joe Topjian a8c750d4f7 Merge pull request #9830 from fatmcgav/openstack_fw_policy_shared_fix
provider/openstack: Don't default 'shared' value, instead only set if…
2016-11-03 09:08:52 -06:00
Andreas Heidoetting 1929fe76ff "aws_sns_topic_subscription" add notes and examples for cross account / region SNS topic to SQS queue subscription (#9838)
Based on https://github.com/hashicorp/terraform/issues/6909 I suggest adding information to the documentation about cross account / region SNS topic to SQS queue subscription.
2016-11-03 15:06:16 +00:00
Clint 751e7024de Merge pull request #9839 from hashicorp/b-aws-default-net-acl-docs
provider/aws: Fix documenation regarding default resources
2016-11-03 09:54:24 -05:00
Ninir d96a439029 Added missing argument for redshift cluster (#9831) 2016-11-03 14:47:19 +00:00
Joe Topjian 8a4690c014 Update CHANGELOG.md 2016-11-03 08:42:20 -06:00
Joe Topjian 7da8812b7e Merge pull request #9777 from fatmcgav/state_remote_swift_enhancements
state/remote/swift: Enhancements to support Openstack config
2016-11-03 08:39:36 -06:00
clint shryock 230a389b1a provider/aws: Fix documenation regarding default resources 2016-11-03 09:38:12 -05:00
Paul Stack b58bd71462 Update CHANGELOG.md 2016-11-03 13:22:27 +00:00
Paul Stack 1a7168a091 Update CHANGELOG.md 2016-11-03 13:09:33 +00:00
Justin Nauman 9e11b59814 provider/aws: aws_autoscaling_attachment resource (#9146)
* GH-8755 - Adding in support to attach ASG to ELB as independent action

* GH-8755 - Adding in docs

* GH-8755 - Adjusting attribute name and responding to other PR feedback
2016-11-03 13:08:49 +00:00
Gavin Williams ea9cc43578 provider/openstack: resource_openstack_fw_firewall_v1 'admin_state_up' should default to 'true' 2016-11-03 12:15:04 +00:00
Paul Stack c9526207eb Update CHANGELOG.md 2016-11-03 12:09:11 +00:00
stack72 359f9d0a83
Merge branch 'samdunne-postgresql-extensions' 2016-11-03 12:07:44 +00:00
stack72 f5cd90c13e
provider/postgresql: Fixing up the PG Extension test 2016-11-03 12:06:51 +00:00
stack72 16ce2c2e9c
Merge branch 'postgresql-extensions' of https://github.com/samdunne/terraform into samdunne-postgresql-extensions 2016-11-03 12:05:25 +00:00
Gavin Williams 53eea2121e provider/openstack: Don't default 'shared' value, instead only set if specified.
Documentation updated to reflect removal of default value.
Fixes #9829
2016-11-03 11:21:39 +00:00
Gavin Williams bf8612b9b7 state/remote/swift: Enhancements to support full set of Openstack configuration options, plus SSL certs. Documentation updated to support 2016-11-03 07:36:18 +00:00
Mitchell Hashimoto 6c801d0386
command/apply: add additional nil check to loading state for outputs 2016-11-02 22:33:49 -07:00
Joe Topjian 83e3fa2a33 Update CHANGELOG.md 2016-11-02 22:18:35 -06:00
Joe Topjian 866545738d Merge pull request #9769 from fatmcgav/state_remote_swift_updates
state/remote/swift: Updates
2016-11-02 22:16:54 -06:00
James Nugent 549993147f Merge pull request #9822 from hashicorp/paddy_8502_sni
provider/aws: Add the enable_sni attribute for Route53 health checks.
2016-11-02 23:38:01 -04:00
Paddy 5fcd5404ce Document the enable_sni attribute on the website.
Now that we've added an `enable_sni` attribute to the Route53
health checks, add it to the health check documentation page so
users know about it.
2016-11-02 16:32:27 -07:00
Paddy 42049e984f provider/aws: Add the enable_sni attribute for Route53 health checks.
In #8502 it was requested that we add support for the EnableSNI
parameter of Route53's health checks; this enables customers to
manually specify whether or not the health check will use SNI when
communicating with the endpoint.

The customer originally requested we default to `false`. While
implementing the issue, I discovered that when creating health
checks with a Type set to HTTP, Amazon's default value for EnableSNI
is `false`. However, when creating health checks with a Type set to
HTTPS, Amazon's default value is `true`. So rather than setting a
default value, I made the attribute computed.
2016-11-02 16:23:35 -07:00
Paul Stack 5527104112 Update CHANGELOG.md 2016-11-02 22:58:39 +00:00