The provider hashicorp/aws does not support resource type "aws_internet_gateway_attachment"



  • Why do I get this error with Terraform,

    The provider hashicorp/aws does not support resource type "aws_internet_gateway_attachment".

    You can see the resource https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/internet_gateway_attachment . The full error is,

    │ Error: Invalid resource type
    │ 
    │   on main.tf line 26, in resource "aws_internet_gateway_attachment" "example":
    │   26: resource "aws_internet_gateway_attachment" "example" {
    │ 
    │ The provider hashicorp/aws does not support resource type "aws_internet_gateway_attachment".
    ╵
    

    this is the hdl I'm using

    resource "aws_internet_gateway_attachment" "example" {
      internet_gateway_id = aws_internet_gateway.gw.id
      vpc_id              = aws_vpc.main.id
    }
    

    I'm using version 3.75.1 of the AWS provider.



  • The terraform docs default to the lastest, version. The doc page you're looking at is,

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

    What you want to do is replace that latest with the version you're using, in this case 3.75.1. Like this,

    https://registry.terraform.io/providers/hashicorp/aws/3.75.1/docs/resources/internet_gateway_attachment#attributes-reference

    That brings up a 404,

    This documentation page doesn't exist for version 3.75.1 of the aws provider.

    Which basically means you must https://devops.stackexchange.com/q/15967/18965



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2