mirror of
https://github.com/BishopFox/cloudfoxable.git
synced 2026-11-07 09:56:00 -10:00
Minor changes to deployment output and files
This commit is contained in:
1 parent
97ce947dc3
commit
b2941bc7b1
3 files changed
+76
-45
No files matched your search
@@ -267,6 +267,7 @@
|
||||
"storageProfile": {
|
||||
"osDisk": {
|
||||
"createOption": "FromImage",
|
||||
"deleteOption": "Delete",
|
||||
"managedDisk": {
|
||||
"storageAccountType": "[variables('osDiskType')]"
|
||||
}
|
||||
|
||||
@@ -31,6 +31,8 @@ resource "azurerm_key_vault_secret" "flag" {
|
||||
name = "flag"
|
||||
value = "Flag{imageinationContinuation:protectThoseServicePrincipalCreds}"
|
||||
key_vault_id = azurerm_key_vault.ctf.id
|
||||
|
||||
depends_on = [azurerm_role_assignment.kv_admin]
|
||||
}
|
||||
|
||||
# create an identity for the logic app
|
||||
@@ -117,6 +119,8 @@ resource "azurerm_role_assignment" "kv_admin" {
|
||||
scope = azurerm_key_vault.ctf.id
|
||||
}
|
||||
|
||||
|
||||
|
||||
# get the logic app identity and store in a local file
|
||||
resource "null_resource" "get_logicapp_identity" {
|
||||
provisioner "local-exec" {
|
||||
|
||||
+71
-45
@@ -94,55 +94,81 @@ module "challenge_cloudjumping" {
|
||||
}
|
||||
|
||||
locals {
|
||||
enabled_challenges = compact([
|
||||
var.notsosecret_enabled ? "Not So Secret (~$0.01/month)" : "",
|
||||
var.permisery_enabled ? "Permisery (~$0/month)" : "",
|
||||
var.imageination_enabled ? "Image-ination Challenges (~$5/month)" : "",
|
||||
var.vmiam_enabled ? "VM I Am (~$15/month)" : "",
|
||||
var.cloudjumping_enabled ? "Cloud Jumping (~$15/month)" : ""
|
||||
])
|
||||
challenge_catalog = [
|
||||
{
|
||||
enabled = var.notsosecret_enabled
|
||||
name = "Not So Secret"
|
||||
cost = "~$0.01/month"
|
||||
},
|
||||
{
|
||||
enabled = var.permisery_enabled
|
||||
name = "Permisery"
|
||||
cost = "~$0/month"
|
||||
},
|
||||
{
|
||||
enabled = var.imageination_enabled
|
||||
name = "Image-ination"
|
||||
cost = "~$5/month"
|
||||
},
|
||||
{
|
||||
enabled = var.vmiam_enabled
|
||||
name = "VM I Am"
|
||||
cost = "~$15/month"
|
||||
},
|
||||
{
|
||||
enabled = var.cloudjumping_enabled
|
||||
name = "Cloud Jumping"
|
||||
cost = "~$15/month"
|
||||
}
|
||||
]
|
||||
|
||||
enabled_challenges = [
|
||||
for c in local.challenge_catalog :
|
||||
format("| | %-31s | %-12s |", c.name, c.cost)
|
||||
if c.enabled
|
||||
]
|
||||
}
|
||||
|
||||
output "Next_Steps" {
|
||||
value = <<EOT
|
||||
+---------
|
||||
|
|
||||
| +---------------------------------------------------------------------------------------------+
|
||||
| | Deployment Information: |
|
||||
| | |
|
||||
| | CloudFoxable deployed to: Subscription ${data.azurerm_client_config.current.subscription_id}|
|
||||
| | Tenant ${data.azurerm_client_config.current.tenant_id} |
|
||||
| | Scoreboard URL: https://cloudfoxable.bishopfox.com |
|
||||
| | CTF Starting User: Willem |
|
||||
| | Credentials: cat credentials.txt |
|
||||
| +---------------------------------------------------------------------------------------------+
|
||||
|
|
||||
| Next steps:
|
||||
|
|
||||
| 1. Access the credentials for your CTF user:
|
||||
|
|
||||
| cat credentials.txt
|
||||
|
|
||||
| 2. Logout your admin user:
|
||||
|
|
||||
| az logout
|
||||
|
|
||||
| 3. Verify your CTF user's credentials are working:
|
||||
|
|
||||
| az login
|
||||
|
|
||||
| 3. Head back to https://cloudfoxable.bishopfox.com and complete the first challenge!
|
||||
|
|
||||
| You'll need this: FLAG{congrats_you_set_up_Terraform_with_Azure}
|
||||
|
|
||||
| +---------------------------------+--------------+
|
||||
| | Currently Enabled Challenges | Cost/Month |
|
||||
| +---------------------------------+--------------+
|
||||
| | ${length(local.enabled_challenges) > 0 ? join("\n| | ", local.enabled_challenges) : "None"}
|
||||
| +------------------------------------------------+
|
||||
|
|
||||
+---------
|
||||
EOT
|
||||
+---------
|
||||
|
|
||||
| +---------------------------------------------------------------------------------------------+
|
||||
| | Deployment Information: |
|
||||
| | |
|
||||
| | CloudFoxable deployed to: Subscription ${data.azurerm_client_config.current.subscription_id}|
|
||||
| | Tenant ${data.azurerm_client_config.current.tenant_id} |
|
||||
| | Scoreboard URL: https://cloudfoxable.bishopfox.com |
|
||||
| | CTF Starting User: Willem |
|
||||
| | Credentials: cat credentials.txt |
|
||||
| +---------------------------------------------------------------------------------------------+
|
||||
|
|
||||
| Next steps:
|
||||
|
|
||||
| 1. Access the credentials for your CTF user:
|
||||
|
|
||||
| cat credentials.txt
|
||||
|
|
||||
| 2. Logout your admin user:
|
||||
|
|
||||
| az logout
|
||||
|
|
||||
| 3. Verify your CTF user's credentials are working:
|
||||
|
|
||||
| az login
|
||||
|
|
||||
| 3. Head back to https://cloudfoxable.bishopfox.com and complete the first Azure challenge!
|
||||
|
|
||||
| You'll need this: FLAG{congrats_you_set_up_Terraform_with_Azure}
|
||||
|
|
||||
| +---------------------------------+---------------+
|
||||
| | Currently Enabled Challenges | Cost/Month |
|
||||
| +---------------------------------+---------------+
|
||||
${length(local.enabled_challenges) > 0 ? join("\n", local.enabled_challenges) : "| None | |"}
|
||||
| +-------------------------------------------------+
|
||||
|
|
||||
+---------
|
||||
EOT
|
||||
}
|
||||
|
||||
locals {
|
||||
|
||||
Reference in new issue
Block a user