-
Notifications
You must be signed in to change notification settings - Fork 9.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
command/e2etest: provider installation with explicit install methods
This exercises the ability to customize the installation methods used by the provider plugin installer, in this case forcing the use of a custom local directory with a result essentially the same as what happens when you pass -plugin-dir to "terraform init".
- Loading branch information
1 parent
16e97a9
commit fc4dc7a
Showing
5 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
command/e2etest/testdata/custom-provider-install-method/cliconfig.tfrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
provider_installation { | ||
filesystem_mirror { | ||
path = "./fs-mirror" | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
command/e2etest/testdata/custom-provider-install-method/cliconfig.tfrc.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"provider_installation": { | ||
"filesystem_mirror": [ | ||
{ | ||
"path": "./fs-mirror" | ||
} | ||
] | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
...ror/example.com/awesomecorp/happycloud/1.2.0/os_arch/terraform-provider-happycloud_v1.2.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This is not a real plugin executable. It's just here to be discovered by the | ||
provider installation process. |
21 changes: 21 additions & 0 deletions
21
command/e2etest/testdata/custom-provider-install-method/main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# The purpose of this test is to refer to a provider whose address contains | ||
# a hostname that is only used for namespacing purposes and doesn't actually | ||
# have a provider registry deployed at it. | ||
# | ||
# A user can install such a provider in one of the implied local filesystem | ||
# directories and Terraform should accept that as the selection for that | ||
# provider without producing any errors about the fact that example.com | ||
# does not have a provider registry. | ||
# | ||
# For this test in particular we're using the "vendor" directory that is | ||
# the documented way to include provider plugins directly inside a | ||
# configuration uploaded to Terraform Cloud, but this functionality applies | ||
# to all of the implicit local filesystem search directories. | ||
|
||
terraform { | ||
required_providers { | ||
happycloud = { | ||
source = "example.com/awesomecorp/happycloud" | ||
} | ||
} | ||
} |