Closed vysh0x50 closed 7 months ago
Voting for Prioritization
Volunteering to Work on This Issue
Hey @vyshnavlal 👋 Thank you for taking the time to raise this! In your vpc_link
module, the name
argument of the aws_api_gateway_vpc_link
resource is set to var.vpclink_name
. This (paired with the variable definition found in the modules/vpc_link/variables.tf
file) means that this module expects an argument of vpclink_name
, rather than name
in order to set the name of the VPC link resource.
In order to correctly call the vpc_link
module, you'll need to pass the arguments that it's expecting; vpclink_name
and target_arn
.
Note I'm intentionally ignoring that the variables have default values. Since those values are required in order to create a functional configuration, I'd personally remove the default values, but that's a different topic entirely.
The updated configuration in main.tf
would look like this:
module "vpclink" {
source = "./modules/vpc_link"
vpclink_name = var.vpclink_name
target_arn = var.target_arn
}
Since we haven't heard back, I'm going to close this issue. If you're still having trouble, please feel free to open a new issue, referencing this one for context as needed.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Terraform Core Version
1.5.0
AWS Provider Version
4.67.0
Affected Resource(s)
aws_api_gateway_vpc_link
Expected Behavior
It should support "name" argument as per the documentaion.
Actual Behavior
Getting the error: │ An argument named "name" is not expected here.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
-> modules/vpc_link/main.tf
-> modules/vpc_link/variables.tf
->modules/vpc_link/outputs.tf
->main.tf
->variables.tf
->terraform.tfvars
->outputs.tf
Steps to Reproduce
terraform validate
Debug Output
Panic Output
No response
Important Factoids
There are no errors when creating the resource "aws_api_gateway_vpc_link" without using a module. The documentaion includes
name = "example"
in the example usage.References
Adding the respective documentation
No other source found in internet regarding the "name" behavior issue.
Would you like to implement a fix?
None