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.
  1. 06 Apr, 2018 20 commits
    • James Bardin's avatar
      936ad25e
    • James Bardin's avatar
      update go-version · 2ab943fb
      James Bardin authored
      The latest go-version update properly handles pre-release versions in
      constraints.
      2ab943fb
    • Martin Atkins's avatar
      command: remove "terraform push" · 8c935328
      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.
      8c935328
    • Martin Atkins's avatar
      config/hcl2shim: don't put nils in ConfigValue maps · 26430a19
      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.
      26430a19
    • Martin Atkins's avatar
      tfdiags: Simple helper for creating "sourceless" diagnostics · b43690c0
      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.
      b43690c0
    • Martin Atkins's avatar
      tfdiags: helper functions for nicer display of cty.PathError · 3cc7343e
      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.
      3cc7343e
    • Martin Atkins's avatar
      tfdiags: Contextual diagnostics · f17a582d
      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.
      f17a582d
    • Martin Atkins's avatar
      80e83fed
    • James Bardin's avatar
      remove legacy remote state code · 6ed5d888
      James Bardin authored
      6ed5d888
    • James Bardin's avatar
      move artifactory remote state to backend · 39c83a29
      James Bardin authored
      39c83a29
    • James Bardin's avatar
      remove legacy remote file code · 15deef71
      James Bardin authored
      This code is not referenced at all
      15deef71
    • James Bardin's avatar
      move legacy http remote state to a backend · a7d8a9d5
      James Bardin authored
      a7d8a9d5
    • James Bardin's avatar
      remove dead legacy gcs code · bfb581f6
      James Bardin authored
      bfb581f6
    • James Bardin's avatar
      move legacy etcd remote state to a backend · 4f712b8d
      James Bardin authored
      4f712b8d
    • Martin Atkins's avatar
      command: "terraform validate" JSON support · a29cea92
      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.
      a29cea92
    • Martin Atkins's avatar
      command: beginnings of new config loader in "terraform validate" · 807887d7
      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.
      807887d7
    • Martin Atkins's avatar
      command: new Meta methods for accessing the new config loader · f66f7a54
      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.
      f66f7a54
    • Martin Atkins's avatar
      command/format: include source snippets in diagnostics · 51543686
      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.
      51543686
    • Martin Atkins's avatar
      Update CHANGELOG.md · 8a56db5f
      Martin Atkins authored
      8a56db5f
    • Martin Atkins's avatar
  2. 29 Mar, 2018 1 commit
  3. 28 Mar, 2018 8 commits
    • Martin Atkins's avatar
      Update CHANGELOG.md · d4eb6049
      Martin Atkins authored
      d4eb6049
    • Martin Atkins's avatar
      repl: fix formatting of list and map values · 56591281
      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.
      56591281
    • James Bardin's avatar
      Merge pull request #17700 from ScottWinkler/master · 68ff5f76
      James Bardin authored
      Fix scrub mistake
      68ff5f76
    • James Bardin's avatar
      Merge pull request #17711 from hashicorp/jbardin/cleanup-temps · 545e77e1
      James Bardin authored
      cleanup temp files
      545e77e1
    • James Bardin's avatar
      cleanup temp files from command tests · e9801564
      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.
      e9801564
    • James Bardin's avatar
      don't re-use a TempDir path · 15dc7572
      James Bardin authored
      Rather than creating and immediately removing a temp directory to get a
      random path name, fetch files into a subdirectory.
      15dc7572
    • James Bardin's avatar
      cleanup temp files from backend tests · 28c46d1a
      James Bardin authored
      28c46d1a
    • Martin Atkins's avatar
      website: Stronger statements on when to use named workspaces · 0a5059df
      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.
      0a5059df
  4. 27 Mar, 2018 1 commit
    • ScottWinkler's avatar
      Fix scrub mistake · f0439543
      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.
      f0439543
  5. 26 Mar, 2018 1 commit
  6. 23 Mar, 2018 9 commits