Created
July 2, 2020 08:18
-
-
Save g1soori/54541eff1eb7e348180cdd7f49436dbf to your computer and use it in GitHub Desktop.
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
module "core_modules" { | |
source = "../../data-sources/" | |
} | |
terraform { | |
backend "azurerm" { | |
resource_group_name = "core" | |
storage_account_name = "corestorageaccforlab" | |
container_name = "terraform-state" | |
key = "key_vault-query.tfstate" | |
} | |
} | |
data "azurerm_key_vault" "test_build" { | |
name = "keyvault-test-build" | |
resource_group_name = "images" | |
} | |
data "azurerm_key_vault_secret" "test" { | |
name = "prikey-test-build" | |
key_vault_id = data.azurerm_key_vault.test_build.id | |
} | |
resource "null_resource" "test" { | |
# Set the executable permission for scripts | |
provisioner "local-exec" { | |
command = "echo '${data.azurerm_key_vault_secret.test.value}' | base64 -d > /tmp/private-key" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment