Commit Graph

27147 Commits

Author SHA1 Message Date
James Bardin 27809871ca update create_before_destroy when refreshing
In order to save any changes to lifecycle options, we need to record
those changes during refresh, otherwise they would only be updated when
there is a change in the resource to be applied.
2020-09-24 09:43:45 -04:00
James Bardin 014bd30a67
Merge pull request #26353 from hashicorp/jbardin/refresh-false
Re-implement -refresh=false
2020-09-24 09:40:33 -04:00
James Bardin 37569f5cc3 insert PlanRefresh into the context 2020-09-24 09:34:49 -04:00
James Bardin b16c600edc verify skipRefresh during plan 2020-09-24 09:34:49 -04:00
James Bardin 84f7116ac8 thread skipContext through to the instance node 2020-09-24 09:34:49 -04:00
James Bardin eebb4dfcb2 add SkipRefresh to the terraform context 2020-09-24 09:34:49 -04:00
James Bardin c2566bff7b
Merge pull request #26351 from hashicorp/jbardin/dependencies
we no longer need EvalRefreshDependencies
2020-09-24 09:33:59 -04:00
James Bardin 53a8e321eb remove mod=vendor in statemgr test 2020-09-24 08:44:49 -04:00
James Bardin 2e5366ac69 remove -mod=vendor from command tests 2020-09-23 17:56:19 -04:00
James Bardin 50e547db4d remove vendoring from contribution guide 2020-09-23 17:06:59 -04:00
James Bardin 8bfbafa790 remove vendor from some tooling 2020-09-23 17:06:59 -04:00
James Bardin bf5fc8b913 go1.15 in circleci 2020-09-23 16:54:37 -04:00
James Bardin 35a5b40500 remove vendor folder
Go modules are well understood and supported now, and since our build
pipeline no longer uses the vendored packages, we can remove the extra
overhead of maintaining these files.
2020-09-23 16:44:35 -04:00
James Bardin 6b6499d61c update go.sum for go1.15 2020-09-23 16:43:43 -04:00
James Bardin df1ac404fc fix error string matching in test
This package is no longer used, but we are retaining it for now for its
help in protocol test coverage.
2020-09-23 16:43:40 -04:00
James Bardin 537070ca57 update to go1.15.2 2020-09-23 15:18:22 -04:00
hashicorp-ci 6d86cd46f7 Cleanup after v0.14.0-alpha20200923 release 2020-09-23 18:19:52 +00:00
James Bardin def1f9b084 we no longer need EvalRefreshDependencies
This evaluation was required when refresh ran in a separate walk and
managed resources were only partly handled by configuration. Now that we
have the correct dependency information available when refreshing
configured resources, we can update their state accordingly. Since
orphaned resources are not refreshed, they can retain their stored
dependencies for correct ordering.

This also prevents users from introducing cycles with nodes they can't
"see", since only orphaned nodes will retain their stored dependencies,
and the remaining nodes will be updated according to the configuration.
2020-09-23 14:08:52 -04:00
hashicorp-ci f4a36d8939
Release v0.14.0-alpha20200923 2020-09-23 17:44:31 +00:00
Martin Atkins bd5aeb3d45
Update CHANGELOG.md 2020-09-23 10:22:41 -07:00
Martin Atkins 1510a33d2a
Update CHANGELOG.md 2020-09-23 10:18:57 -07:00
Pam Selle c8169950a8
Merge pull request #26342 from hashicorp/pselle/evaluate_test
tests: Add test for GetInputVariable, with sensitive config
2020-09-23 11:25:47 -04:00
Martin Atkins ddab48a3b4
hashibot: Temporarily disable issue migration
The bot seems to currently be running into some operational problems that are
creating noise for provider development teams by potentially migrating issues
multiple times.

This is just a tactical change to stop the annoying symptoms right now, to
give some time to figure out what's actually going on here.
2020-09-22 14:41:18 -07:00
Alisdair McDiarmid 14a233b019 command: Taint should respect required_version
Despite not requiring the configuration for any other reason, the taint
subcommand should not execute if the required_version constraints cannot
be met. Doing so can result in an undesirable state file upgrade.
2020-09-22 17:33:09 -04:00
Pam Selle a720409ded Add test for GetInputVariable, with sensitive config
This adds a test for GetInputVariable, and includes
a variable with a "sensitive" attribute in configuration,
to test that that value is marked as sensitive
2020-09-22 16:35:40 -04:00
James Bardin ce2e59f835
Merge pull request #26329 from hashicorp/jbardin/remove-refresh
Remove refresh entirely
2020-09-22 15:40:53 -04:00
Pam Selle 9c16724221
Merge pull request #26337 from hashicorp/pselle/docs-vendor-provisioners
docs: Vendor provisioner deprecation version
2020-09-22 14:54:21 -04:00
Alisdair McDiarmid 0a5f2d9047
Merge pull request #26334 from hashicorp/alisdair/deprecate-nested-redundant-interpolation-expressions
configs: Deprecate nested redundant interpolations
2020-09-22 14:11:52 -04:00
Pam Selle 3ba38f9b1f (docs) Vendor provisioner deprecation version 2020-09-22 14:06:39 -04:00
Alisdair McDiarmid 13ed5af5c8 configs: Deprecate nested redundant interpolations
Previous deprecations only included direct assignment of template-only
expressions to arguments. That is, this was not deprecated:

locals {
  foo = ["${var.foo}"]
}

This commit uses hclsyntax.VisitAll to detect and show deprecations for
all template-only expressions, no matter how deep they are in a given
expression.
2020-09-22 13:40:08 -04:00
Alisdair McDiarmid 85ddb386ec
Merge pull request #26318 from hashicorp/alisdair/providers-schema-required-providers
command: Providers schema shows required_providers
2020-09-22 12:42:06 -04:00
James Bardin 87676358e7 update CHANGELOG.md 2020-09-22 10:57:47 -04:00
Alisdair McDiarmid 18f9ea53b9 command: Providers schema shows required_providers
The providers schema command is using the Config.ProviderTypes method,
which had not been kept up to date with the changes to provider
requirements detection made in Config.ProviderRequirements. This
resulted in any currently-unused providers being omitted from the
output.

This commit changes the ProviderTypes method to use the same underlying
logic as ProviderRequirements, which ensures that `required_providers`
blocks are taken into account.

Includes an integration test case to verify that this fixes the provider
schemas command bug.
2020-09-22 10:28:32 -04:00
James Bardin 906d399189 remove refresh!
Delete all the code associated with the Refresh walk
2020-09-22 10:27:45 -04:00
James Bardin 915d4e4b45
Merge pull request #26321 from hashicorp/jbardin/simplify-data-lifecycle
simplify data lifecycle
2020-09-22 10:27:16 -04:00
Justin Campbell 1554e04108
website: Add Registry email to publishing doc (#26327) 2020-09-22 10:26:29 -04:00
James Bardin 522df46d91 test output was incorrectly changed
Roll back this part of the change. The incorrect output never passed the
test.
2020-09-22 10:05:52 -04:00
James Bardin ab06f0c9f8 we can roll back the e2e tests
the data sources no longer show up in the tests
2020-09-22 09:55:19 -04:00
James Bardin 6039622111 Simplify data lifecycle for the no-refresh world
Now that we don't have to handle data sources that may or may not have
been updated during a refresh phase, and the plan phase can save the
data source to the refreshed state, we can remove a lot of the logic
involved in detecting whether the data source needs to be planned or
not.

When there is no separate refresh phase, we always must attempt to read
the data source during planning, and the only conditions are based on
having a known configuration, and not having any dependencies on which
we're waiting. If the data source is read during plan, we can now save
that directly to the refreshed state, and don't need to smuggle the
value as a change to be saved during apply.
2020-09-22 09:55:19 -04:00
James Bardin 921f36a361
Merge pull request #26317 from hashicorp/jbardin/remove-refresh-walk
Replace internal Refresh command with Plan
2020-09-22 09:54:24 -04:00
Paul Tyng 59e77685cb
Merge pull request #26326 from hashicorp/paultyng-patch-1
Minor instructions update for GPG key creation
2020-09-22 09:37:34 -04:00
Justin Campbell 45666f8216
website: Update Registry key management docs (#26299) 2020-09-22 09:37:26 -04:00
Paul Tyng 192c4337c3
Update publishing.html.md 2020-09-22 09:35:30 -04:00
Alisdair McDiarmid 48bedb0321
Update CHANGELOG.md 2020-09-22 09:09:04 -04:00
Arthur Burkart 6ed47c7241
lang/funcs: Add "alltrue" function (#25656)
This commit adds an `alltrue` function to Terraform configuration. A
reason we might want this function is because it will enable more
powerful custom variable validations. For example:

```hcl
variable "amis" {
  type = list(object({
    id = string
  }))

  validation {
    condition = (alltrue([
      for a in var.amis : length(a.id) > 4 && substr(a.id, 0, 4) == "ami-"
    ]))
    error_message = "The ID of at least one AMI was invalid."
  }
}
```
2020-09-22 09:06:42 -04:00
James Bardin 7222bad59c update CHANGELOG.md 2020-09-21 21:19:13 -04:00
James Bardin abf30de16e
Merge pull request #26284 from hashicorp/jbardin/data-resource-reference
delay data source reads with pending resource ref
2020-09-21 16:34:19 -04:00
James Bardin bc82347a04 fix tests
Update tests to match the new behavior. Some were incorrect, some no
longer make sense, and some just weren't setup to handle th plan api
calls.
2020-09-21 16:17:46 -04:00
James Bardin 4a6dac39a5 Use Plan instead of Refresh
Now that the planning process generates a refreshed state, and can
handle changes between the configuration and the state which the refresh
process cannot, we can use the plan for the refresh command.
2020-09-21 16:17:45 -04:00
James Bardin 8105096ec8 attach dependencies during plan
This was previously done during refresh alone, now we need to insert
these during the refresh portion of plan.
2020-09-21 16:17:45 -04:00