patternterraformMinor
The provider hashicorp/aws does not support resource type "aws_internet_gateway_attachment"
Viewed 0 times
aws_internet_gateway_attachmenttheproviderresourcehashicorptypedoesawsnotsupport
Problem
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
this is the hdl I'm using
I'm using version 3.75.1 of the AWS provider.
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. 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.
Solution
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
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://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.
Context
StackExchange DevOps Q#15954, answer score: 3
Revisions (0)
No revisions yet.