Commit Graph

14404 Commits

Author SHA1 Message Date
Mitchell Hashimoto 25d19ef3d0 Merge pull request #10080 from hashicorp/f-tf-version
terraform: support version requirement in configuration
2016-11-14 11:53:30 -08:00
Mitchell Hashimoto df34fa88ce Merge pull request #10076 from hashicorp/f-depend-module
terraform: depends_on can reference entire modules
2016-11-14 11:53:12 -08:00
Mitchell Hashimoto e3a01ccfd8 Merge pull request #10072 from hashicorp/f-output-depends-on
terraform: output nodes can have `depends_on`
2016-11-14 11:52:18 -08:00
Mitchell Hashimoto 48295684ae Merge pull request #10106 from hashicorp/b-shadow-uuid
terraform: shadow errors with UUID() must be ignored
2016-11-14 11:45:04 -08:00
Mitchell Hashimoto aa5d16be79
terraform: shadow errors with UUID() must be ignored
People with `uuid()` usage in their configurations would receive shadow
errors every time on plan because the UUID would change.

This is hacky fix but I also believe correct: if a shadow error contains
uuid() then we ignore the shadow error completely. This feels wrong but
I'll explain why it is likely right:

The "right" feeling solution is to create deterministic random output
across graph runs. This would require using math/rand and seeding it
with the same value each run. However, this alone probably won't work
due to Terraform's parallelism and potential to call uuid() in different
orders. In addition to this, you can't seed crypto/rand and its unlikely
that we'll NEVER use crypto/rand in the future even if we switched
uuid() to use math/rand.

Therefore, the solution is simple: if there is no shadow error, no
problem. If there is a shadow error and it contains uuid(), then ignore
it.
2016-11-14 10:20:26 -08:00
Mitchell Hashimoto 9205d25d38 Merge pull request #10068 from hashicorp/b-destroy-edge
terraform: destroy edge must include resources through outputs
2016-11-14 09:34:36 -08:00
Mitchell Hashimoto 9e8f311df1
terraform: fix typo 2016-11-14 09:34:21 -08:00
James Bardin 9c83924a74 Merge pull request #10030 from hashicorp/jbardin/debug
debug: next steps
2016-11-14 12:15:16 -05:00
James Bardin 7e66df3290 Rename annotation methods
Change AnnotateVertex and AnnotateEdge to VertexDebugInfo EdgeDebugInfo
to avoid confusion between debug output and future graph annotations.
2016-11-14 11:06:52 -05:00
James Bardin f37b2fafed Remove sync.Once from dag.Graph
dag.Graph is used as a value, but contains a sync data structure. This
prevents copying the value, and is needed if one wants to upgrade a Graph
to an AcyclicGraph.

The sync.Once only guards the init() method, which can be guarded
internally with nil checks on the fields. The init method could be
removed entirely with a proper constructor later on of we so choose.
2016-11-14 08:52:18 -05:00
James Bardin 916d3522b1 Write debug info using Graph.AnnotateVertex 2016-11-14 08:52:18 -05:00
James Bardin 7bbd6bfbd7 Add methods to annotate Graph vertices and edges
The AnnotateVertex and AnnotateEdge Graph methods will allow terraform
to insert arbitray information into the encoded graph stream for later
processing.
2016-11-14 08:52:18 -05:00
James Bardin 6f9744292a Replace DebugGraphs with the Graph's methods
Now that the Graph can serialize itself, and log transformations,
there's no need for DebugGraph
2016-11-14 08:52:18 -05:00
James Bardin 82b1a2abc2 Add graph transformation recording
The external api provided here is simply
dag.Graph.SetDebugWriter(io.Writer). When a writer is provided to a
Graph, it will immediately encode itself to the stream, and subsequently
encode any additional transformations to the graph. This will allow
easier logging of graph transformations without writing complete graphs
to the logs at every step. Since the marshalGraph can also be dot
encoded, this will allow translation from the JSON logs to dot graphs.
2016-11-14 08:50:34 -05:00
James Bardin 6f347ebb3a Remove dot package
Unify all dot functionality in the dag package
2016-11-14 08:50:34 -05:00
James Bardin 8a5d71b0ac Implement dag.GraphNodeDotter (temporarily)
To maintain the same output, the Graph.Dot implementation needs to be
aware of GraphNodeDotter. Copy the interface into the dag package, and
make the Dot marshaler aware of which nodes implemented the interface.
This way we can remove most of the remaining dot code from terraform.
2016-11-14 08:50:34 -05:00
James Bardin 7b774f771b implement dag.Subgrapher interface
This allows the dag package to detect subgraphs, even when impelemnted
by types from other packages
2016-11-14 08:50:34 -05:00
James Bardin 28d406c040 Provider a marshaler for dag.Graph
The dot format generation was done with a mix of code from the terraform
package and the dot package. Unify the dot generation code, and it into
the dag package.

Use an intermediate structure to allow a dag.Graph to marshal itself
directly. This structure will be ablt to marshal directly to JSON, or be
translated to dot format. This was we can record more information about
the graph in the debug logs, and provide a way to translate those logged
structures to dot, which is convenient for viewing the graphs.
2016-11-14 08:50:33 -05:00
James Bardin bda84e03f7 Merge pull request #10032 from hashicorp/jbardin/vet
Fix future vet errors in providers
2016-11-14 08:49:16 -05:00
stack72 1b6db228d8
Merge branch 'samirageb-patch-1' 2016-11-14 13:26:36 +00:00
stack72 24348bad89
docs/remote_azure: Adding a note to the remote state docs about ENV VARs 2016-11-14 13:26:19 +00:00
Sami Rageb 861fd22cdd
Update Azure RM remote config documentation
Current documentation on azure backend examples leaves out a critical parameter required for remote config to work.
2016-11-14 13:26:19 +00:00
Paul Stack e7411891f4 Update CHANGELOG.md 2016-11-14 12:12:34 +00:00
Paul Stack ecb2b74c37 Merge pull request #9534 from Ninir/aws_apigw_deployment_date
provider/aws: 	Exposed aws_api_gateway_deployment.created_date attribute
2016-11-14 12:11:59 +00:00
Paul Stack 325a0bc0ee Update CHANGELOG.md 2016-11-14 12:10:01 +00:00
Paul Stack 24231333d3 Exposed AWS API GW REST Api created_date attribute (#9532) 2016-11-14 12:09:28 +00:00
Ninir a88b25cfcf Exposed AWS API GW REST Api created_date attribute 2016-11-14 11:56:41 +01:00
Ninir 6fb63f2854 Exposed aws_api_gateway_deployment.created_date attribute 2016-11-14 11:21:36 +01:00
Paul Stack 13512d3738 Update CHANGELOG.md 2016-11-14 10:04:22 +00:00
Ninir 932c92e4c6 Exposed aws_api_gateway_api_key created_date & last_updated_date (#9530) 2016-11-14 12:03:56 +02:00
Paul Stack ab03a50d92 Update CHANGELOG.md 2016-11-14 09:34:38 +00:00
Ninir d8e846c895 Fixed ##10079 exposing aws_iam_role create_date attribute (#10091) 2016-11-14 11:33:53 +02:00
Mitchell Hashimoto 0bb8ab9afb Merge pull request #10090 from hashicorp/b-update-hil
vendor: update HIL
2016-11-13 10:31:21 -08:00
Mitchell Hashimoto 15979435d6
config: update error string for new HIL merge 2016-11-13 10:28:31 -08:00
Mitchell Hashimoto 3c2e21701d
vendor: update HIL 2016-11-13 10:28:26 -08:00
Mitchell Hashimoto 15f07e0e50
website: correct description for Terraform section 2016-11-12 22:52:27 -08:00
Mitchell Hashimoto 0e2e19c784
website: document required_version 2016-11-12 22:50:28 -08:00
Mitchell Hashimoto 2c467e0f74
terraform: verify version requirements from configuration 2016-11-12 16:50:26 -08:00
Mitchell Hashimoto 85d3439fa0
config: parse and validate terraform.required_version 2016-11-12 16:22:35 -08:00
Mitchell Hashimoto 538302f143
terraform: resources nested within a module must also be depended on
For example: A => B => C (modules). If A depends on module B, then it
also must depend on everything in module C.
2016-11-12 15:38:28 -08:00
Mitchell Hashimoto bcfec4e24e
terraform: test that dependencies in the state are enough to maintain
order
2016-11-12 15:22:48 -08:00
Mitchell Hashimoto cfd3be4856
website: update website for "module.X" depends_on 2016-11-12 08:41:18 -08:00
Mitchell Hashimoto 22dd4303bc
terraform: tests for ReferenceMap for module paths 2016-11-12 08:24:09 -08:00
Mitchell Hashimoto 576b61a21d
config: validate depends_on with module values 2016-11-12 08:21:27 -08:00
Mitchell Hashimoto 0b87ef82c3
terraform: depends_on can reference entire modules 2016-11-12 08:07:45 -08:00
Mitchell Hashimoto 4f0ccd7794
website: update website to doc output depends_on 2016-11-11 18:17:46 -08:00
Mitchell Hashimoto 70a41c5e15
terraform: output nodes reference `depends_on` values 2016-11-11 18:16:04 -08:00
Mitchell Hashimoto 10426ba619
config: parse depends_on for outputs 2016-11-11 17:46:34 -08:00
Mitchell Hashimoto f6161a7dc9
terraform: destroy edge must include resources through outputs
This fixes: `TestContext2Apply_moduleDestroyOrder`

The new destroy graph wasn't properly creating edges that happened
_through_ an output, it was only created the edges for _direct_
dependents.

To fix this, the DestroyEdgeTransformer now creates the full transitive
list of destroy edges by walking all ancestors. This will create more
edges than are necessary but also will no longer miss resources through
an output.
2016-11-11 14:29:19 -08:00
Mitchell Hashimoto 8d993d9edd release: clean up after v0.8.0-beta1 2016-11-11 22:08:27 +00:00