Answers: <p>The terraform docs default to the lastest, version. The doc page you're looking at is,</p>
  <blockquote>
  <p><a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/internet_gateway_attachment#attributes-reference" rel="nofollow noreferrer">https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/internet_gateway_attachment#attributes-reference</a></p>
  </blockquote>
  <p>What you want to do is replace that <code>latest</code> with the version you're using, in this case <code>3.75.1</code>. Like this,</p>
  <blockquote>
  <p><a href="https://registry.terraform.io/providers/hashicorp/aws/3.75.1/docs/resources/internet_gateway_attachment#attributes-reference" rel="nofollow noreferrer">https://registry.terraform.io/providers/hashicorp/aws/3.75.1/docs/resources/internet_gateway_attachment#attributes-reference</a></p>
  </blockquote>
  <p>That brings up a 404,</p>
  <blockquote>
  <p>This documentation page doesn't exist for version 3.75.1 of the aws provider.</p>
  </blockquote>
  <p>Which basically means you must <a href="https://devops.stackexchange.com/q/15967/18965">upgrade the Terraform provider.</a></p>
  
Answers: CC BY-SA 4.0
Answers: 2022-05-14T19:37:36.700Z
Answers: 2022-05-14T20:12:28.843Z
Answers: 2022-05-14T20:12:28.843Z
Answers: Evan Carroll
Body: <p>Why do I get this error with Terraform,</p>
  <blockquote>
  <p>The provider hashicorp/aws does not support resource type &quot;aws_internet_gateway_attachment&quot;.</p>
  </blockquote>
  <p>You can see the resource <a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/internet_gateway_attachment" rel="nofollow noreferrer"><code>aws_internet_gateway_attachment</code> defined in the docs</a>. The full error is,</p>
  <pre><code>│ Error: Invalid resource type
  │ 
  │   on main.tf line 26, in resource &quot;aws_internet_gateway_attachment&quot; &quot;example&quot;:
  │   26: resource &quot;aws_internet_gateway_attachment&quot; &quot;example&quot; {
  │ 
  │ The provider hashicorp/aws does not support resource type &quot;aws_internet_gateway_attachment&quot;.
  ╵
  </code></pre>
  <p>this is the hdl I'm using</p>
  <pre><code>resource &quot;aws_internet_gateway_attachment&quot; &quot;example&quot; {
    internet_gateway_id = aws_internet_gateway.gw.id
    vpc_id              = aws_vpc.main.id
  }
  </code></pre>
  <hr />
  <p>I'm using version 3.75.1 of the AWS provider.</p>
  
Comments: CC BY-SA 4.0
Comments: 2022-05-12T12:06:31.707Z
Comments: Add some code, at least the lines in question and probably a few above and below it.
Comments: kenlukas
Comments: CC BY-SA 4.0
Comments: 2022-05-12T17:15:30.727Z
Comments: @kenlukas updated.
Comments: Evan Carroll
Comments: CC BY-SA 4.0
Comments: 2022-05-13T12:08:53.600Z
Comments: What version of the aws provider are you using?  It's possible that the resource you're attempting to use was released on a later version.
Comments: kenlukas
Comments: CC BY-SA 4.0
Comments: 2022-05-13T15:15:20.520Z
Comments: @kenlukas updated.
Comments: Evan Carroll
Comments: CC BY-SA 4.0
Comments: 2022-05-14T12:40:32.060Z
Comments: I don't see that resource for that version of the provider. Make sure that version is display at the top of the screen
Comments: George Udosen
Comments: CC BY-SA 4.0
Comments: 2022-05-14T12:42:52.740Z
Comments: Please update your provider version to use that resource definition
Comments: George Udosen
Tags: <amazon-web-services><terraform>
Title: The provider hashicorp/aws does not support resource type "aws_internet_gateway_attachment"
UserDisplayName: Evan Carroll
ThreadText: # The provider hashicorp/aws does not support resource type "aws_internet_gateway_attachment"
  
  (Asked by: username_0 on 2022-05-12)
  
  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 [`aws_internet_gateway_attachment` defined in the docs](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.
  
  **Tags:** amazon-web-services, terraform
  
  > **Comments:**
  > **username_1**: Add some code, at least the lines in question and probably a few above and below it.  
  > **username_0**: @username_1 updated.  
  > **username_1**: What version of the aws provider are you using?  It's possible that the resource you're attempting to use was released on a later version.  
  > **username_0**: @username_1 updated.  
  > **username_2**: I don't see that resource for that version of the provider. Make sure that version is display at the top of the screen  
  > **username_2**: Please update your provider version to use that resource definition  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2022-05-14. Score: 3 | Accepted answer
  
  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 [upgrade the Terraform provider.](https://devops.stackexchange.com/q/15967/18965)
  
  
  ---
  
  