Skip to content

Commit

Permalink
Merge pull request #1 from dhoppeIT/add_resources
Browse files Browse the repository at this point in the history
Manage the following Terraform resources
  • Loading branch information
dhoppe authored Nov 30, 2021
2 parents d2d3bd9 + c0d0c85 commit f85bf5c
Show file tree
Hide file tree
Showing 7 changed files with 111 additions and 13 deletions.
10 changes: 5 additions & 5 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
repository:
name: terraform-module-template
description: Terraform module to manage the Terraform Cloud/Enterprise resource (tfe_FIXME)
homepage: https://registry.terraform.io/modules/dhoppeIT/FIXME/tfe/latest
topics: terraform, tfe_FIXME
private: true
name: terraform-tfe-oauth_client
description: Terraform module to manage the Terraform Cloud/Enterprise resource (tfe_oauth_client)
homepage: https://registry.terraform.io/modules/dhoppeIT/oauth_client/tfe/latest
topics: terraform, tfe_oauth_client
private: false
has_issues: true
has_projects: false
has_wiki: false
Expand Down
60 changes: 53 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,69 @@
# FIXME
# terraform-tfe-oauth_client

Terraform module to manage the FIXME resource.
Terraform module to manage the Terraform Cloud/Enterprise resource
(tfe_oauth_client).

## Graph

![Graph](https://github.com/dhoppeIT/FIXME/blob/main/rover.png)
![Graph](https://github.com/dhoppeIT/terraform-tfe-oauth_client/blob/main/rover.png)

## Usage

Copy and paste into your Terraform configuration, insert the variables and run ```terraform init```:

```hcl
module "FIXME" {
source = "dhoppeIT/FIXME/tfe"
...
module "tfe-oauth_client" {
source = "dhoppeIT/oauth_client/tfe"
organization = "dhoppeIT"
api_url = "https://api.github.com"
http_url = "https://github.com"
oauth_token = "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"
service_provider = "github"
}
```

<!--- BEGIN_TF_DOCS --->
## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_tfe"></a> [tfe](#requirement\_tfe) | >= 0.26.1, < 1.0.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_tfe"></a> [tfe](#provider\_tfe) | >= 0.26.1, < 1.0.0 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [tfe_oauth_client.default](https://registry.terraform.io/providers/hashicorp/tfe/latest/docs/resources/oauth_client) | resource |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_api_url"></a> [api\_url](#input\_api\_url) | The base URL of your VCS provider's API | `string` | `null` | no |
| <a name="input_http_url"></a> [http\_url](#input\_http\_url) | The homepage of your VCS provider | `string` | `null` | no |
| <a name="input_oauth_token"></a> [oauth\_token](#input\_oauth\_token) | The token string you were given by your VCS provider | `string` | `null` | no |
| <a name="input_organization"></a> [organization](#input\_organization) | Name of the organization | `string` | `null` | no |
| <a name="input_private_key"></a> [private\_key](#input\_private\_key) | The text of the private key associated with your Azure DevOps Server account | `string` | `null` | no |
| <a name="input_service_provider"></a> [service\_provider](#input\_service\_provider) | The VCS provider being connected with | `string` | `null` | no |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_oauth_token_id"></a> [oauth\_token\_id](#output\_oauth\_token\_id) | The ID of the OAuth token associated with the OAuth client |

<!--- END_TF_DOCS --->

## Authors
Expand All @@ -26,4 +72,4 @@ Created and maintained by [Dennis Hoppe](https://github.com/dhoppeIT/).

## License

Apache 2 licensed. See [LICENSE](https://github.com/dhoppeIT/FIXME/blob/main/LICENSE) for full details.
Apache 2 licensed. See [LICENSE](https://github.com/dhoppeIT/terraform-tfe-oauth_client/blob/main/LICENSE) for full details.
8 changes: 8 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
resource "tfe_oauth_client" "default" {
organization = var.organization
api_url = var.api_url
http_url = var.http_url
oauth_token = var.oauth_token
private_key = var.private_key
service_provider = var.service_provider
}
4 changes: 4 additions & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
output "oauth_token_id" {
value = tfe_oauth_client.default.oauth_token_id
description = "The ID of the OAuth token associated with the OAuth client"
}
Binary file added rover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
variable "organization" {
type = string
default = null
description = "Name of the organization"
}

variable "api_url" {
type = string
default = null
description = "The base URL of your VCS provider's API"
}

variable "http_url" {
type = string
default = null
description = "The homepage of your VCS provider"
}

variable "oauth_token" {
type = string
default = null
description = "The token string you were given by your VCS provider"
}

variable "private_key" {
type = string
default = null
description = "The text of the private key associated with your Azure DevOps Server account"
}

variable "service_provider" {
type = string
default = null
description = "The VCS provider being connected with"
}
7 changes: 6 additions & 1 deletion versions.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
terraform {
required_providers {}
required_providers {
tfe = {
source = "hashicorp/tfe"
version = ">= 0.26.1, < 1.0.0"
}
}

required_version = ">= 1.0"
}

0 comments on commit f85bf5c

Please sign in to comment.