hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.6k stars 8.99k forks source link

[Docs]: aws_vpc.<name>.cidr_block is missing in attribute reference #38034

Open kschoenberger opened 2 weeks ago

kschoenberger commented 2 weeks ago

Documentation Link

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc#attribute-reference

Description

In the documentation the attribute reference cidr_block is not mentioned, but it is supported in my TF code.

resource "aws_vpc" "test" {
  cidr_block           = "10.0.0.0/16"
  enable_dns_hostnames = true

  tags = {
    Name = "Test"
  }
}
output "vpc_cidr" {
  value = aws_vpc.test.cidr_block
}

when I apply the config, I get

Changes to Outputs:
  + vpc_cidr                          = "10.0.0.0/16"

AWS provider version 5.51.1 Terraform version v1.5.7

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 2 weeks ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

stefanfreitag commented 2 weeks ago

Good morning @kschoenberger ,

there is a hint in the documentation on this. image

I am looking into a similar issue ( #37908 ) and asked for general guidance for handling this.

stefanfreitag commented 1 week ago

If it's ok I will apply similar approach as I did in #37908 and come up with a PR.