Created
March 14, 2021 11:55
-
-
Save erankitcs/c6372745a402f385b8740145026f9a06 to your computer and use it in GitHub Desktop.
Azure Service Account for Cognitive Services in Terraform and store secrets into AWS Parameter Store.
This file contains hidden or 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
provider "azurerm" { | |
version = "=2.0.0" | |
### Fix for Error: "features": required field is not set | |
features {} | |
skip_provider_registration = true | |
} | |
provider "aws" { | |
region = "us-east-1" | |
} | |
resource "azurerm_resource_group" "imagelense" { | |
name = "imagelense" | |
location = "East US" | |
} | |
resource "azurerm_cognitive_account" "imagelense" { | |
name = "imagelense-account" | |
location = "West US" ##azurerm_resource_group.imagelense.location | |
resource_group_name = azurerm_resource_group.imagelense.name | |
kind = "ComputerVision" | |
sku_name = "S1" | |
} | |
resource "aws_ssm_parameter" "subscription_key" { | |
name = "/azure/subsctiptionkey" | |
type = "SecureString" | |
value = azurerm_cognitive_account.imagelense.primary_access_key | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment