forked from hashicorp/terraform-provider-azurerm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Record Azure role assignment details
Stores an encrypted version of the Azure contributor role assignment details (viz, 'subscriptionId', 'appId', 'password' and 'tenant') and adds a script to extract those values and use them to print commands that will set the related environment variables as persistent Gitpod environment variables within the current repository (see [Environment Variables - Gitpod Docs]( https://www.gitpod.io/docs/configure/projects/environment-variables)).
- Loading branch information
1 parent
75e451a
commit 1878e18
Showing
2 changed files
with
57 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
-----BEGIN PGP MESSAGE----- | ||
Comment: https://keybase.io/download | ||
Version: Keybase Go 6.2.4 (linux) | ||
|
||
wcFMA11r88O26n/lARAACLz+aHvO3a9kfCDAB6tTfNcjbQydv4rvp1gPM2rQfm4R | ||
IwP5d9lY+JaUa5JQqLB0JPfiFWoDD5CDg7/zjWBQsm5ghVFDtHM+RNPJjUsQTWpe | ||
lfNZ3mq24q4tiuzbYccbwwyAl54YEYEEATSO2DhCS/borBVVNpd2rdQ0hiYi9W5q | ||
m4JK8hXgSYc1u2l6MkWs47dmekRi4Jnm5/eyAPmmwHdZtOi6npb+CigHQdsHA3VO | ||
TmENtmv4T/yqNCsJfO635DArYaQM56ae+J9XLDUpLiKw7//FUAvrwrMVkuaDUpaq | ||
NQSoCZrIEA8QPi1ICZO2H5RJtGj63RmugjS3mo3NwLQ5yFbK+sqrVdCvPtF4gVfJ | ||
xul4wFPjMQrxUoH1uDgNJvmddB+aUOm7v0e3OhAw3yKl3eckuwpG9rfHKRqI1Cor | ||
+1xXcmCKRB7cWjnksRfdsrzbcddrO6e87hc8NE0x3vhFXS7rQaiP9SUnMheUm5O9 | ||
KaeAa/nWiuw7qXTmq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QR6eI3IUVpR | ||
37RJXIvZm+Pocp1suCsCVB+CUaqN/GcWfj4a+v780iR1dDBnfceICFytbzkWKv0f | ||
EEH6AXw63zQ9AgQtQySxkW77D+aO//mKgCBWEQNLCW7texRMAbLbDXjMFwdOzWjx | ||
E27/2peJL90KnENNt0r/1l6IUE5uAdlah7t4qzHCZhoYY3a18XOUCpwCpX39/aZm | ||
krFzhduNpefFFNERxuvn1UscjKWjf3CPlx07BkQxpJ53y3SRS2LGzoXZUO8XhnhF | ||
M3nA7MlgzGg2MQtrGAXrUPjTxGeohM+Tg2v8RlOB2tRWeZxKgLEt2yaFeXuR8cQC | ||
ETIgD0ndFx7MO+Mz8/GovoiTJv1MEjzl8zfSVaUjBtv8UpalfwLko3Waz7KSGrd6 | ||
Jp0SEfE1QOKYh11g4QzxAA== | ||
=uegT | ||
-----END PGP MESSAGE----- |
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,20 @@ | ||
#!/usr/bin/sh | ||
# Author: Warwick Allen | ||
# Created: 2024-02-13 | ||
|
||
# Outputs commands to run to set the Gitpod environment variables for the Azure role assignment. | ||
# The file containing the variables (which includes a password) is encrypted with the following | ||
# Keybase PGP key: | ||
# Keybase Key ID: 01018704f1fe0ed3d28a324d6a4c256b7801f885102bea5925bbf286c7efe3e490ac0a | ||
# PGP Fingerprint: 9f92c49840acbfade9e8f6382dfa90f79b24929b | ||
# PGP Identities: | ||
# Warwick Peter Malcolm Allen <warwick.peter.malcolm.allen@outlook.com> | ||
|
||
keybase pgp decrypt -i ../.azure-contributor-role-assignment.json.asc 2>/dev/null | | ||
perl -nle ' | ||
s/ | ||
"(.*)":\s*(".*") | ||
/ | ||
$k = {qw,subscriptionId SUBSCRIPTION_ID appId CLIENT_ID password CLIENT_SECRET tenant TENANT_ID,}->{$1} and | ||
print "gp env -e ARM_$k=$2" | ||
/ex' |