This resource allows you to manage the repository allow list for existing GitHub Dependabot secrets within your GitHub organization. You must have write access to an organization secret to use this resource.
This resource is only applicable when visibility
of the existing organization secret has been set to selected
.
data "github_repository" "repo" {
full_name = "my-org/repo"
}
resource "github_dependabot_organization_secret" "example_secret" {
secret_name = "example_secret_name"
visibility = "private"
plaintext_value = var.some_secret_string
}
resource "github_dependabot_organization_secret_repositories" "org_secret_repos" {
secret_name = github_dependabot_organization_secret.example_secret.secret_name
selected_repository_ids = [data.github_repository.repo.repo_id]
}
The following arguments are supported:
secret_name
- (Required) Name of the existing secretselected_repository_ids
- (Required) An array of repository ids that can access the organization secret.This resource can be imported using an ID made up of the secret name:
terraform import github_dependabot_organization_secret_repositories.test_secret_repos test_secret_name