Categories
Software development Technology

Terraform

Reading Time: < 1 minute

Doing

Prepare for Certification

Get Started – AWS : below has some issues, cannot find the image. Note I tried to find correct ami image id too (ami-032930428bf1abbff, via AWS console), but it appears there is another issue when a correct ami image id was used.

resource "aws_instance" "example" {
  ami           = "ami-830c94e3"
  instance_type = "t2.micro"
}

Error: Error launching source instance: VPCResourceNotSpecified: The specified instance type can only be used in a VPC. A subnet ID or network interface ID is required to carry out the request.
	status code: 400, request id: c8d85874-93fb-4e48-b515-97b50172826b

  on example.tf line 15, in resource "aws_instance" "example":
  15: resource "aws_instance" "example" {

*Amazon Linux AMI 2018.03.0 (HVM), SSD Volume Type – ami-032930428bf1abbff (from aws console)

Done

Get Started – Google Cloud

Get Started – Azure : one interesting part is it seems the user name and password for Azure in TF script is not checked (or in other words they are stateless?). Not sure why. Was using admin_username=plankton later while it was setup it was Password1234!

Two more comments on Azure: the Store Remote State part did not work perfectly. I believe Azure free tier has one year limit: it shows 6 cents so far for my infrastructure experiment. Also: the detailed cost.

Get Started – Terraform Cloud

Leave a Reply

Your email address will not be published. Required fields are marked *