Commit Graph

28835 Commits

Author SHA1 Message Date
Laura Pacilio 809f50fbf2
Update website/docs/language/meta-arguments/module-providers.html.md
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2021-07-30 14:07:03 -04:00
Laura Pacilio 87348f97f8
Update website/docs/language/expressions/dynamic-blocks.html.md
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2021-07-30 14:06:20 -04:00
Laura Pacilio 507ad21a91
Update website/docs/cli/import/index.html.md
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2021-07-30 14:05:06 -04:00
Laura Pacilio fb6ff1f440
Update website/docs/cli/state/inspect.html.md
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2021-07-30 14:04:39 -04:00
Laura Pacilio f2552e502a Update metadata on graph command page 2021-07-30 11:21:10 -04:00
Laura Pacilio 58bc29b61b update metadata on get command page 2021-07-30 11:19:44 -04:00
Laura Pacilio fef4ccb795 Update metadta on force-unlock command page 2021-07-30 11:18:58 -04:00
Laura Pacilio e326a7b1a5 Update metadata on providers command page 2021-07-30 11:17:17 -04:00
Laura Pacilio 7105ed7a1e Update metadata on version command page 2021-07-30 11:16:08 -04:00
Laura Pacilio 5a6d2e42ef Update metadata on init command page 2021-07-30 11:14:37 -04:00
Laura Pacilio 2ba0dcb8c8 Update metadata on provisioning infrastructure index page 2021-07-30 11:08:48 -04:00
Laura Pacilio 9903913797 Remove back ticks from run index page 2021-07-30 11:08:02 -04:00
Laura Pacilio 5387f248c9 Remove back ticks from workspace index page 2021-07-30 11:06:00 -04:00
Laura Pacilio 99cc8c02c6 Remove back ticks from plan command page 2021-07-30 11:05:19 -04:00
Laura Pacilio a5e98df339 Remove back ticks from CLI commands index page 2021-07-30 11:04:30 -04:00
Laura Pacilio 1419315f3a Remove back ticks from terraform import page 2021-07-30 11:03:03 -04:00
Laura Pacilio 294a1fdd2c Remove back ticks from terraform fmt page 2021-07-30 11:02:31 -04:00
Laura Pacilio 706611e2c8 Remove back ticks from env command page 2021-07-30 11:02:03 -04:00
Laura Pacilio 661b7703ea Remove back ticks from destroy command page 2021-07-30 11:01:28 -04:00
Laura Pacilio d081fe41a4 Remove back ticks from console command page 2021-07-30 11:01:00 -04:00
Laura Pacilio e7a8595e1d Remove back ticks from apply command page 2021-07-30 11:00:23 -04:00
Laura Pacilio 4e40ce13db Remove back ticks from auth index page 2021-07-30 10:59:45 -04:00
Laura Pacilio 3ae552fbc9 Remove back ticks from syntax index page 2021-07-30 10:57:44 -04:00
Laura Pacilio 2970efff00 Remove back ticks from settings index page 2021-07-30 10:56:11 -04:00
Laura Pacilio e6903e860a Remove back ticks from null_resource_page 2021-07-30 10:55:13 -04:00
Laura Pacilio 22588ca105 Remove back ticks from connection block page 2021-07-30 10:54:39 -04:00
Laura Pacilio 058fa43d5d Remove back ticks from resource index page 2021-07-30 10:53:58 -04:00
Laura Pacilio 8a919d98d4 Remove back ticks from resource behavior page 2021-07-30 10:53:17 -04:00
Laura Pacilio 6e0349645e Remove back ticks from configuration page 2021-07-30 10:52:25 -04:00
Laura Pacilio 277fe647b9 Remove back ticks from source module page 2021-07-30 10:51:46 -04:00
Laura Pacilio 2e34e7a727 Remove back ticks from module providers meta argument page 2021-07-30 10:50:39 -04:00
Laura Pacilio 512bb1a3c5 Remove back ticks from provider meta argument page 2021-07-30 10:49:28 -04:00
Laura Pacilio 051ce2ae6c Remove back ticks from lifecycle page 2021-07-30 10:47:31 -04:00
Laura Pacilio a7c1ae72a4 Remove back ticks from for_each page 2021-07-30 10:45:39 -04:00
Laura Pacilio 01f993b6f7 Remove back ticks from depends_on page 2021-07-30 10:45:13 -04:00
Laura Pacilio a448eaa41f Remove back ticks from count page 2021-07-30 10:44:44 -04:00
Laura Pacilio 20bdc25ffd Remove back ticks from for expressions page 2021-07-30 10:43:30 -04:00
Laura Pacilio ad9fb34c0b Remove backticks from dynamic blocks page 2021-07-30 10:42:57 -04:00
Laura Pacilio f75acc7129 Remove backticks from Dependency lock page 2021-07-30 10:42:15 -04:00
mellab c690247837
Update type-constraints.html.md
Fixed one typo found on the type constraints page:

recieving -> receiving
2021-07-30 00:08:42 -05:00
Kevin Broadbridge f5cbe59386 Fixed cidrhost example 1 and 2 with correct function parameter 2021-07-29 16:30:18 -05:00
Martin Atkins aa414f3ab3 refactoring: First round of ValidateMoves rules
This is a first pass at implementing refactoring.ValidateMoves, covering
the main validation rules.

This is not yet complete. A couple situations not yet covered are
represented by commented test cases in TestValidateMoves, although that
isn't necessarily comprehensive. We'll do a further pass of filling this
out with any other subtleties before we ship this feature.
2021-07-29 12:29:36 -07:00
Martin Atkins ae2c93f255 addrs: All AbsMovable implementations implement UniqueKeyer 2021-07-29 12:29:36 -07:00
Kent 'picat' Gruber fc63c1949d
Merge pull request #29215 from hashicorp/configure-dependabot
Add initial Dependabot configuration
2021-07-29 10:26:22 -04:00
Martin Atkins f76a3467dc core: Call into refactoring.ValidateMoves after creating a plan
As of this commit, refactoring.ValidateMoves doesn't actually do anything
yet (always returns nil) but the goal here is to wire in the set of all
declared instances so that refactoring.ValidateMoves will then have all
of the information it needs to encapsulate our validation rules.

The actual implementation of refactoring.ValidateMoves will follow in
subsequent commits.
2021-07-28 13:54:10 -07:00
Martin Atkins 51346f0d87 instances: Expander.AllInstances
In order to precisely implement the validation rules for "moved"
statements we need to be able to test whether particular instances were
declared in the configuration.

The instance expander is the source of record for which instances we
decided while creating a plan, but it's API is far more involved than what
our validation rules need, so this new AllInstances method returns a
wrapper object with a more straightforward API that provides read-only
access to just the question of whether particular instances got registered
in the expander already.

This API covers all three of the kinds of objects that move statements can
refer to. It includes module calls and resources, even though they aren't
_themselves_ "instances" in the sense we usually mean, because the module
instance addresses they are contained within _are_ instances and so we
need to take their dynamic instance keys into account when answering these
queries.
2021-07-28 13:54:10 -07:00
Martin Atkins 57d36c1d9d addrs: ModuleInstance.ChildCall method
This allows us to concisely construct AbsModuleCall address values by
method chaining from module instance addresses.
2021-07-28 13:54:10 -07:00
Martin Atkins 5a6d11e375 addrs: Factor out MoveEndpointInModule module prefix matching
All of our MoveDestination methods have the common problem of deciding
whether the receiver is even potentially in the scope of a particular
MoveEndpointInModule, which requires that the receiver belong to an
instance of the module where the move statement was found.

Previously we had this logic inline in all three cases, but now we'll
factor it out into a shared helper function.

At first it seemed like there ought to be more factoring possible for
the AbsResource vs. AbsResourceInstance implementations, since textually
they look very similar, but in practice they only look similar because
those two types have a lot of method names in common, but the Go compiler
sees them as completely distinct and thus we must write the same logic
out twice. I did try some further refactoring to address that but it
made the resulting code significantly more complicated and, by my
judgement, harder to follow. Consequently I decided that a little
duplication was okay and warranted here because this logic is already
quite fiddly to read through and isn't likely to change significantly once
released (due to backward-compatibility promises).
2021-07-28 13:33:26 -07:00
Martin Atkins 45d16b4a2b addrs: MoveDestination for AbsResourceInstance-based move endpoints
Previously our MoveDestination methods only honored move statements whose
endpoints were module calls, module instances, or resources.

Now we'll additionally handle when the endpoints are individual resource
instances. This situation only applies to
AbsResourceInstance.MoveDestination because no other objects can be
contained inside of a resource instance.

This completes all of the MoveDestination cases for all supported move
statement types and moveable object types.
2021-07-28 13:33:26 -07:00
Martin Atkins 5e86bab159 addrs: MoveDestination for AbsResource-based move endpoints
Previously our MoveDestination methods only honored move statements whose
endpoints were module calls or module instances.

Now we'll additionally handle when the endpoints are whole resource
addresses. This includes both renaming resource blocks and moving resource
blocks into or out of child modules.

This doesn't yet include endpoints that are specific resource _instances_,
which will follow in a subsequent commit. For the moment that situation
will always indicate a non-match.
2021-07-28 13:33:26 -07:00