This project is mirrored from https://:*****@github.com/hashicorp/terraform.git.
Pull mirroring failed .
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
Repository mirroring has been paused due to too many failed attempts. It can be resumed by a project maintainer.
- 06 Apr, 2018 20 commits
-
-
James Bardin authored
-
James Bardin authored
The latest go-version update properly handles pre-release versions in constraints.
-
Martin Atkins authored
The remote API this talks to will be going away very soon, before our next major release, and so we'll remove the command altogether in that release. This also removes the "encodeHCL" function, which was used only for adding a .tfvars-formatted file to the uploaded archive.
-
Martin Atkins authored
Absent values are omitted by the old code we are emulating in HCL, so we must do the same here in order to avoid breaking assumptions in the helper/schema layer.
-
Martin Atkins authored
While diagnostics are primarily designed for reporting problems in configuration, they can also be used for errors and warnings about the environment Terraform is running in, such as inability to reach a remote service, etc. Function Sourceless makes it easy to produce such diagnostics with the customary summary/detail structure. When these diagnostics are rendered they will have no source code snippet and will instead just include the English-language content.
-
Martin Atkins authored
cty doesn't have a native string representation of a cty.Path because it is the layer below any particular syntax, but up here in Terraform land we know that we use HCL native syntax and so we can format a string in a HCL-ish way for familiarity to the user. We'll use this form automatically when such an error is used directly as a diagnostic, but we also expose the function publicly so that other code that incorporates errors into diagnostic detail strings can apply the same formatting.
-
Martin Atkins authored
The usual usage of diagnostics requires us to pass around source location information to everywhere that might generate a diagnostic, and that is always the best way to get the most precise diagnostic source locations. However, it's impractical to require source location information to be retained in every Terraform subsystem, and so this new idea of "contextual diagnostics" allows us to separate the generation of a diagnostic from the resolution of its source location, instead resolving the location information as a post-processing step once the call stack unwinds to a place where there is enough context to find it. This is necessarily a less precise approach than reading the source ranges directly from the configuration AST, but gives us an alternative to no diagnostics at all in portions of Terraform where full location information is not available. This is a best-effort sort of thing which will get as precise as it can but may return a range in a parent block if the precise location of a particular attribute cannot be found. Diagnostics that rely on this mechanism should include some other contextual information in the detail message to make up for any loss of precision that results.
-
Martin Atkins authored
-
James Bardin authored
-
James Bardin authored
-
James Bardin authored
This code is not referenced at all
-
James Bardin authored
-
James Bardin authored
-
James Bardin authored
-
Martin Atkins authored
In the long run we'd like to offer machine-readable output for more commands, but for now we'll just start with a tactical feature in "terraform validate" since this is useful for automated testing scenarios, editor integrations, etc, and doesn't include any representations of types that are expected to have breaking changes in the near future.
-
Martin Atkins authored
As part of some light reorganization of our commands, this new implementation no longer does validation of variables and will thus avoid the need to spin up a fully-valid context. Instead, its focus is on validating the configuration itself, regardless of any variables, state, etc. This change anticipates us later adding a -validate-only flag to "terraform plan" which will then take over the related use-case of checking if a particular execution of Terraform is valid, _including_ the state, variables, etc. Although leaving variables out of validate feels pretty arbitrary today while all of the variable sources are local anyway, we have plans to allow per-workspace variables to be stored in the backend in future and at that point it will no longer be possible to fully validate variables without accessing the backend. The "terraform plan" command explicitly requires access to the backend, while "terraform validate" is now explicitly for local-only validation of a single module. In a future commit this will be extended to do basic type checking of the configuration based on provider schemas, etc.
-
Martin Atkins authored
We need to share a single config loader across all callers because that allows us to maintain the source code cache we'll use for snippets in error messages. Nothing calls this yet. Callers will be gradually updated away from Module and Config in subsequent commits.
-
Martin Atkins authored
If we get a diagnostic message that references a source range, and if the source code for the referenced file is available, we'll show a snippet of the source code with the source range highlighted. At the moment we have no cache of source code, so in practice this codepath can never be visited. Callers to format.Diagnostic will be gradually updated in subsequent commits.
-
Martin Atkins authored
-
Martin Atkins authored
-
- 29 Mar, 2018 1 commit
-
-
Adit Sarfaty authored
-
- 28 Mar, 2018 8 commits
-
-
Martin Atkins authored
-
Martin Atkins authored
The indent function was stripping out newlines, causing multi-element lists and maps to be rendered incorrectly. We were also not quoting strings in these nested structures, leading to weird behavior if any expression punctuation or newlines were present in these strings. This part of Terraform will get a more serious overhaul as part of switching to the new parser/interpreter implementation but this is a tactical fix to make the results of this command more usable in the short term.
-
James Bardin authored
Fix scrub mistake
-
James Bardin authored
cleanup temp files
-
James Bardin authored
Rather than try to modify all the hundreds of calls to the temp helper functions, and cleanup the temp files at every call site, have all tests work within a single temp directory that is removed at the end of TestMain.
-
James Bardin authored
Rather than creating and immediately removing a temp directory to get a random path name, fetch files into a subdirectory.
-
James Bardin authored
-
Martin Atkins authored
In an earlier commit we added the "Best Practices" situation to try to clarify the intended uses of named workspaces and to warn against using them as an alternative to system decomposition. However, the prior statement was cautious in its recommendations in the interests of being pragmatic, and as a result we've seen that users have in some cases misunderstood or disregarded these recommendations. The new "When to use Multiple Workspaces" section aims to be more explicit that having multiple separate Terraform configurations is the preferred solution for many use-cases, and that workspaces are intended for a more limited set of use-cases around convenient development and testing. It also emphasizes the analogy to version control branches that was just a footnote in the prior text, to help the reader become familiar with the concept by relating it to a concept and workflow they are hopefully already familiar with. This new section also attempts to provide a more elaborate description of the proposed alternative when the goal is system decomposition. In the long run some of this content would probably be better placed elsewhere since it is useful advice even for users who never discover named workspaces, but it can live here for the time being to limit the scope of this change until we are ready to make more comprehensive revisions to the docs in this area. Finally, the introductory documentation here is adjusted slightly in preparation for the intended future expansion of workspaces to include stored variable values and, for more tailored backends like Terraform Enterprise, a full log of prior operations. More revisions will be required to cover the specifics of this later, but this new framing will hopefully help users form a mental model of named workspaces that has room for these future enhancements and the corresponding concept in Terraform Enterprise, rather than our previous framing that workspaces are fundamentally just named states.
-
- 27 Mar, 2018 1 commit
-
-
ScottWinkler authored
Fixed a bug in which an example custom provider would be saved as "terraform-provider-custom-v0.0.1" instead of "terraform-provider-custom_v0.0.1". Not an issue when running the bundle on TFE, but a problem when trying to run a terraform bundle locally.
-
- 26 Mar, 2018 1 commit
-
-
Masayuki Morita authored
-
- 23 Mar, 2018 9 commits
-
-
AV Jafrey authored
-
James Bardin authored
clean up remote.Cmd api
-
Matthew Frahry authored
Cherry pick oraclepaas
-
Matthew Frahry authored
-
Matthew Frahry authored
-
Matthew Frahry authored
add oracle pass links
-
Chris Griggs authored
-
Chris Griggs authored
-
Matthew Frahry authored
-