AWS_AMI_COPY - COPY CODE
write ami id and the region we are in
important if we want to copy ami in california region . we need to change region in "provider " region= "us-west-1"
vim moon.tf
provider "aws" {
region = "us-west-1"
access_key = "AKIN6BKVUGQ"
secret_key = "KfU0tFpao0b+GG63xN99jTMdfVkt1aurid"
}
resource "aws_ami_copy" "example" {
name = "terraform-example-COPY"
description = "COPY AMI"
source_ami_id = "ami-0e7540ad79b0d2157"
source_ami_region = "us-east-1"
tags = {
Name = "HelloWorld"
}
}
Comments
Post a Comment