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.84k stars 9.19k forks source link

[Bug]: AWS kinesis analytics vpc configuration unable to fetch the details for your Subnet resources #30404

Open JiaTingYefei opened 1 year ago

JiaTingYefei commented 1 year ago

Terraform Core Version

1.4.2

AWS Provider Version

2.7.10

Affected Resource(s)

I can create kinesis data analytics application successfully without vpc_configuration , but failed when add vpc_configuration : Error: adding Kinesis Analytics v2 Application (arn:aws-cn:kinesisanalytics:cn-north-1:346000000000:application/example-flink-application) VPC configuration: InvalidArgumentException: Please check the role provided or the validity of Subnet resources provided. We are unable to fetch the details for your Subnet resources.

Expected Behavior

create kinesis analytics application in a VPC

Actual Behavior

│ Error: adding Kinesis Analytics v2 Application (arn:aws-cn:kinesisanalytics:cn-north-1:346461971869:application/example-flink-application) VPC configuration: InvalidArgumentException: Please check the role provided or the validity of Subnet resources provided. We are unable to fetch the details for your Subnet resources.

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

vpc_configuration { security_group_ids = [id1, id2] subnet_ids = [id1, id2] }

Steps to Reproduce

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kinesisanalyticsv2_application#vpc_configuration

follow the example in the doc

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 1 year ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

nick-ppcprotect commented 1 year ago

I had this same error and it came down to missing some required VPC permissions: https://docs.aws.amazon.com/kinesisanalytics/latest/java/vpc-permissions.html

bkosaraju commented 9 months ago

Just to elaborate @nick-ppcprotect comment above ☝️ - the IAM role attached Under ServiceExecutionRole must have the VPC permissions, certainly not a bug but misleading error ..