-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #935 from hashicorp/sams/fix-registry-module-vcs-c…
…reate allow creation of registry module via Github app
- Loading branch information
Showing
3 changed files
with
45 additions
and
6 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
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
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 |
---|---|---|
|
@@ -36,6 +36,28 @@ resource "tfe_registry_module" "test-registry-module" { | |
} | ||
``` | ||
|
||
Create private registry module with GitHub App: | ||
|
||
```hcl | ||
resource "tfe_organization" "test-organization" { | ||
name = "my-org-name" | ||
email = "[email protected]" | ||
} | ||
data "tfe_github_app_installation" "gha_installation" { | ||
name = "YOUR_GH_NAME" | ||
} | ||
resource "tfe_registry_module" "petstore" { | ||
organization = tfe_organization.test-organization.name | ||
vcs_repo { | ||
display_identifier = "GH_NAME/REPO_NAME" | ||
identifier = "GH_NAME/REPO_NAME" | ||
github_app_installation_id = data.tfe_github_app_installation.gha_installation.id | ||
} | ||
} | ||
``` | ||
|
||
Create private registry module without VCS: | ||
|
||
```hcl | ||
|
@@ -99,7 +121,7 @@ The following arguments are supported: | |
new resource if changed. One of `vcs_repo` or `module_provider` is required. | ||
* `module_provider` - (Optional) Specifies the Terraform provider that this module is used for. For example, "aws" | ||
* `name` - (Optional) The name of registry module. It must be set if `module_provider` is used. | ||
* `organization` - (Optional) The name of the organization associated with the registry module. It must be set if `module_provider` is used. | ||
* `organization` - (Optional) The name of the organization associated with the registry module. It must be set if `module_provider` is used, or if `vcs_repo` is used via a GitHub App. | ||
* `namespace` - (Optional) The namespace of a public registry module. It can be used if `module_provider` is set and `registry_name` is public. | ||
* `registry_name` - (Optional) Whether the registry module is private or public. It can be used if `module_provider` is set. | ||
|
||
|