Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save erankitcs/c6372745a402f385b8740145026f9a06 to your computer and use it in GitHub Desktop.
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.
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