diff --git a/vendor/github.com/hashicorp/terraform/CHANGELOG.md b/vendor/github.com/hashicorp/terraform/CHANGELOG.md index 9c789b85..44be0e0a 100644 --- a/vendor/github.com/hashicorp/terraform/CHANGELOG.md +++ b/vendor/github.com/hashicorp/terraform/CHANGELOG.md @@ -1,3 +1,280 @@ +## 0.10.6 (September 19, 2017) + +UPGRADE NOTES: + +* The internal storage of modules has changed in this release, so after + upgrading `terraform init` must be run to re-install modules in the new + on-disk format. The existing installed versions of modules will be ignored, + so the latest version of each module will be installed. + +IMPROVEMENTS: + +* cli: `terraform import` now accepts an option `-allow-missing-config` that overrides the default requirement that a configuration block must already be present for the resource being imported. ([#15876](https://github.com/hashicorp/terraform/issues/15876)) + +## 0.10.5 (September 14, 2017) + +NEW FEATURES: + +* config: `indent` interpolation function appends spaces to all but the first line of a multi-line string ([#15311](https://github.com/hashicorp/terraform/issues/15311)) + +IMPROVEMENTS: + +* cli: `terraform fmt` has a new option `-check` which makes it return a non-zero exit status if any formatting changes are required ([#15387](https://github.com/hashicorp/terraform/issues/15387)) +* cli: When [running Terraform in automation](https://www.terraform.io/guides/running-terraform-in-automation.html), a new environment variable `TF_IN_AUTOMATION` can be used to disable or adjust certain prompts that would normally include specific CLI commands to run. This assumes that the wrapping automation tool is providing its own UI for guiding the user through the workflow, and thus the standard advice would be redundant and/or confusing. ([#16059](https://github.com/hashicorp/terraform/issues/16059)) + +BUG FIXES: + +* cli: restore the "(forces new resource)" annotations on attributes that were inadvertently disabled in 0.10.4. ([#16067](https://github.com/hashicorp/terraform/issues/16067)) +* cli: fix regression with installing modules from git when the `GIT_SSH_COMMAND` environment variable is set ([#16099](https://github.com/hashicorp/terraform/issues/16099)) + +## 0.10.4 (September 6, 2017) + +IMPROVEMENTS: +* `terraform apply` now uses the standard resource address syntax to refer to resources in its log ([#15884](https://github.com/hashicorp/terraform/issues/15884)) +* `terraform plan` output has some minor adjustments to improve readability and accessibility for those who can't see its colors ([#15884](https://github.com/hashicorp/terraform/issues/15884)) + +BUG FIXES: + +* backend/consul: fix crash during consul backend initialization ([#15976](https://github.com/hashicorp/terraform/issues/15976)) +* backend/azurerm: ensure that blob storage metadata is preserved when updating state blobs, to avoid losing track of lock metadata ([#16015](https://github.com/hashicorp/terraform/issues/16015)) +* config: local values now work properly in resource `count` and in modules with more than one `.tf` file ([#15995](https://github.com/hashicorp/terraform/issues/15995)] [[#15982](https://github.com/hashicorp/terraform/issues/15982)) +* cli: removed some inconsistencies in how data sources are counted and tallied in plan vs. apply and apply vs. destroy. In particular, data sources are no longer incorrectly counted as destroyed in `terraform destroy` ([#15884](https://github.com/hashicorp/terraform/issues/15884)) + +## 0.10.3 (August 30, 2017) + +BACKWARDS INCOMPATIBILITIES / NOTES: + +* LGPL Dependencies Removed ([#15862](https://github.com/hashicorp/terraform/issues/15862)) + +NEW FEATURES: + +* **Local Values**: this new configuration language feature allows assigning a symbolic local name to an expression so it can be used multiple times in configuration without repetition. See [the documentation](https://github.com/hashicorp/terraform/blob/master/website/docs/configuration/locals.html.md) for how to define and use local values. ([#15449](https://github.com/hashicorp/terraform/issues/15449)) +* **`base64gzip` interpolation function**: compresses a string with gzip and then base64-encodes the result ([#3858](https://github.com/hashicorp/terraform/issues/3858)) +* **`flatten` interpolation function**: turns a list of lists, or list of lists of lists, etc into a flat list of primitive values ([#15278](https://github.com/hashicorp/terraform/issues/15278)) +* **`urlencode` interpolation function**: applies standard URL encoding to a string so that it can be embedded in a URL without making it invalid and without any of the characters being interpreted as part of the URL structure ([#15871](https://github.com/hashicorp/terraform/issues/15871)) +* **`salt-masterless` provisioner**: runs Salt in masterless mode on a target server ([#14720](https://github.com/hashicorp/terraform/issues/14720)) + +IMPROVEMENTS: + +* config: The `jsonencode` interpolation function now accepts nested list and map structures, where before it would accept only strings, lists of strings, and maps of strings. ([#14884](https://github.com/hashicorp/terraform/issues/14884)) +* cli: The "creation complete" (and similar) messages from `terraform apply` now include a total elapsed time for each operation. ([#15548](https://github.com/hashicorp/terraform/issues/15548)) +* cli: Module installation (with either `terraform init` or `terraform get`) now detects and recursively initializes submodules when the source is a git repository. ([#15891](https://github.com/hashicorp/terraform/issues/15891)) +* cli: Modules can now be installed from `.tar.xz` archives, in addition to the existing `.tar.gz`, `.tar.bz2` and `.zip`. ([#15891](https://github.com/hashicorp/terraform/issues/15891)) +* provisioner/local-exec: now possible to specify a custom "interpreter", overriding the default of either `bash -c` (on Unix) or `cmd.exe /C` (on Windows) ([#15166](https://github.com/hashicorp/terraform/issues/15166)) +* backend/consul: can now set the path to a specific CA certificate file, client certificate file, and client key file that will be used when configuring the underlying Consul client. ([#15405](https://github.com/hashicorp/terraform/issues/15405)) +* backend/http: now has optional support for locking, with special support from the target server. Additionally, the update operation can now optionally be implemented via `PUT` rather than `POST`. ([#15793](https://github.com/hashicorp/terraform/issues/15793)) +* helper/resource: Add `TestStep.SkipFunc` ([#15957](https://github.com/hashicorp/terraform/issues/15957)) + +BUG FIXES: + +* cli: `terraform init` now verifies the required Terraform version from the root module config. Previously this was verified only on subsequent commands, after initialization. ([#15935](https://github.com/hashicorp/terraform/issues/15935)) +* cli: `terraform validate` now consults `terraform.tfvars`, if present, to set variable values. This is now consistent with the behavior of other commands. ([#15938](https://github.com/hashicorp/terraform/issues/15938)) + +## 0.10.2 (August 16, 2017) + +BUG FIXES: + +* tools/terraform-bundle: Add missing Ui to ProviderInstaller (fix crash) ([#15826](https://github.com/hashicorp/terraform/issues/15826)) +* go-plugin: don't crash when server emits non-key-value JSON ([go-plugin#43](https://github.com/hashicorp/go-plugin/pull/43)) + +## 0.10.1 (August 15, 2017) + +BUG FIXES: + +* Fix `terraform state rm` and `mv` commands to work correctly with remote state backends ([#15652](https://github.com/hashicorp/terraform/issues/15652)) +* Fix errors when interpolations fail during input ([#15780](https://github.com/hashicorp/terraform/issues/15780)) +* Backoff retries in remote-execution provisioner ([#15772](https://github.com/hashicorp/terraform/issues/15772)) +* Load plugins from `~/.terraform.d/plugins/OS_ARCH/` and `.terraformrc` ([#15769](https://github.com/hashicorp/terraform/issues/15769)) +* The `import` command was ignoring the remote state configuration ([#15768](https://github.com/hashicorp/terraform/issues/15768)) +* Don't allow leading slashes in s3 bucket names for remote state ([#15738](https://github.com/hashicorp/terraform/issues/15738)) + +IMPROVEMENTS: + +* helper/schema: Add `GetOkExists` schema function ([#15723](https://github.com/hashicorp/terraform/issues/15723)) +* helper/schema: Make 'id' a reserved field name ([#15695](https://github.com/hashicorp/terraform/issues/15695)) +* command/init: Display version + source when initializing plugins ([#15804](https://github.com/hashicorp/terraform/issues/15804)) + +INTERNAL CHANGES: + +* DiffFieldReader.ReadField caches results to optimize deeply nested schemas ([#15663](https://github.com/hashicorp/terraform/issues/15663)) + + +## 0.10.0 (August 2, 2017) + +**This is the complete 0.9.11 to 0.10.0 CHANGELOG** + +BACKWARDS INCOMPATIBILITIES / NOTES: + +* A new flag `-auto-approve` has been added to `terraform apply`. This flag controls whether an interactive approval is applied before + making the changes in the plan. For now this flag defaults to `true` to preserve previous behavior, but this will become the new default + in a future version. We suggest that anyone running `terraform apply` in wrapper scripts or automation refer to the upgrade guide to learn + how to prepare such wrapper scripts for the later breaking change. +* The `validate` command now checks that all variables are specified by default. The validation will fail by default if that's not the + case. ([#13872](https://github.com/hashicorp/terraform/issues/13872)) +* `terraform state rm` now requires at least one argument. Previously, calling it with no arguments would remove all resources from state, + which is consistent with the other `terraform state` commands but unlikely enough that we considered it better to be inconsistent here to + reduce the risk of accidentally destroying the state. +* Terraform providers are no longer distributed as part of the main Terraform distribution. Instead, they are installed automatically as + part of running `terraform init`. It is therefore now mandatory to run `terraform init` before any other operations that use provider + plugins, to ensure that the required plugins are installed and properly initialized. +* The `terraform env` family of commands have been renamed to `terraform workspace`, in response to feedback that the previous naming was + confusing due to collisions with other concepts of the same name. The commands still work the same as they did before, and the `env` + subcommand is still supported as an alias for backward compatibility. The `env` subcommand will be removed altogether in a future release, + so it's recommended to update any automation or wrapper scripts that use these commands. +* The `terraform init` subcommand no longer takes a SOURCE argument to copy to the current directory. The behavior has been changed to match + that of `plan` and `apply`, so that a configuration can be provided as an argument on the commandline while initializing the current + directory. If a module needs to be copied into the current directory before initialization, it will have to be done manually. +* The `-target` option available on several Terraform subcommands has changed behavior and **now matches potentially more resources**. In + particular, given an option `-target=module.foo`, resources in any descendent modules of `foo` will also be targeted, where before this + was not true. After upgrading, be sure to look carefully at the set of changes proposed by `terraform plan` when using `-target` to ensure + that the target is being interpreted as expected. Note that the `-target` argument is offered for exceptional circumstances only and is + not intended for routine use. +* The `import` command requires that imported resources be specified in the configuration file. Previously, users were encouraged to import + a resource and _then_ write the configuration block for it. This creates the risk that users could import a resource and subsequently + create no configuration for it, which results in Terraform deleting the resource. If the imported resource is not present in the + configuration file, the `import` command will fail. + +FEATURES: + +* **Separate Provider Releases:** Providers are now released independently from Terraform. +* **Automatic Provider Installation:** The required providers will be automatically installed during `terraform init`. +* **Provider Constraints:** Provider are now versioned, and version constraints may be declared in the configuration. + +PROVIDERS: + +* Providers now maintain their own CHANGELOGs in their respective repositories: [terraform-providers](https://github.com/terraform-providers) + +IMPROVEMENTS: + +* cli: Add a `-from-module` flag to `terraform init` to re-introduce the legacy `terraform init` behavior of fetching a module. ([#15666](https://github.com/hashicorp/terraform/issues/15666)) +* backend/s3: Add `workspace_key_prefix` to allow a user-configurable prefix for workspaces in the S3 Backend. ([#15370](https://github.com/hashicorp/terraform/issues/15370)) +* cli: `terraform apply` now has an option `-auto-approve=false` that produces an interactive prompt to approve the generated plan. This will become the default workflow in a future Terraform version. ([#7251](https://github.com/hashicorp/terraform/issues/7251)) +* cli: `terraform workspace show` command prints the current workspace name in a way that's more convenient for processing in wrapper scripts. ([#15157](https://github.com/hashicorp/terraform/issues/15157)) +* cli: `terraform state rm` will now generate an error if no arguments are passed, whereas before it treated it as an open resource address selecting _all_ resources ([#15283](https://github.com/hashicorp/terraform/issues/15283)) +* cli: Files in the config directory ending in `.auto.tfvars` are now loaded automatically (in lexicographical order) in addition to the single `terraform.tfvars` file that auto-loaded previously. ([#13306](https://github.com/hashicorp/terraform/issues/13306)) +* Providers no longer in the main Terraform distribution; installed automatically by init instead ([#15208](https://github.com/hashicorp/terraform/issues/15208)) +* cli: `terraform env` command renamed to `terraform workspace` ([#14952](https://github.com/hashicorp/terraform/issues/14952)) +* cli: `terraform init` command now has `-upgrade` option to download the latest versions (within specified constraints) of modules and provider plugins. +* cli: The `-target` option to various Terraform operation can now target resources in descendent modules. ([#15314](https://github.com/hashicorp/terraform/issues/15314)) +* cli: Minor updates to `terraform plan` output: use standard resource address syntax, more visually-distinct `-/+` actions, and more ([#15362](https://github.com/hashicorp/terraform/issues/15362)) +* config: New interpolation function `contains`, to find if a given string exists in a list of strings. ([#15322](https://github.com/hashicorp/terraform/issues/15322)) + +BUG FIXES: + +* provisioner/chef: fix panic ([#15617](https://github.com/hashicorp/terraform/issues/15617)) +* Don't show a message about the path to the state file if the state is remote ([#15435](https://github.com/hashicorp/terraform/issues/15435)) +* Fix crash when `terraform graph` is run with no configuration ([#15588](https://github.com/hashicorp/terraform/issues/15588)) +* Handle correctly the `.exe` suffix on locally-compiled provider plugins on Windows systems. ([#15587](https://github.com/hashicorp/terraform/issues/15587)) +* config: Fixed a parsing issue in the interpolation language HIL that was causing misinterpretation of literal strings ending with escaped backslashes ([#15415](https://github.com/hashicorp/terraform/issues/15415)) +* core: the S3 Backend was failing to remove the state file checksums from DynamoDB when deleting a workspace ([#15383](https://github.com/hashicorp/terraform/issues/15383)) +* core: Improved reslience against crashes for a certain kind of inconsistency in the representation of list values in state. ([#15390](https://github.com/hashicorp/terraform/issues/15390)) +* core: Display correct to and from backends in copy message when migrating to new remote state ([#15318](https://github.com/hashicorp/terraform/issues/15318)) +* core: Fix a regression from 0.9.6 that was causing the tally of resources to create to be double-counted sometimes in the plan output ([#15344](https://github.com/hashicorp/terraform/issues/15344)) +* cli: the state `rm` and `mv` commands were always loading a state from a Backend, and ignoring the `-state` flag ([#15388](https://github.com/hashicorp/terraform/issues/15388)) +* cli: certain prompts in `terraform init` were respecting `-input=false` but not the `TF_INPUT` environment variable ([#15391](https://github.com/hashicorp/terraform/issues/15391)) +* state: Further work, building on [#15423](https://github.com/hashicorp/terraform/issues/15423), to improve the internal design of the state managers to make this code more maintainable and reduce the risk of regressions; this may lead to slight changes to the number of times Terraform writes to remote state and how the serial is implemented with respect to those writes, which does not affect outward functionality but is worth noting if you log or inspect state updates for debugging purposes. +* config: Interpolation function `cidrhost` was not correctly calcluating host addresses under IPv6 CIDR prefixes ([#15321](https://github.com/hashicorp/terraform/issues/15321)) +* provisioner/chef: Prevent a panic while trying to read the connection info ([#15271](https://github.com/hashicorp/terraform/issues/15271)) +* provisioner/file: Refactor the provisioner validation function to prevent false positives ([#15273](https://github.com/hashicorp/terraform/issues/15273)) + +INTERNAL CHANGES: + +* helper/schema: Actively disallow reserved field names in schema ([#15522](https://github.com/hashicorp/terraform/issues/15522)) +* helper/schema: Force field names to be alphanum lowercase + underscores ([#15562](https://github.com/hashicorp/terraform/issues/15562)) + + +## 0.10.0-rc1 to 0.10.0 (August 2, 2017) + +BUG FIXES: + +* provisioner/chef: fix panic ([#15617](https://github.com/hashicorp/terraform/issues/15617)) + +IMPROVEMENTS: + +* cli: Add a `-from-module` flag to `terraform init` to re-introduce the legacy `terraform init` behavior of fetching a module. ([#15666](https://github.com/hashicorp/terraform/issues/15666)) + + +## 0.10.0-rc1 (July 19, 2017) + +BUG FIXES: + +* Don't show a message about the path to the state file if the state is remote ([#15435](https://github.com/hashicorp/terraform/issues/15435)) +* Fix crash when `terraform graph` is run with no configuration ([#15588](https://github.com/hashicorp/terraform/issues/15588)) +* Handle correctly the `.exe` suffix on locally-compiled provider plugins on Windows systems. ([#15587](https://github.com/hashicorp/terraform/issues/15587)) + +INTERNAL CHANGES: + +* helper/schema: Actively disallow reserved field names in schema ([#15522](https://github.com/hashicorp/terraform/issues/15522)) +* helper/schema: Force field names to be alphanum lowercase + underscores ([#15562](https://github.com/hashicorp/terraform/issues/15562)) + +## 0.10.0-beta2 (July 6, 2017) + +BACKWARDS INCOMPATIBILITIES / NOTES: + +* A new flag `-auto-approve` has been added to `terraform apply`. This flag controls whether an interactive approval is applied before making the changes in the plan. For now this flag defaults to `true` to preserve previous behavior, but this will become the new default in a future version. We suggest that anyone running `terraform apply` in wrapper scripts or automation refer to the upgrade guide to learn how to prepare such wrapper scripts for the later breaking change. +* The `validate` command now checks that all variables are specified by default. + The validation will fail by default if that's not the case. ([#13872](https://github.com/hashicorp/terraform/issues/13872)) +* `terraform state rm` now requires at least one argument. Previously, calling it with no arguments would remove all resources from state, which is consistent with the other `terraform state` commands but unlikely enough that we considered it better to be inconsistent here to reduce the risk of accidentally destroying the state. + +IMPROVEMENTS: + +* backend/s3: Add `workspace_key_prefix` to allow a user-configurable prefix for workspaces in the S3 Backend. ([#15370](https://github.com/hashicorp/terraform/issues/15370)) +* cli: `terraform apply` now has an option `-auto-approve=false` that produces an interactive prompt to approve the generated plan. This will become the default workflow in a future Terraform version. ([#7251](https://github.com/hashicorp/terraform/issues/7251)) +* cli: `terraform workspace show` command prints the current workspace name in a way that's more convenient for processing in wrapper scripts. ([#15157](https://github.com/hashicorp/terraform/issues/15157)) +* cli: `terraform state rm` will now generate an error if no arguments are passed, whereas before it treated it as an open resource address selecting _all_ resources ([#15283](https://github.com/hashicorp/terraform/issues/15283)) +* cli: Files in the config directory ending in `.auto.tfvars` are now loaded automatically (in lexicographical order) in addition to the single `terraform.tfvars` file that auto-loaded previously. ([#13306](https://github.com/hashicorp/terraform/issues/13306)) + +BUG FIXES: + +* config: Fixed a parsing issue in the interpolation language HIL that was causing misinterpretation of literal strings ending with escaped backslashes ([#15415](https://github.com/hashicorp/terraform/issues/15415)) +* core: the S3 Backend was failing to remove the state file checksums from DynamoDB when deleting a workspace ([#15383](https://github.com/hashicorp/terraform/issues/15383)) +* core: Improved reslience against crashes for a certain kind of inconsistency in the representation of list values in state. ([#15390](https://github.com/hashicorp/terraform/issues/15390)) +* core: Display correct to and from backends in copy message when migrating to new remote state ([#15318](https://github.com/hashicorp/terraform/issues/15318)) +* core: Fix a regression from 0.9.6 that was causing the tally of resources to create to be double-counted sometimes in the plan output ([#15344](https://github.com/hashicorp/terraform/issues/15344)) +* cli: the state `rm` and `mv` commands were always loading a state from a Backend, and ignoring the `-state` flag ([#15388](https://github.com/hashicorp/terraform/issues/15388)) +* cli: certain prompts in `terraform init` were respecting `-input=false` but not the `TF_INPUT` environment variable ([#15391](https://github.com/hashicorp/terraform/issues/15391)) +* state: Further work, building on [#15423](https://github.com/hashicorp/terraform/issues/15423), to improve the internal design of the state managers to make this code more maintainable and reduce the risk of regressions; this may lead to slight changes to the number of times Terraform writes to remote state and how the serial is implemented with respect to those writes, which does not affect outward functionality but is worth noting if you log or inspect state updates for debugging purposes. + +## 0.10.0-beta1 (June 22, 2017) + +BACKWARDS INCOMPATIBILITIES / NOTES: + +* Terraform providers are no longer distributed as part of the main Terraform distribution. Instead, they are installed automatically + as part of running `terraform init`. It is therefore now mandatory to run `terraform init` before any other operations that use + provider plugins, to ensure that the required plugins are installed and properly initialized. +* The `terraform env` family of commands have been renamed to `terraform workspace`, in response to feedback that the previous naming + was confusing due to collisions with other concepts of the same name. The commands still work the same as they did before, and + the `env` subcommand is still supported as an alias for backward compatibility. The `env` subcommand will be removed altogether in + a future release, so it's recommended to update any automation or wrapper scripts that use these commands. +* The `terraform init` subcommand no longer takes a SOURCE argument to copy to the current directory. The behavior has + been changed to match that of `plan` and `apply`, so that a configuration can be provided as an argument on the + commandline while initializing the current directory. If a module needs to be copied into the current directory before + initialization, it will have to be done manually. +* The `-target` option available on several Terraform subcommands has changed behavior and **now matches potentially more resources**. + In particular, given an option `-target=module.foo`, resources in any descendent modules of `foo` will also be targeted, where before + this was not true. After upgrading, be sure to look carefully at the set of changes proposed by `terraform plan` when using `-target` + to ensure that the target is being interpreted as expected. Note that the `-target` argument is offered for exceptional circumstances + only and is not intended for routine use. +* The `import` command requires that imported resources be specified in the configuration file. Previously, users were encouraged to + import a resource and _then_ write the configuration block for it. This creates the risk that users could import a resource and + subsequently create no configuration for it, which results in Terraform deleting the resource. If the imported resource is not + present in the configuration file, the `import` command will fail. + +IMPROVEMENTS: + +* Providers no longer in the main Terraform distribution; installed automatically by init instead ([#15208](https://github.com/hashicorp/terraform/issues/15208)) +* cli: `terraform env` command renamed to `terraform workspace` ([#14952](https://github.com/hashicorp/terraform/issues/14952)) +* cli: `terraform init` command now has `-upgrade` option to download the latest versions (within specified constraints) of modules and provider plugins. +* cli: The `-target` option to various Terraform operation can now target resources in descendent modules. ([#15314](https://github.com/hashicorp/terraform/issues/15314)) +* cli: Minor updates to `terraform plan` output: use standard resource address syntax, more visually-distinct `-/+` actions, and more ([#15362](https://github.com/hashicorp/terraform/issues/15362)) +* config: New interpolation function `contains`, to find if a given string exists in a list of strings. ([#15322](https://github.com/hashicorp/terraform/issues/15322)) + +BUG FIXES: + +* config: Interpolation function `cidrhost` was not correctly calcluating host addresses under IPv6 CIDR prefixes ([#15321](https://github.com/hashicorp/terraform/issues/15321)) +* provisioner/chef: Prevent a panic while trying to read the connection info ([#15271](https://github.com/hashicorp/terraform/issues/15271)) +* provisioner/file: Refactor the provisioner validation function to prevent false positives ([#15273](https://github.com/hashicorp/terraform/issues/15273)) + ## 0.9.11 (Jul 3, 2017) BUG FIXES: @@ -16,8 +293,8 @@ BUG FIXES: BUG FIXES: -* provisioner/file: Refactor the provisioner validation function to prevent false positives ([#15273](https://github.com/hashicorp/terraform/issues/15273)) -* provisioner/chef: Prevent a panic while trying to read the connection info ([#15271](https://github.com/hashicorp/terraform/issues/15271)) + * provisioner/file: Refactor the provisioner validation function to prevent false positives ([#15273](https://github.com/hashicorp/terraform/issues/15273))) + * provisioner/chef: Prevent a panic while trying to read the connection info ([#15271](https://github.com/hashicorp/terraform/issues/15271))) ## 0.9.8 (June 7, 2017) @@ -491,7 +768,7 @@ BUG FIXES: BACKWARDS INCOMPATIBILITIES / NOTES: * provider/aws: Fix a critical bug in `aws_emr_cluster` in order to preserve the ordering - of any arguments in `bootstrap_action`. Terraform will now enforce the ordering + of any arguments in `bootstrap_action`. Terraform will now enforce the ordering from the configuration. As a result, `aws_emr_cluster` resources may need to be recreated, as there is no API to update them in-place ([#13580](https://github.com/hashicorp/terraform/issues/13580)) diff --git a/vendor/github.com/hashicorp/terraform/Dockerfile b/vendor/github.com/hashicorp/terraform/Dockerfile new file mode 100644 index 00000000..3863822c --- /dev/null +++ b/vendor/github.com/hashicorp/terraform/Dockerfile @@ -0,0 +1,24 @@ +# This Dockerfile builds on golang:alpine by building Terraform from source +# using the current working directory. +# +# This produces a docker image that contains a working Terraform binary along +# with all of its source code, which is what gets released on hub.docker.com +# as terraform:full. The main releases (terraform:latest, terraform:light and +# the release tags) are lighter images including only the officially-released +# binary from releases.hashicorp.com; these are built instead from +# scripts/docker-release/Dockerfile-release. + +FROM golang:alpine +MAINTAINER "HashiCorp Terraform Team " + +RUN apk add --update git bash openssh + +ENV TF_DEV=true +ENV TF_RELEASE=1 + +WORKDIR $GOPATH/src/github.com/hashicorp/terraform +COPY . . +RUN /bin/bash scripts/build.sh + +WORKDIR $GOPATH +ENTRYPOINT ["terraform"] diff --git a/vendor/github.com/hashicorp/terraform/Makefile b/vendor/github.com/hashicorp/terraform/Makefile index 0eba369d..e5ca1dfb 100644 --- a/vendor/github.com/hashicorp/terraform/Makefile +++ b/vendor/github.com/hashicorp/terraform/Makefile @@ -1,4 +1,4 @@ -TEST?=$$(go list ./... | grep -v '/terraform/vendor/' | grep -v '/builtin/bins/') +TEST?=./... GOFMT_FILES?=$$(find . -name '*.go' | grep -v vendor) default: test vet @@ -20,17 +20,6 @@ dev: fmtcheck generate quickdev: generate @TF_DEV=1 sh -c "'$(CURDIR)/scripts/build.sh'" -# Shorthand for quickly building the core of Terraform. Note that some -# changes will require a rebuild of everything, in which case the dev -# target should be used. -core-dev: generate - go install -tags 'core' github.com/hashicorp/terraform - -# Shorthand for quickly testing the core of Terraform (i.e. "not providers") -core-test: generate - @echo "Testing core packages..." && \ - go test -tags 'core' $(TESTARGS) $(shell go list ./... | grep -v -E 'terraform/(builtin|vendor)') - # Shorthand for building and installing just one plugin for local testing. # Run as (for example): make plugin-dev PLUGIN=provider-aws plugin-dev: generate @@ -38,10 +27,11 @@ plugin-dev: generate mv $(GOPATH)/bin/$(PLUGIN) $(GOPATH)/bin/terraform-$(PLUGIN) # test runs the unit tests -test: fmtcheck errcheck generate +# we run this one package at a time here because running the entire suite in +# one command creates memory usage issues when running in Travis-CI. +test: fmtcheck generate go test -i $(TEST) || exit 1 - echo $(TEST) | \ - xargs -t -n4 go test $(TESTARGS) -timeout=60s -parallel=4 + go list $(TEST) | xargs -t -n4 go test $(TESTARGS) -timeout=60s -parallel=4 # testacc runs acceptance tests testacc: fmtcheck generate @@ -75,8 +65,8 @@ cover: # vet runs the Go source code static analysis tool `vet` to find # any common errors. vet: - @echo 'go vet $$(go list ./... | grep -v /terraform/vendor/)' - @go vet $$(go list ./... | grep -v /terraform/vendor/) ; if [ $$? -eq 1 ]; then \ + @echo 'go vet ./...' + @go vet ./... ; if [ $$? -eq 1 ]; then \ echo ""; \ echo "Vet found suspicious constructs. Please check the reported constructs"; \ echo "and fix them if necessary before submitting the code for review."; \ @@ -89,7 +79,7 @@ generate: @which stringer > /dev/null; if [ $$? -ne 0 ]; then \ go get -u golang.org/x/tools/cmd/stringer; \ fi - go generate $$(go list ./... | grep -v /terraform/vendor/) + go generate ./... @go fmt command/internal_plugin_list.go > /dev/null fmt: @@ -98,9 +88,6 @@ fmt: fmtcheck: @sh -c "'$(CURDIR)/scripts/gofmtcheck.sh'" -errcheck: - @sh -c "'$(CURDIR)/scripts/errcheck.sh'" - vendor-status: @govendor status @@ -109,4 +96,4 @@ vendor-status: # under parallel conditions. .NOTPARALLEL: -.PHONY: bin core-dev core-test cover default dev errcheck fmt fmtcheck generate plugin-dev quickdev test-compile test testacc testrace tools vendor-status vet +.PHONY: bin cover default dev fmt fmtcheck generate plugin-dev quickdev test-compile test testacc testrace tools vendor-status vet diff --git a/vendor/github.com/hashicorp/terraform/README.md b/vendor/github.com/hashicorp/terraform/README.md index 351cf0e8..03f8be85 100644 --- a/vendor/github.com/hashicorp/terraform/README.md +++ b/vendor/github.com/hashicorp/terraform/README.md @@ -3,9 +3,10 @@ Terraform - Website: https://www.terraform.io - [![Gitter chat](https://badges.gitter.im/hashicorp-terraform/Lobby.png)](https://gitter.im/hashicorp-terraform/Lobby) +[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fhashicorp%2Fterraform.svg?type=shield)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fhashicorp%2Fterraform?ref=badge_shield) - Mailing list: [Google Groups](http://groups.google.com/group/terraform-tool) -![Terraform](https://rawgithub.com/hashicorp/terraform/master/website/source/assets/images/logo-hashicorp.svg) +Terraform Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. Terraform can manage existing and popular service providers as well as custom in-house solutions. @@ -24,14 +25,22 @@ For more information, see the [introduction section](http://www.terraform.io/int Getting Started & Documentation ------------------------------- -All documentation is available on the [Terraform website](http://www.terraform.io). +If you're new to Terraform and want to get started creating infrastructure, please checkout our [Getting Started](https://www.terraform.io/intro/getting-started/install.html) guide, available on the [Terraform website](http://www.terraform.io). + +All documentation is available on the [Terraform website](http://www.terraform.io): + + - [Intro](https://www.terraform.io/intro/index.html) + - [Docs](https://www.terraform.io/docs/index.html) Developing Terraform -------------------- -If you wish to work on Terraform itself or any of its built-in providers, you'll first need [Go](http://www.golang.org) installed on your machine (version 1.8+ is *required*). Alternatively, you can use the Vagrantfile in the root of this repo to stand up a virtual machine with the appropriate dev tooling already set up for you. +If you wish to work on Terraform itself or any of its built-in providers, you'll first need [Go](http://www.golang.org) installed on your machine (version 1.9+ is *required*). Alternatively, you can use the Vagrantfile in the root of this repo to stand up a virtual machine with the appropriate dev tooling already set up for you. + +This repository contains only Terraform core, which includes the command line interface and the main graph engine. Providers are implemented as plugins that each have their own repository in [the `terraform-providers` organization](https://github.com/terraform-providers) on GitHub. Instructions for developing each provider are in the associated README file. For more information, see [the provider development overview](https://www.terraform.io/docs/plugins/provider.html). -For local dev first make sure Go is properly installed, including setting up a [GOPATH](http://golang.org/doc/code.html#GOPATH). You will also need to add `$GOPATH/bin` to your `$PATH`. +For local development of Terraform core, first make sure Go is properly installed and that a +[GOPATH](http://golang.org/doc/code.html#GOPATH) has been set. You will also need to add `$GOPATH/bin` to your `$PATH`. Next, using [Git](https://git-scm.com/), clone this repository into `$GOPATH/src/github.com/hashicorp/terraform`. All the necessary dependencies are either vendored or automatically installed, so you just need to type `make`. This will compile the code and then run the tests. If this exits with exit status 0, then everything is working! @@ -56,16 +65,10 @@ $ make test TEST=./terraform ... ``` -If you're working on a specific provider and only wish to rebuild that provider, you can use the `plugin-dev` target. For example, to build only the Azure provider: +If you're working on a specific provider which has not been separated into an individual repository and only wish to rebuild that provider, you can use the `plugin-dev` target. For example, to build only the Test provider: ```sh -$ make plugin-dev PLUGIN=provider-azure -``` - -If you're working on the core of Terraform, and only wish to rebuild that without rebuilding providers, you can use the `core-dev` target. It is important to note that some types of changes may require both core and providers to be rebuilt - for example work on the RPC interface. To build just the core of Terraform: - -```sh -$ make core-dev +$ make plugin-dev PLUGIN=provider-test ``` ### Dependencies @@ -162,3 +165,7 @@ For example, run the following command to build terraform in a linux-based conta ```sh docker run --rm -v $(pwd):/go/src/github.com/hashicorp/terraform -w /go/src/github.com/hashicorp/terraform -e XC_OS=darwin -e XC_ARCH=amd64 golang:latest bash -c "apt-get update && apt-get install -y zip && make bin" ``` + + +## License +[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fhashicorp%2Fterraform.svg?type=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fhashicorp%2Fterraform?ref=badge_large) diff --git a/vendor/github.com/hashicorp/terraform/Vagrantfile b/vendor/github.com/hashicorp/terraform/Vagrantfile index 36833186..d140efb9 100644 --- a/vendor/github.com/hashicorp/terraform/Vagrantfile +++ b/vendor/github.com/hashicorp/terraform/Vagrantfile @@ -5,7 +5,7 @@ VAGRANTFILE_API_VERSION = "2" # Software version variables -GOVERSION = "1.8.1" +GOVERSION = "1.9" UBUNTUVERSION = "16.04" # CPU and RAM can be adjusted depending on your system diff --git a/vendor/github.com/hashicorp/terraform/commands.go b/vendor/github.com/hashicorp/terraform/commands.go index 409f4d85..80cf878b 100644 --- a/vendor/github.com/hashicorp/terraform/commands.go +++ b/vendor/github.com/hashicorp/terraform/commands.go @@ -8,6 +8,11 @@ import ( "github.com/mitchellh/cli" ) +// runningInAutomationEnvName gives the name of an environment variable that +// can be set to any non-empty value in order to suppress certain messages +// that assume that Terraform is being run from a command prompt. +const runningInAutomationEnvName = "TF_IN_AUTOMATION" + // Commands is the mapping of all the available Terraform commands. var Commands map[string]cli.CommandFactory var PlumbingCommands map[string]struct{} @@ -29,10 +34,18 @@ func init() { Ui: &cli.BasicUi{Writer: os.Stdout}, } + var inAutomation bool + if v := os.Getenv(runningInAutomationEnvName); v != "" { + inAutomation = true + } + meta := command.Meta{ - Color: true, - ContextOpts: &ContextOpts, - Ui: Ui, + Color: true, + GlobalPluginDirs: globalPluginDirs(), + PluginOverrides: &PluginOverrides, + Ui: Ui, + + RunningInAutomation: inAutomation, } // The command list is included in the terraform -help @@ -71,32 +84,37 @@ func init() { }, "env": func() (cli.Command, error) { - return &command.EnvCommand{ - Meta: meta, + return &command.WorkspaceCommand{ + Meta: meta, + LegacyName: true, }, nil }, "env list": func() (cli.Command, error) { - return &command.EnvListCommand{ - Meta: meta, + return &command.WorkspaceListCommand{ + Meta: meta, + LegacyName: true, }, nil }, "env select": func() (cli.Command, error) { - return &command.EnvSelectCommand{ - Meta: meta, + return &command.WorkspaceSelectCommand{ + Meta: meta, + LegacyName: true, }, nil }, "env new": func() (cli.Command, error) { - return &command.EnvNewCommand{ - Meta: meta, + return &command.WorkspaceNewCommand{ + Meta: meta, + LegacyName: true, }, nil }, "env delete": func() (cli.Command, error) { - return &command.EnvDeleteCommand{ - Meta: meta, + return &command.WorkspaceDeleteCommand{ + Meta: meta, + LegacyName: true, }, nil }, @@ -148,6 +166,12 @@ func init() { }, nil }, + "providers": func() (cli.Command, error) { + return &command.ProvidersCommand{ + Meta: meta, + }, nil + }, + "push": func() (cli.Command, error) { return &command.PushCommand{ Meta: meta, @@ -194,6 +218,42 @@ func init() { }, nil }, + "workspace": func() (cli.Command, error) { + return &command.WorkspaceCommand{ + Meta: meta, + }, nil + }, + + "workspace list": func() (cli.Command, error) { + return &command.WorkspaceListCommand{ + Meta: meta, + }, nil + }, + + "workspace select": func() (cli.Command, error) { + return &command.WorkspaceSelectCommand{ + Meta: meta, + }, nil + }, + + "workspace show": func() (cli.Command, error) { + return &command.WorkspaceShowCommand{ + Meta: meta, + }, nil + }, + + "workspace new": func() (cli.Command, error) { + return &command.WorkspaceNewCommand{ + Meta: meta, + }, nil + }, + + "workspace delete": func() (cli.Command, error) { + return &command.WorkspaceDeleteCommand{ + Meta: meta, + }, nil + }, + //----------------------------------------------------------- // Plumbing //----------------------------------------------------------- @@ -228,13 +288,17 @@ func init() { "state rm": func() (cli.Command, error) { return &command.StateRmCommand{ - Meta: meta, + StateMeta: command.StateMeta{ + Meta: meta, + }, }, nil }, "state mv": func() (cli.Command, error) { return &command.StateMvCommand{ - Meta: meta, + StateMeta: command.StateMeta{ + Meta: meta, + }, }, nil }, diff --git a/vendor/github.com/hashicorp/terraform/config.go b/vendor/github.com/hashicorp/terraform/config.go index d0df909a..d9391c3c 100644 --- a/vendor/github.com/hashicorp/terraform/config.go +++ b/vendor/github.com/hashicorp/terraform/config.go @@ -6,17 +6,9 @@ import ( "io/ioutil" "log" "os" - "os/exec" - "path/filepath" - "strings" - "github.com/hashicorp/go-plugin" "github.com/hashicorp/hcl" "github.com/hashicorp/terraform/command" - tfplugin "github.com/hashicorp/terraform/plugin" - "github.com/hashicorp/terraform/terraform" - "github.com/kardianos/osext" - "github.com/mitchellh/cli" ) // Config is the structure of the configuration for the Terraform CLI. @@ -35,8 +27,9 @@ type Config struct { // can be overridden by user configurations. var BuiltinConfig Config -// ContextOpts are the global ContextOpts we use to initialize the CLI. -var ContextOpts terraform.ContextOpts +// PluginOverrides are paths that override discovered plugins, set from +// the config file. +var PluginOverrides command.PluginOverrides // ConfigFile returns the default path to the configuration file. // @@ -85,88 +78,6 @@ func LoadConfig(path string) (*Config, error) { return &result, nil } -// Discover plugins located on disk, and fall back on plugins baked into the -// Terraform binary. -// -// We look in the following places for plugins: -// -// 1. Terraform configuration path -// 2. Path where Terraform is installed -// 3. Path where Terraform is invoked -// -// Whichever file is discoverd LAST wins. -// -// Finally, we look at the list of plugins compiled into Terraform. If any of -// them has not been found on disk we use the internal version. This allows -// users to add / replace plugins without recompiling the main binary. -func (c *Config) Discover(ui cli.Ui) error { - // Look in ~/.terraform.d/plugins/ - dir, err := ConfigDir() - if err != nil { - log.Printf("[ERR] Error loading config directory: %s", err) - } else { - if err := c.discover(filepath.Join(dir, "plugins")); err != nil { - return err - } - } - - // Next, look in the same directory as the Terraform executable, usually - // /usr/local/bin. If found, this replaces what we found in the config path. - exePath, err := osext.Executable() - if err != nil { - log.Printf("[ERR] Error loading exe directory: %s", err) - } else { - if err := c.discover(filepath.Dir(exePath)); err != nil { - return err - } - } - - // Finally look in the cwd (where we are invoke Terraform). If found, this - // replaces anything we found in the config / install paths. - if err := c.discover("."); err != nil { - return err - } - - // Finally, if we have a plugin compiled into Terraform and we didn't find - // a replacement on disk, we'll just use the internal version. Only do this - // from the main process, or the log output will break the plugin handshake. - if os.Getenv("TF_PLUGIN_MAGIC_COOKIE") == "" { - for name, _ := range command.InternalProviders { - if path, found := c.Providers[name]; found { - // Allow these warnings to be suppressed via TF_PLUGIN_DEV=1 or similar - if os.Getenv("TF_PLUGIN_DEV") == "" { - ui.Warn(fmt.Sprintf("[WARN] %s overrides an internal plugin for %s-provider.\n"+ - " If you did not expect to see this message you will need to remove the old plugin.\n"+ - " See https://www.terraform.io/docs/internals/internal-plugins.html", path, name)) - } - } else { - cmd, err := command.BuildPluginCommandString("provider", name) - if err != nil { - return err - } - c.Providers[name] = cmd - } - } - for name, _ := range command.InternalProvisioners { - if path, found := c.Provisioners[name]; found { - if os.Getenv("TF_PLUGIN_DEV") == "" { - ui.Warn(fmt.Sprintf("[WARN] %s overrides an internal plugin for %s-provisioner.\n"+ - " If you did not expect to see this message you will need to remove the old plugin.\n"+ - " See https://www.terraform.io/docs/internals/internal-plugins.html", path, name)) - } - } else { - cmd, err := command.BuildPluginCommandString("provisioner", name) - if err != nil { - return err - } - c.Provisioners[name] = cmd - } - } - } - - return nil -} - // Merge merges two configurations and returns a third entirely // new configuration with the two merged. func (c1 *Config) Merge(c2 *Config) *Config { @@ -196,173 +107,3 @@ func (c1 *Config) Merge(c2 *Config) *Config { return &result } - -func (c *Config) discover(path string) error { - var err error - - if !filepath.IsAbs(path) { - path, err = filepath.Abs(path) - if err != nil { - return err - } - } - - err = c.discoverSingle( - filepath.Join(path, "terraform-provider-*"), &c.Providers) - if err != nil { - return err - } - - err = c.discoverSingle( - filepath.Join(path, "terraform-provisioner-*"), &c.Provisioners) - if err != nil { - return err - } - - return nil -} - -func (c *Config) discoverSingle(glob string, m *map[string]string) error { - matches, err := filepath.Glob(glob) - if err != nil { - return err - } - - if *m == nil { - *m = make(map[string]string) - } - - for _, match := range matches { - file := filepath.Base(match) - - // If the filename has a ".", trim up to there - if idx := strings.Index(file, "."); idx >= 0 { - file = file[:idx] - } - - // Look for foo-bar-baz. The plugin name is "baz" - parts := strings.SplitN(file, "-", 3) - if len(parts) != 3 { - continue - } - - log.Printf("[DEBUG] Discovered plugin: %s = %s", parts[2], match) - (*m)[parts[2]] = match - } - - return nil -} - -// ProviderFactories returns the mapping of prefixes to -// ResourceProviderFactory that can be used to instantiate a -// binary-based plugin. -func (c *Config) ProviderFactories() map[string]terraform.ResourceProviderFactory { - result := make(map[string]terraform.ResourceProviderFactory) - for k, v := range c.Providers { - result[k] = c.providerFactory(v) - } - - return result -} - -func (c *Config) providerFactory(path string) terraform.ResourceProviderFactory { - // Build the plugin client configuration and init the plugin - var config plugin.ClientConfig - config.Cmd = pluginCmd(path) - config.HandshakeConfig = tfplugin.Handshake - config.Managed = true - config.Plugins = tfplugin.PluginMap - client := plugin.NewClient(&config) - - return func() (terraform.ResourceProvider, error) { - // Request the RPC client so we can get the provider - // so we can build the actual RPC-implemented provider. - rpcClient, err := client.Client() - if err != nil { - return nil, err - } - - raw, err := rpcClient.Dispense(tfplugin.ProviderPluginName) - if err != nil { - return nil, err - } - - return raw.(terraform.ResourceProvider), nil - } -} - -// ProvisionerFactories returns the mapping of prefixes to -// ResourceProvisionerFactory that can be used to instantiate a -// binary-based plugin. -func (c *Config) ProvisionerFactories() map[string]terraform.ResourceProvisionerFactory { - result := make(map[string]terraform.ResourceProvisionerFactory) - for k, v := range c.Provisioners { - result[k] = c.provisionerFactory(v) - } - - return result -} - -func (c *Config) provisionerFactory(path string) terraform.ResourceProvisionerFactory { - // Build the plugin client configuration and init the plugin - var config plugin.ClientConfig - config.HandshakeConfig = tfplugin.Handshake - config.Cmd = pluginCmd(path) - config.Managed = true - config.Plugins = tfplugin.PluginMap - client := plugin.NewClient(&config) - - return func() (terraform.ResourceProvisioner, error) { - rpcClient, err := client.Client() - if err != nil { - return nil, err - } - - raw, err := rpcClient.Dispense(tfplugin.ProvisionerPluginName) - if err != nil { - return nil, err - } - - return raw.(terraform.ResourceProvisioner), nil - } -} - -func pluginCmd(path string) *exec.Cmd { - cmdPath := "" - - // If the path doesn't contain a separator, look in the same - // directory as the Terraform executable first. - if !strings.ContainsRune(path, os.PathSeparator) { - exePath, err := osext.Executable() - if err == nil { - temp := filepath.Join( - filepath.Dir(exePath), - filepath.Base(path)) - - if _, err := os.Stat(temp); err == nil { - cmdPath = temp - } - } - - // If we still haven't found the executable, look for it - // in the PATH. - if v, err := exec.LookPath(path); err == nil { - cmdPath = v - } - } - - // No plugin binary found, so try to use an internal plugin. - if strings.Contains(path, command.TFSPACE) { - parts := strings.Split(path, command.TFSPACE) - return exec.Command(parts[0], parts[1:]...) - } - - // If we still don't have a path, then just set it to the original - // given path. - if cmdPath == "" { - cmdPath = path - } - - // Build the command to execute the plugin - return exec.Command(cmdPath) -} diff --git a/vendor/github.com/hashicorp/terraform/config_unix.go b/vendor/github.com/hashicorp/terraform/config_unix.go index 4694d511..d28d7492 100644 --- a/vendor/github.com/hashicorp/terraform/config_unix.go +++ b/vendor/github.com/hashicorp/terraform/config_unix.go @@ -5,7 +5,6 @@ package main import ( "bytes" "errors" - "log" "os" "os/exec" "path/filepath" @@ -33,7 +32,12 @@ func configDir() (string, error) { func homeDir() (string, error) { // First prefer the HOME environmental variable if home := os.Getenv("HOME"); home != "" { - log.Printf("[DEBUG] Detected home directory from env var: %s", home) + + // FIXME: homeDir gets called from globalPluginDirs during init, before + // the logging is setup. We should move meta initializtion outside of + // init, but in the meantime we just need to silence this output. + //log.Printf("[DEBUG] Detected home directory from env var: %s", home) + return home, nil } diff --git a/vendor/github.com/hashicorp/terraform/main.go b/vendor/github.com/hashicorp/terraform/main.go index 23758120..ca4ec7c6 100644 --- a/vendor/github.com/hashicorp/terraform/main.go +++ b/vendor/github.com/hashicorp/terraform/main.go @@ -108,10 +108,6 @@ func wrappedMain() int { // Load the configuration config := BuiltinConfig - if err := config.Discover(Ui); err != nil { - Ui.Error(fmt.Sprintf("Error discovering plugins: %s", err)) - return 1 - } // Load the configuration file if we have one, that can be used to // define extra providers and provisioners. @@ -185,9 +181,9 @@ func wrappedMain() int { HelpWriter: os.Stdout, } - // Initialize the TFConfig settings for the commands... - ContextOpts.Providers = config.ProviderFactories() - ContextOpts.Provisioners = config.ProvisionerFactories() + // Pass in the overriding plugin paths from config + PluginOverrides.Providers = config.Providers + PluginOverrides.Provisioners = config.Provisioners exitCode, err := cliRunner.Run() if err != nil { diff --git a/vendor/github.com/hashicorp/terraform/plugins.go b/vendor/github.com/hashicorp/terraform/plugins.go new file mode 100644 index 00000000..cf2d5425 --- /dev/null +++ b/vendor/github.com/hashicorp/terraform/plugins.go @@ -0,0 +1,29 @@ +package main + +import ( + "fmt" + "log" + "path/filepath" + "runtime" +) + +// globalPluginDirs returns directories that should be searched for +// globally-installed plugins (not specific to the current configuration). +// +// Earlier entries in this slice get priority over later when multiple copies +// of the same plugin version are found, but newer versions always override +// older versions where both satisfy the provider version constraints. +func globalPluginDirs() []string { + var ret []string + // Look in ~/.terraform.d/plugins/ , or its equivalent on non-UNIX + dir, err := ConfigDir() + if err != nil { + log.Printf("[ERROR] Error finding global config directory: %s", err) + } else { + machineDir := fmt.Sprintf("%s_%s", runtime.GOOS, runtime.GOARCH) + ret = append(ret, filepath.Join(dir, "plugins")) + ret = append(ret, filepath.Join(dir, "plugins", machineDir)) + } + + return ret +} diff --git a/vendor/vendor.json b/vendor/vendor.json index 74351255..ca148514 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -1281,12 +1281,12 @@ "revisionTime": "2017-07-25T21:31:56Z" }, { - "checksumSHA1": "8WW1IcSuDwDZ4+0lRBDwVapYNyw=", + "checksumSHA1": "8kh8+jgPhiyqJVyCs1+OX0D4AyA=", "path": "github.com/hashicorp/terraform", - "revision": "efca455c35d0d218a9bfee835a8ec3ef8d4d1c8c", - "revisionTime": "2017-07-03T20:27:28Z", - "version": "v0.9.11", - "versionExact": "v0.9.11" + "revision": "8712b03839d1f63c0bfe11cf5f08e94014aeb85c", + "revisionTime": "2017-09-19T13:56:27Z", + "version": "v0.10.6", + "versionExact": "v0.10.6" }, { "checksumSHA1": "ExrDQgeh/AFUiAmwczS0O+4iv2k=",