-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(DMVP-2708): add support for external tokens
- Loading branch information
1 parent
84a8da6
commit 0d55bba
Showing
13 changed files
with
69 additions
and
137 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
locals { | ||
scm_providers = { | ||
github = { | ||
provider = "github" | ||
http_url = "https://github.com" | ||
api_url = "https://api.github.com" | ||
} | ||
gitlab = { | ||
provider = "gitlab_hosted" | ||
http_url = "https://gitlab.com" | ||
api_url = "https://gitlab.com/api/v4" | ||
} | ||
bitbucket = { | ||
provider = "bitbucket_hosted" | ||
http_url = "https://bitbucket.org" | ||
api_url = "https://api.bitbucket.org/2.0" | ||
} | ||
} | ||
|
||
# check to see if token is actually SCM token or TFC token ID | ||
create_oauth_client = substr(var.git_token, 0, 3) != "ot-" | ||
|
||
# if token is TFC token ID then resource should not be created and provided token should be used | ||
oauth_token_id = local.create_oauth_client ? tfe_oauth_client.this[0].oauth_token_id : var.git_token | ||
} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
terraform { | ||
cloud { | ||
organization = "dasmeta-testing" | ||
workspaces { | ||
name = "terraform-tfe-cloud-test" | ||
} | ||
} | ||
} |
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,24 @@ | ||
variable "tfc_token" {} | ||
variable "git_token" {} | ||
|
||
module "basic" { | ||
source = "../.." | ||
|
||
org = "dasmeta-testing" | ||
token = var.tfc_token | ||
|
||
rootdir = "_terraform" | ||
targetdir = "_terraform" | ||
yamldir = "." | ||
|
||
git_provider = "bitbucket" | ||
git_org = "dasmeta-testing" | ||
git_repo = "test-infrastructure" | ||
git_token = var.git_token | ||
|
||
aws = { | ||
access_key_id = "" | ||
secret_access_key = "" | ||
default_region = "" | ||
} | ||
} |
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 @@ | ||
source: dasmeta/null/empty | ||
version: 1.0.1 |
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