filmov
tv
Lab #7: Terraform Local Values | How to use Terraform Local Values | Terraform Locals

Показать описание
In this Video We are going to cover Terraform Local Values | How to use Terraform Local Values | Terraform Locals with terraform variables
#terraformlocalvalues #terraformlocals #terraformtutorial
0:00 What is Terraform local values
0:43 How to use terraform local values
7:30 How to use terraform local with terraform variables
Example of local values in Terraform:
provider "aws" {
region = "ap-south-1"
}
locals {
local_setup = "local_demo"
}
resource "aws_vpc" "local_demo-vpc" {
tags = {
}
}
resource "aws_subnet" "local_demo-subnet" {
tags = {
}
}
resource "aws_instance" "Terraform_demo" {
ami = "ami-0c1a7f89451184c8b"
key_name = "Dev-UbuntuKey"
tags = {
}
}
variable "instance_type" {
}
variable "cidr_block" {
default = "10.5.0.0/16"
}
How to use terraform local with terraform variables?
provider "aws" {
region = "ap-south-1"
}
locals {
}
resource "aws_instance" "Terraform_demo" {
ami = "ami-0c1a7f89451184c8b"
key_name = "Dev-UbuntuKey"
tags = {
}
}
variable "instance_type" {
}
variable "cidr_block" {
default = "10.5.0.0/16"
}
variable "project_name" {
description = "Location of server"
type = string
default = "Project_Name"
}
variable "environment" {
description = "Name of server"
type = string
default = "dev"
}
If you likes our video, please subscribe our channel on YouTube Channel
#terraformlocalvalues #terraformlocals #terraformtutorial
0:00 What is Terraform local values
0:43 How to use terraform local values
7:30 How to use terraform local with terraform variables
Example of local values in Terraform:
provider "aws" {
region = "ap-south-1"
}
locals {
local_setup = "local_demo"
}
resource "aws_vpc" "local_demo-vpc" {
tags = {
}
}
resource "aws_subnet" "local_demo-subnet" {
tags = {
}
}
resource "aws_instance" "Terraform_demo" {
ami = "ami-0c1a7f89451184c8b"
key_name = "Dev-UbuntuKey"
tags = {
}
}
variable "instance_type" {
}
variable "cidr_block" {
default = "10.5.0.0/16"
}
How to use terraform local with terraform variables?
provider "aws" {
region = "ap-south-1"
}
locals {
}
resource "aws_instance" "Terraform_demo" {
ami = "ami-0c1a7f89451184c8b"
key_name = "Dev-UbuntuKey"
tags = {
}
}
variable "instance_type" {
}
variable "cidr_block" {
default = "10.5.0.0/16"
}
variable "project_name" {
description = "Location of server"
type = string
default = "Project_Name"
}
variable "environment" {
description = "Name of server"
type = string
default = "dev"
}
If you likes our video, please subscribe our channel on YouTube Channel
Комментарии