mirror of
https://github.com/hashicorp/terraform.git
synced 2026-05-28 04:03:27 -04:00
fix: Skip downloading providers that are configured as developer overrides, matching handling of reattached providers.
This change is coupled to another change in a later commit where we will stop the init command removing developer override providers from the provider requirements passed to the installer; we will achieve the same outcome by making the installer ignore dev_override providers regardless of whether they're listed in the config's provider requirements or not.
This commit is contained in:
parent
2ea438f84e
commit
bfc08b5d96
2 changed files with 5 additions and 1 deletions
|
|
@ -144,7 +144,7 @@ func TestEnsureProviderVersions_devOverrideAndReattachedProviders(t *testing.T)
|
|||
providerA.ForDisplay(),
|
||||
providerB.ForDisplay(),
|
||||
providerC.ForDisplay(),
|
||||
providerD.ForDisplay(), // D is installed despite being dev overridden
|
||||
// D is not installed due to being dev override
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -252,6 +252,10 @@ func (i *Installer) EnsureProviderVersions(ctx context.Context, locks *depsfile.
|
|||
// unmanaged providers do not require installation
|
||||
continue
|
||||
}
|
||||
if _, ok := i.devOverrideTypes[provider]; ok {
|
||||
// development override providers do not require installation
|
||||
continue
|
||||
}
|
||||
acceptableVersions := versions.MeetingConstraints(versionConstraints)
|
||||
if !mode.forceQueryAllProviders() {
|
||||
// If we're not forcing potential changes of version then an
|
||||
|
|
|
|||
Loading…
Reference in a new issue