Skip to content

MichaelHaigh/netapp-1p-k8s-terraform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NetApp 1st Party Cloud Storage and Kubernetes Terraform IaC

This repository contains Terraform code which creates NetAppp 1st-Party Cloud Storage with the corresponding hyperscaler Kubernetes-as-a-Service offering:

The finer details will vary between hyperscaler, however overall each implementation will deploy the following resources:

  • Isolated networking (VPC)
  • Necessary Identity and Access Management (IAM) policies/roles
  • 1st-Party NetApp Storage
  • A Kubernetes cluster with:

Getting Started

Simply change into the hyperscaler directory of your choice, and initialize terraform:

terraform init

the provider version in each main.tf file is constrained by the ~> operator to ensure code compatibility, however feel free to change to a different operator if needed.

Next, update the default.tfvars file to have the deployment parameters of choosing. Additional information on their meanings can be found in the variables.tf file.

Plan your deployment with the following command (more information on workspaces in the section below):

terraform plan -var-file="$(terraform workspace show).tfvars"

Create your deployment:

terraform apply -var-file="$(terraform workspace show).tfvars"

When your deployment is no longer needed, run the following command to clean up all resources:

terraform destroy -var-file="$(terraform workspace show).tfvars"

Workspaces Support

All code in this respository has been designed to support Terraform Workspaces. This enables multiple deployments (for example: prod and dr, and/or useast1 and useast2) of the same type of environments. To create new workspaces (beyond the default workspace), run the following command:

terraform workspace new <workspace-name>

Next, copy the default.tfvars file (be sure to match your workspace name):

cp default.tfvars <workspace-name>.tfvars

Optionally edit the <workspace-name>.tfvars file, and then deploy the new environment with the same command:

terraform apply -var-file="$(terraform workspace show).tfvars"

To switch to a different workspace, run:

terraform workspace select <workspace-name>

To view all available workspaces, run:

terraform workspace list

About

NetAppp 1st Party Cloud Storage and Kubernetes Terraform IaC

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors