-
Notifications
You must be signed in to change notification settings - Fork 79
fix: update mappings for AWS Provider v6 compatibility #902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Remove s3_settings from aws_dms_endpoint mapping and add aws_dms_s3_endpoint mapping to fix maintenance workflow failures with AWS Provider v6. In AWS Provider v6, the s3_settings attribute was removed from aws_dms_endpoint and a dedicated aws_dms_s3_endpoint resource was introduced for S3-specific DMS endpoints. This change updates the mappings accordingly and generates validation rules for the new resource. - Remove s3_settings from aws_dms_endpoint mapping - Add aws_dms_s3_endpoint mapping with S3-specific validation attributes - Update provider version constraint to ~> 6.0 - Generate new validation rules for aws_dms_s3_endpoint Fixes #899
Improve the generator to handle AWS Provider v6 schema differences gracefully: - Convert fetchSchema panics to proper error handling - Skip missing attributes with informative error messages - Allow generator to complete successfully despite schema mismatches - Remove deprecated attributes from EC2 mappings (vpc, cpu_core_count, cpu_threads_per_core) This enables the maintenance workflow to run successfully with AWS Provider v6 while providing clear feedback about incompatible mappings.
Update the generator to handle AWS Provider v6 schema differences: - Replace panic calls with proper error handling that exits with status 1 - Remove deprecated attributes that no longer exist in AWS Provider v6: - aws_eip.vpc - aws_instance.cpu_core_count - aws_instance.cpu_threads_per_core - aws_launch_template.elastic_inference_accelerator - aws_launch_template.elastic_gpu_specifications This ensures the maintenance workflow fails gracefully with clear error messages when mappings are incompatible with the provider schema.
Remove all deprecated attributes and end-of-life services according to AWS Provider v6 migration guide. This resolves the maintenance workflow failures by ensuring all mappings are compatible with the v6.0 provider schema. Changes: - Remove aws_spot_instance_request.block_duration_minutes (deprecated) - Remove aws_eks_addon.resolve_conflicts (deprecated) - Remove aws_ssm_association.instance_id (deprecated) - Remove aws_flow_log.log_group_name (deprecated) - Remove aws_redshift_cluster.logging and snapshot_copy (deprecated) - Remove entire opsworks.hcl (service EOL May 2024) - Remove entire simpledb.hcl (not supported in AWS SDK v2) - Regenerate validation rules and resource lists Fixes #899
@bendrucker Thank you for working on this. Any blockers for this PR? |
I think this should basically be ready, I can pick this up today. The Smithy switch is somewhat more involved because of changes to the API spec that are potentially breaking. I got caught up in workarounds for that and I think just forgot to come back to this one. |
- Update terraform.lock.hcl to v6.5.0 - Regenerate provider schema with latest version - Add new resources to tags list: - aws_bedrockagent_flow - aws_kinesis_stream_consumer - aws_s3_directory_bucket
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
Summary
Complete AWS Provider v6.0 compatibility migration for tflint-ruleset-aws. This PR addresses all breaking changes from the v6 migration guide.
Changes
DMS Resource Updates
s3_settings
fromaws_dms_endpoint
mapping (moved to dedicated resource in v6)aws_dms_s3_endpoint
mapping with 8 S3-specific validation attributesDeprecated Attribute Removals
aws_spot_instance_request.block_duration_minutes
aws_eks_addon.resolve_conflicts
aws_ssm_association.instance_id
aws_flow_log.log_group_name
aws_redshift_cluster.logging
andsnapshot_copy
End-of-Life Service Removals
Generator Improvements
Fixes #899