0

I'm a developer studying terraform.

I was practicing creating aws-vpc using terraform.

Executing the terraform apply command to see a message that the aws_vpc resource was successful

enter image description here

However, when checking the aws dashboard, I found an issue that was not generated (aws_vpc)

enter image description here

Is there anything I missed?

Env & Result

This is the tf file used to create vpc


resource "aws_vpc" "main" {
  cidr_block       = "10.0.0.0/16"

  tags = {
    Name = "terraform-101"
  }
}

This is the terraform.tfstate (After terraform apply command)

{
  "version": 4,
  "terraform_version": "1.3.6",
  "serial": 9,
  "lineage": "77523688-c1e9-2a45-7c9a-eaf2f866c290",
  "outputs": {},
  "resources": [
    {
      "mode": "managed",
      "type": "aws_vpc",
      "name": "main",
      "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
      "instances": [
        {
          "schema_version": 1,
          "attributes": {
            "arn": "arn:aws:ec2:ap-northeast-2:845502535698:vpc/vpc-016e5391ed5e5fb21",
            "assign_generated_ipv6_cidr_block": false,
            "cidr_block": "10.0.0.0/16",
            "default_network_acl_id": "acl-0d138ce7c406b664f",
            
            ...

            "tags": {
              "Name": "terraform-101"
            },
            "tags_all": {
              "Name": "terraform-101"
            }
          },
          "sensitive_attributes": [],
          "private": "~~~"
        }
      ]
    }
  ],
  "check_results": null
}

I searched, but I couldn't find the right reason for the cause..

Ervin Szilagyi
  • 14,274
  • 2
  • 25
  • 40
mh-k.kor
  • 1
  • 1

0 Answers0