Skip to main content
Menu
terraform | Cheatsheets
terraform

Terraform Script to Provision Windows Server

January 16, 2020
devops
terraform

File Structure # ── windows-server-tf/ ├── key.tf ├── provider.tf ├── test.txt ├── vars.tf ├── versions.tf └── windows.tf key.tf file # resource "aws_key_pair" "windows-key" { key_name = "windows-key" public_key = file(var.PATH_TO_PUBLIC_KEY) } provider.tf file # provider "aws" { region = var.AWS_REGION } test.txt file # test file vars.tf file # variable "AWS_REGION" { default = "us-east-1" } variable "PATH_TO_PRIVATE_KEY" { default = "windows" } variable "PATH_TO_PUBLIC_KEY" { default = "windows. ...