Commit Graph

25269 Commits

Author SHA1 Message Date
Pam Selle a0e6a83931 Update codeowners file with real handles 2020-02-03 16:47:11 -05:00
Kristin Laemmert 80ab551867
terraform: use addrs.Provider as map keys for provider schemas (#24002)
This is a stepping-stone PR for the provider source project. In this PR
"legcay-stype" FQNs are created from the provider name string. Future
work involves encoding the FQN directly in the AbsProviderConfig and
removing the calls to addrs.NewLegacyProvider().
2020-02-03 08:18:04 -05:00
Pam Selle 3e07ae3ff6
Merge pull request #23999 from pselle/for_each_docs
Document for_each key requirements
2020-01-31 16:41:25 -05:00
Martin Atkins 8b511524d6
Initial steps towards AbsProviderConfig/LocalProviderConfig separation (#23978)
* Introduce "Local" terminology for non-absolute provider config addresses

In a future change AbsProviderConfig and LocalProviderConfig are going to
become two entirely distinct types, rather than Abs embedding Local as
written here. This naming change is in preparation for that subsequent
work, which will also include introducing a new "ProviderConfig" type
that is an interface that AbsProviderConfig and LocalProviderConfig both
implement.

This is intended to be largely just a naming change to get started, so
we can deal with all of the messy renaming. However, this did also require
a slight change in modeling where the Resource.DefaultProviderConfig
method has become Resource.DefaultProvider returning a Provider address
directly, because this method doesn't have enough information to construct
a true and accurate LocalProviderConfig -- it would need to refer to the
configuration to know what this module is calling the provider it has
selected.

In order to leave a trail to follow for subsequent work, all of the
changes here are intended to ensure that remaining work will become
obvious via compile-time errors when all of the following changes happen:
- The concept of "legacy" provider addresses is removed from the addrs
  package, including removing addrs.NewLegacyProvider and
  addrs.Provider.LegacyString.
- addrs.AbsProviderConfig stops having addrs.LocalProviderConfig embedded
  in it and has an addrs.Provider and a string alias directly instead.
- The provider-schema-handling parts of Terraform core are updated to
  work with addrs.Provider to identify providers, rather than legacy
  strings.

In particular, there are still several codepaths here making legacy
provider address assumptions (in order to limit the scope of this change)
but I've made sure each one is doing something that relies on at least
one of the above changes not having been made yet.

* addrs: ProviderConfig interface

In a (very) few special situations in the main "terraform" package we need
to make runtime decisions about whether a provider config is absolute
or local.

We currently do that by exploiting the fact that AbsProviderConfig has
LocalProviderConfig nested inside of it and so in the local case we can
just ignore the wrapping AbsProviderConfig and use the embedded value.

In a future change we'll be moving away from that embedding and making
these two types distinct in order to represent that mapping between them
requires consulting a lookup table in the configuration, and so here we
introduce a new interface type ProviderConfig that can represent either
AbsProviderConfig or LocalProviderConfig decided dynamically at runtime.

This also includes the Config.ResolveAbsProviderAddr method that will
eventually be responsible for that local-to-absolute translation, so
that callers with access to the configuration can normalize to an
addrs.AbsProviderConfig given a non-nil addrs.ProviderConfig. That's
currently unused because existing callers are still relying on the
simplistic structural transform, but we'll switch them over in a later
commit.

* rename LocalType to LocalName

Co-authored-by: Kristin Laemmert <mildwonkey@users.noreply.github.com>
2020-01-31 08:23:07 -05:00
Pam Selle 4e0879c486 Document for_each key requirements 2020-01-30 17:18:16 -05:00
Chris Griggs 93e29b71a4
Merge pull request #23974 from hashicorp/cgriggs01-auth0-links
[Website] Add Auth0 provider links
2020-01-28 14:47:39 -08:00
Chris Griggs 489bd2b84e [Website] Add Auth0 provider links 2020-01-28 14:14:01 -08:00
Chris Griggs 52a4a79ba2
Merge pull request #23971 from hashicorp/cgriggs01-docs-update
[Website] Verified module update
2020-01-28 11:24:16 -08:00
Chris Griggs 26d8092f03 [Website] Verified module update 2020-01-28 10:51:40 -08:00
Chris Griggs 7bc049c59f
Merge pull request #23968 from hashicorp/cgriggs01-incapsula
Cgriggs01 incapsula
2020-01-28 10:01:53 -08:00
Chris Griggs 2ba36d7d93 fix 2020-01-28 09:06:15 -08:00
Chris Griggs 3c8a61d4cb [Website] add incapsula links 2020-01-28 09:00:42 -08:00
Kristin Laemmert 6541775ce4
addrs: roll back change to Type field in ProviderConfig (#23937) 2020-01-28 08:13:30 -05:00
Martin Atkins e9d0822b2a command: Accept a "provider source" from the main package
Following the same approach we use for other CLI-Config-able objects like
the service discovery system, the main package is responsible for
producing a suitable implementation of this interface which the command
package can then use.

When unit testing in the command package we can then substitute mocks as
necessary, following the dependency inversion principle.
2020-01-24 13:45:37 -08:00
Pam Selle 2672ddba02
Merge pull request #23949 from hashicorp/docs/dynamic-blocks
Update dynamic block docs to use a better example
2020-01-24 14:42:27 -05:00
Pam Selle 213189c3d0 Use a real resource 2020-01-24 13:47:51 -05:00
Pam Selle 885ff69c50 Update docs to generalize/use fake example vs one that could be misleading 2020-01-24 12:44:07 -05:00
Chris Griggs b1313eaf7d
Merge pull request #23935 from hashicorp/cgriggs01-community-links
[Website] Adding two new community providers
2020-01-23 10:34:53 -08:00
Chris Griggs 2b3b2781f2 Adding two new community providers 2020-01-23 10:27:51 -08:00
tf-release-bot 9670cd37df Cleanup after v0.12.20 release 2020-01-22 22:08:22 +00:00
tf-release-bot d12152f730
v0.12.20 2020-01-22 21:51:40 +00:00
Pam Selle 28b43a7a4e
Update CHANGELOG.md 2020-01-22 15:12:17 -05:00
Pam Selle 9f374eb1fc
Merge pull request #23865 from loslocostacos/fix-win-tfe-pathing
Fix compatibility issue between Windows CLI and remote plan and apply
2020-01-22 12:04:41 -05:00
Martin Atkins 4d7122a0dd internal/getproviders: LookupLegacyProvider
This is a temporary helper so that we can potentially ship the new
provider installer without making a breaking change by relying on the
old default namespace lookup API on the default registry to find a proper
FQN for a legacy provider provider address during installation.

If it's given a non-legacy provider address then it just returns the given
address verbatim, so any codepath using it will also correctly handle
explicit full provider addresses. This also means it will automatically
self-disable once we stop using addrs.NewLegacyProvider in the config
loader, because there will therefore no longer be any legacy provider
addresses in the config to resolve. (They'll be "default" provider
addresses instead, assumed to be under registry.terraform.io/hashicorp/* )

It's not decided yet whether we will actually introduce the new provider
in a minor release, but even if we don't this API function will likely be
useful for a hypothetical automatic upgrade tool to introduce explicit
full provider addresses into existing modules that currently rely on
the equivalent to this lookup in the current provider installer.

This is dead code for now, but my intent is that it would either be called
as part of new provider installation to produce an address suitable to
pass to Source.AvailableVersions, or it would be called from the
aforementioned hypothetical upgrade tool.

Whatever happens, these functions can be removed no later than one whole
major release after the new provider installer is introduced, when
everyone's had the opportunity to update their legacy unqualified
addresses.
2020-01-22 09:02:22 -08:00
Chris Griggs 35acaf8a85
Merge pull request #23922 from hashicorp/cgriggs01-metalcloud
[Website] Add MetalCloud provider links
2020-01-22 08:54:17 -08:00
Chris Griggs be2dcb4a32
Merge pull request #23923 from hashicorp/cgriggs01-stable-metal
[Cherry-pick]
2020-01-22 08:54:06 -08:00
Chris Griggs 38afbb34c6 [Website] Add MetalCloud provider links 2020-01-22 08:44:00 -08:00
Chris Griggs efa71f8aa7 [Website] Add MetalCloud provider links 2020-01-22 08:42:19 -08:00
Avi Zurel 96645d7ea7 website: Better example for running 0.12upgrade across many directories at once 2020-01-21 18:28:06 -08:00
Chris Griggs b8d720f834
Merge pull request #23916 from hashicorp/cgriggs01-stable
[Cherrypick] community links
2020-01-21 17:45:48 -08:00
Chris Griggs 8acab32c42
Merge pull request #23915 from hashicorp/cgriggs01-community-additions
[Website] Updating community provider listings
2020-01-21 17:45:43 -08:00
Chris Griggs 9ea88f22fc add/update community provider listings 2020-01-21 17:12:05 -08:00
Chris Griggs 2010ce2804 add/update community provider listings 2020-01-21 17:08:06 -08:00
Steve Burns 26305a83a3 Remove unecessary conditions for module manifest read and write functions 2020-01-17 12:14:17 -07:00
Daniel Dreier 05c9407986
Merge pull request #23293 from kmfk/hide-values-undeclared-var-warning
Avoid leaking sensitive values in undeclared variable warnings
2020-01-15 16:08:19 -08:00
James Bardin 94b1792b99
Merge pull request #23862 from hashicorp/jbardin/destroy-prov-path
it's safe for destroy provisioners to access path
2020-01-15 16:59:34 -05:00
James Bardin 35107acc46 allow "terraform" in destroy provisioners
The values supplied in terraform are static, and do not create any
dependencies.
2020-01-15 11:39:01 -05:00
Steve Burns 43b855743b Uniformity for module manifest dir read/write 2020-01-14 21:13:36 -07:00
Steven Burns 98e612ee50 Add condition for conversion of module path in manifest 2020-01-14 21:06:42 -07:00
Steve Burns 8bc0ef8fdc Attempt to change the output of module manifest 2020-01-14 20:42:00 -07:00
Kristin Laemmert 01036e7b31
Update CHANGELOG.md 2020-01-14 08:30:41 -05:00
Kristin Laemmert 4c221cbcb9
website: document optional syntax for required_providers setting (#23854) 2020-01-14 07:59:18 -05:00
Pam Selle da67d86d7f
Merge pull request #23855 from hashicorp/pselle/deletion
Deletion of unused code in backend and config.go
2020-01-13 17:03:43 -05:00
Pam Selle 78b1220558 Remove config.go and update things using its aliases 2020-01-13 16:50:05 -05:00
James Bardin c376905adc it's safe for destroy provisioners to access path
The path values are statically loaded, and do not create any
dependencies that could cause problems with destroy provisioners.
2020-01-13 16:44:44 -05:00
Martin Atkins 57158df4b3
Update CHANGELOG.md
De-emphasize the "experiments" section in favor of the non-experimental changes in the same release.
2020-01-13 13:43:42 -08:00
Chris Griggs 56cd7859e0
Merge pull request #23857 from hashicorp/cgriggs01-stable
[cherry-pick]add checkpoint links
2020-01-13 13:19:09 -08:00
Chris Griggs 6d00e8dc28
Merge pull request #23856 from hashicorp/cgriggs01-checkpoint
[Website]add checkpoint links
2020-01-13 13:19:04 -08:00
Chris Griggs ffbcf55817 [Website]add checkpoint links 2020-01-13 13:14:38 -08:00
Chris Griggs 1a2ea70027 [Website]add checkpoint links 2020-01-13 13:13:34 -08:00