]
}
]
}
Note:
Replace ACCOUNT-ID, MY-REGION, MY-DYNAMODB, and MY-S3-
BUCKET with their appropriate values for your environment.
3.
Create a t2.micro EC2 Linux instance from which to run terraform.
See the
for instructions.
4.
Apply the IAM policies created above to the EC2 instance.
5.
From your EC2 instance, install the latest version of terraform.
a.
https://releases.hashicorp.com/terraform/
b.
Download the latest version.
c.
Unzip the zip file.
unzip terraform_*_linux_amd64.zip
d.
Copy the terraform binary to a location within your environment's PATH
variable.
sudo cp terraform /usr/local/bin/
6.
Create an SSH keypair and set the permissions on the private key.
ssh-keygen -t rsa -b 4096 -f aws-acme-key
chmod 400 aws-acme-key
7.
Download the OCSBC image from the
Oracle Software Delivery Cloud
contains both the terraform stack builder and the qcow2 image. Copy the terraform
stack builder file and the qcow2 image to your EC2 instance.
scp -i .ssh/aws-key nnSCZ840p3-img-vm_kvm.tgz [email protected]:
scp -i .ssh/aws-key nnSCZ840p3_tfStackBuilder.tar.gz ec2-
8.
Extract the terraform scripts and the qcow2 image.
tar xvf nnSCZ840p3-img-vm_kvm.tgz
tar xvf nnSCZ840p3_tfStackBuilder.tar.gz
Create an S3 Bucket
Follow the procedure below if you want to create an S3 bucket. If you have an existing
S3 bucket you want to use, skip this section.
Chapter 7
Create and Deploy OCSBC Instances on EC2
7-20