Posts

Showing posts from December, 2022

Create EC2 -Instance : Exercise 1

 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Code : # Terraform Settings Block terraform {   required_providers {     aws = {       source  = "hashicorp/aws"       #version = "~> 3.21" # Optional but recommended in production     }   } } # Provider Block provider "aws" {   profile = "default" # AWS Credentials Profile configured on your local desktop terminal  $HOME/.aws/credentials   region   = "ap-south-1" } # Resource Block resource "aws_instance" "ec2demo" {   ami           = "ami-074dc0a6f6c764218" # Amazon Linux in us-east-1, update as per your region   instance_type = "t2.micro" }

PowerDNS Turrangrunt

 [root@atlantis-test-cc a_records]# cat terragrunt.hcl locals {   # ========= This Workspace Config   ws_data = yamldecode(file("workspace_params.yml"))   wf_data = yamldecode(file("workflow_params.yml"))   tf_lib_module_release = local.wf_data.tf_code.release_tag } terraform {   source = "${local.wf_data.tf_code.source_url}//?ref=${local.wf_data.tf_code.release_tag}" } #include { #  path = find_in_parent_folders() #} inputs = {   pdns_zone = local.ws_data.terragrunt.resources.pdns_zone #  pdns_name = local.ws_data.terragrunt.resources.pdns_name #  pdns_record = local.ws_data.terragrunt.resources.pdns_record #  rtype = local.ws_data.terragrunt.resources.rtype   records1 = {     record0 = {       name = "ps.dctest.io."       pdns_zone = "dctest.io"       type = "A"       ttl = "300"       records = ["10.10.33.198","10.10.33.199"]     }...

PowerDNS

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ DOMAIN ADDITION  [root@atlantis-test-cc auto_multiple_domain_SRJ]# cat main.tf resource "powerdns_zone" "zone" {   for_each = { for k, v in var.zones : k => v }   name = each.value.name   kind = each.value.kind   nameservers = each.value.nameservers } ====== [root@atlantis-test-cc auto_multiple_domain_SRJ]# cat main.tf resource "powerdns_zone" "zone" {   for_each = { for k, v in var.zones : k => v }   name = each.value.name   kind = each.value.kind   nameservers = each.value.nameservers } [root@atlantis-test-cc auto_multiple_domain_SRJ]# cat variables.tf variable "pdns_api_key" {   type = string   default = "8x8powerdns" } variable "pdns_server_url" {   type = string   default = "http://10.170.20.26:8081" } #variable "pdns_zone" { #  type = stri...

Terraform Basics

 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 7 : Configure AWS CLI Go to IAM --User -- create an administrative credentials and use it. C:\Users\sreejith_b>aws configure AWS Access Key ID [****************FPMZ]: AKIAWVZ2LS7ZIQQ4256N AWS Secret Access Key [****************bRHl]: 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 Default region name [ap-south-1]: ap-south-2 Default output format [None]: 02-02 -- Terraform Command basics. # Terraform Settings Block terraform {   required_providers {     aws = {       source  = "hashicorp/aws"       #version = "~> 3.21" # Optional but recommended in production     }   } } # Provider Block provider "aws" {   profile = "default" # AWS Credentials Profile configured on your local desktop terminal  $HOME/.aws/credentials   region   = "a...