Skip to content

anoopkum/openai-terraform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Azure OpenAI and Azure AI Search Deployment with Terraform

This Terraform configuration deploys an AI solution on Azure, including:

  • Azure Resource Group
  • Azure Cognitive Search service
  • Azure OpenAI resource for deploying ChatGPT 4o LLM model
  • Azure Storage Account and Storage Container

Prerequisites

Install the following before you start:

Ensure you have the proper Azure permissions to create resources.

Terraform Configuration Overview

This setup creates the following resources:

  • Resource Group
  • Azure Cognitive Search
  • Azure OpenAI Cognitive Account
  • Azure Storage Account and Container

Provider Configuration

The provider.tf file configures the Azure provider and backend for state management:

terraform {
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "4.00"
    }
  }
  backend "azurerm" {
    resource_group_name   = "rg-state"
    storage_account_name  = "satfstaterxt"
    container_name        = "catfstaterxt"
    key                   = "terraform.tfstate"
  }
}

provider "azurerm" {
  features {}
}

This ensures that the Terraform state is stored in an Azure Blob Storage container for remote state management.

Setup Instructions

  1. Clone the Repository to your local direcotory

    git clone https://github.com/anoopkum/openai-terraform
    cd local_directory
  2. Edit a terraform.tfvars file with the your choice values:

rg_name         = "RG-openAI-demo"
ai_search_name  = "ai-search-rxt-demo"
openai_name     = "openai-rxt-demo"
sa_name         = "openaisademo01"
container_name  = "democontainer"
location        = "eastus"
deployment_name = "chatgpt4o"
  1. Initialize Terraform

    terraform init
  2. Review and Apply the Plan

terraform plan
terraform apply

File Structure

.
├── main.tf                 # Main Terraform configuration
├── variables.tf            # Variable definitions
├── provider.tf             # Provider and backend configuration
├── terraform.tfvars        # Variable values
├── .gitignore              # Git ignore file
└── README.md               # This readme file

References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages