Creating the terraform-en-1 user using the IAM service
Access the AWS console (https://aws.amazon.com)
and log in with your newly created account. In the search bar, type IAM. In the Services section, click on IAM.
Click on Users and then Add users, enter the name terraform-en-1 and click Next to create a programmatic type user.
ALT
After advancing, in Set permissions, click on the Attach existing policies directly button.
ALT
Type AmazonS3FullAccess in Search.
Select AmazonS3FullAccess
ALT
Click on Next
Review all the details
Click on Create user
Creating the Access Key for the terraform-en-1 user using the IAM service
Access the terraform-en-1 user
ALT
Click on the Security credentials tab
ALT
Navigate to the Access keys section
Click on Create access key
ALT
Select Command Line Interface (CLI) and I understand the above recommendation and want to proceed to create an access key.
ALT
Click on Next.
Click on Create access key
ALT
Click on Download .csv file
ALT
After the download finishes, click on Done.
Once the download is complete, rename the .csv file to key.csv
Steps in Google Cloud Platform (GCP)
Preparing the environment to run Terraform
Access the Google Cloud Console (console.cloud.google.com)
and log in with your newly created account
Open the Cloud Shell
ALT
ALT
Download the mission1.zip file in the Google Cloud shell using the wget command
Running Terraform to provision MultiCloud infrastructure in AWS and Google Cloud
Execute the following commands to provision infrastructure resources
Plain Text
Copy
cd ~/mission1/en/terraform/
Plain Text
Copy
terraform init
Plain Text
Copy
terraform plan
Plain Text
Copy
terraform apply
Attention: The provisioning process can take between 15 to 25 minutes to finish. Keep the CloudShell open during the process. If disconnected, click on Reconnect when the session expires (the session expires after 5 minutes of inactivity by default)
Appendix I - Destroying the environment and starting over
In case you have encountered any problem/error and want to reset the environment to start over, follow the step-by-step instructions below to remove the entire MultiCloud environment.
For production environments, it's recommended to use only the Private Network for database access.
Never provide public network access (0.0.0.0/0) to production databases.
By reaching this point, you have completed the implementation of the first part of the Hands-on Project and have implemented resources in a MultiCloud (AWS and Google Cloud) environment using Terraform!