-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Data sources with non-deterministic IDs show perpetual diff with Terraform 0.13 (R015, R016, R017 linters) #14579
Comments
In our case, we use This makes pull requests/reviews quite difficult as some of our Terraform repositories are quite large, and make use of a lot of |
A few notes since this change was unexpected for Terraform Providers. There may be some additional work the Terraform core team can do to prevent this unexpected plan output issue from occurring in later Terraform 0.13 releases, but it is unknown if/what that might entail at the moment, so unable to provide any estimates on timelines. For example: hashicorp/terraform#25812 We just migrated this provider to the newly released version 2 of the Terraform Plugin SDK which should allow us to run the acceptance testing against Terraform 0.13.0 directly (currently running against 0.12.26). Bumping our testing to that version would potentially make this class of issue more visible. However, I just submitted a bunch of issues here and in the SDK to cover the 30 or so new consistent test failures caused by the SDK version 2 upgrade. Ideally we need to get through those before potentially adding more uncertainty about the causes for test failures since the SDK v2 framework may not fully be compatible with Terraform 0.13 yet. New Longterm this is certainly something we will need to address more holistically as this behavior change will be the default in Terraform core, but we should come up with a game plan before jumping to code changes. |
To clarify the issue here, since this is being referenced from many places, the apparent diffs from a non-deterministic ID is only the symptom, and not the underlying problem. While it may be better in the long run to have deterministic attributes when possible (remember that core attributes to special meaning to The problems here are mostly stemming from 2 places; either the schema is incorrectly defined with data being written to a non-computed field; or the SDK is altering a zero value for a schema block. The former problem is usually a simple change in the resource definition, while the latter should be remedied with with a patch in core for 0.13.1. |
I was experiencing the same issue, and found that upgrading my version of Terraform fixed my issue. Using latest version of the AWS provider (3.7.0 at the time of comment) and version 0.13.1+ (tested 0.13.1, 0.13.2, 0.13.3), this does not seem to be an issue. I tested with the aws_availability_zones data source. Just a note here, I did test with Terraform version 0.13.0 with AWS provider version 3.7.0, and the issue persisted when doing that. |
can also confirm @ktmorgan 's account |
I still experience this issue with terraform 0.13.3 and aws provider 3.8.0
|
Same issue for me with latest Terraform 0.13.3, and 3.8.0 AWS provider.
Any estimates for the fix? |
…ear identifiers Reference: #14579 Reference: https://github.com/bflad/tfproviderlint/tree/master/passes/R015 Reference: https://github.com/bflad/tfproviderlint/tree/master/passes/R016 Reference: https://github.com/bflad/tfproviderlint/tree/master/passes/R017 Reference: https://www.terraform.io/docs/extend/best-practices/versioning.html#example-major-number-increments Reference: https://registry.terraform.io/providers/hashicorp/random/ Reference: https://registry.terraform.io/providers/hashicorp/time/ Terraform 0.13 reworked data source reads into the plan graph, which had some unintentional consequences with Terraform Plugin SDK and provider behaviors that were previously ignored when displaying plan differences. While some of these differences dealing with empty and missing blocks could be addressed with extra graph logic, there remains problematic behaviors that will not be addressable in the near future in core or the SDK. This change set uses the `tfproviderlint` R015, R016, and R017 checks to find `(*schema.ResourceData).SetId()` usage with unstable values such as the current time and per-execution random identifiers and where the identifier can be stablized based on the data source purpose and surrounding context. For example, singular data sources that represent an analogous managed resource can use the same identifier (e.g. `aws_acm_certificate`, `aws_autoscaling_group`). Other cases where the data source represents information from an AWS Partition or AWS Region are stabilized with those as identifiers (e.g. `aws_regions`). Importantly, its worth noting that while the unstable `id` attribute is the most visible in the plan difference output, it does not necessarily represent the underlying issue that is causing the output to show. There are two known cases, first with providers unexpectedly writing values to unconfigured and uncomputed attributes and second with Default usage in data source schemas, that are the real triggers of the unexpected difference output. Additional upstream bug reports to properly show difference sigils in the plan difference output are likely necessary, since in many of the real world cases of this particular issue they are missing. Potential future bug reports containing these data sources may help guide those. Another important note here is that per the Extending Terraform documentation for versioning, that resource identifier changes typically fall under a best practice of a major version increment for Terraform Providers. Given the widespread reports of unexpected behavior as practitioners are upgrading to Terraform 0.13 and since the old identifiers did not represent meaningful information for the lookup context, these changes are not lightly being considered a bug fix. If the usage of a changing time stamp is necessary, the `timestamp()` function and Terraform Time Provider are recommended methodologies for this information. If the usage of a changing random identifier is necessary, the Terraform Random Provider is the recommended methodology. There still remains other data sources and resources that suffer from known unstable identifiers, such as many plural data sources. Determination of the path forward for these is still undetermined, since ideally Terraform Providers should no longer need to set an `id` attribute after Terraform 0.12, however the Terraform Plugin SDK does not provide functionality to avoid this yet. Future changes may involve a standardized pattern for these within the provider itself. Changes: ``` NOTES: * data-source/aws_acm_certificate: The `id` attribute has changed to the ARN of the ACM Certificate. The first apply of this updated data source may show this difference. * data-source/aws_autoscaling_group: The `id` attribute has changed to the name of the Auto Scaling Group. The first apply of this updated data source may show this difference. * data-source/aws_availability_zones: The `id` attribute has changed to the name of the AWS Region. The first apply of this updated data source may show this difference. * data-source/aws_db_event_categories: The `id` attribute has changed to the name of the AWS Region. The first apply of this updated data source may show this difference. * data-source/aws_ebs_default_kms_key: The `id` attribute has changed to the name of the AWS Region. The first apply of this updated data source may show this difference. * data-source/aws_ebs_encryption_by_default: The `id` attribute has changed to the name of the AWS Region. The first apply of this updated data source may show this difference. * data-source/aws_ec2_instance_type_offering: The `id` attribute has changed to the EC2 Instance Type. The first apply of this updated data source may show this difference. * data-source/aws_ecr_authorization_token: The `id` attribute has changed to the AWS Region. The first apply of this updated data source may show this difference. * data-source/aws_ecr_image: The `id` attribute has changed to the SHA256 digest of the ECR Image. The first apply of this updated data source may show this difference. * data-source/aws_eks_cluster_auth: The `id` attribute has changed to the name of the EKS Cluster. The first apply of this updated data source may show this difference. * data-source/aws_iam_account_alias: The `id` attribute has changed to the AWS Account Alias. The first apply of this updated data source may show this difference. * data-source/aws_kms_alias: The `id` attribute has changed to the ARN of the KMS Alias. The first apply of this updated data source may show this difference. * data-source/aws_partition: The `id` attribute has changed to the identifier of the AWS Partition. The first apply of this updated data source may show this difference. * data-source/aws_regions: The `id` attribute has changed to the identifier of the AWS Partition. The first apply of this updated data source may show this difference. * data-source/aws_sns_topic: The `id` attribute has changed to the ARN of the SNS Topic. The first apply of this updated data source may show this difference. FIXES: * data-source/aws_acm_certificate: Prevent plan differences with the `id` attribute * data-source/aws_autoscaling_group: Prevent plan differences with the `id` attribute * data-source/aws_availability_zones: Prevent plan differences with the `id` attribute * data-source/aws_db_event_categories: Prevent plan differences with the `id` attribute * data-source/aws_ebs_default_kms_key: Prevent plan differences with the `id` attribute * data-source/aws_ebs_encryption_by_default: Prevent plan differences with the `id` attribute * data-source/aws_ec2_instance_type_offering: Prevent plan differences with the `id` attribute * data-source/aws_ecr_authorization_token: Prevent plan differences with the `id` attribute * data-source/aws_ecr_image: Prevent plan differences with the `id` attribute * data-source/aws_eks_cluster_auth: Prevent plan differences with the `id` attribute * data-source/aws_iam_account_alias: Prevent plan differences with the `id` attribute * data-source/aws_kms_alias: Prevent plan differences with the `id` attribute * data-source/aws_partition: Prevent plan differences with the `id` attribute * data-source/aws_regions: Prevent plan differences with the `id` attribute * data-source/aws_sns_topic: Prevent plan differences with the `id` attribute ``` Output from acceptance testing: ``` --- PASS: TestAccAwsAutoScalingGroupDataSource_basic (38.65s) --- PASS: TestAccAWSAvailabilityZones_AllAvailabilityZones (23.55s) --- PASS: TestAccAWSAvailabilityZones_basic (23.40s) --- PASS: TestAccAWSAvailabilityZones_ExcludeNames (14.32s) --- PASS: TestAccAWSAvailabilityZones_ExcludeZoneIds (24.34s) --- PASS: TestAccAWSAvailabilityZones_Filter (23.32s) --- PASS: TestAccAWSAvailabilityZones_stateFilter (23.23s) --- PASS: TestAccAWSDbEventCategories_basic (15.76s) --- PASS: TestAccAWSDbEventCategories_sourceType (14.71s) --- PASS: TestAccAWSEc2InstanceTypeOfferingDataSource_Filter (23.91s) --- PASS: TestAccAWSEc2InstanceTypeOfferingDataSource_LocationType (24.65s) --- PASS: TestAccAWSEc2InstanceTypeOfferingDataSource_PreferredInstanceTypes (23.58s) --- PASS: TestAccAWSEcrAuthorizationTokenDataSource_basic (23.96s) --- PASS: TestAccAWSEcrDataSource_ecrImage (24.22s) --- PASS: TestAccAWSEksClusterAuthDataSource_basic (19.59s) --- PASS: TestAccDataSourceAwsEBSDefaultKmsKey_basic (20.11s) --- PASS: TestAccDataSourceAwsEBSEncryptionByDefault_basic (23.26s) --- PASS: TestAccDataSourceAwsKmsAlias_AwsService (24.27s) --- PASS: TestAccDataSourceAwsKmsAlias_CMK (28.03s) --- PASS: TestAccDataSourceAwsRegions_AllRegions (23.30s) --- PASS: TestAccDataSourceAwsRegions_basic (23.44s) --- PASS: TestAccDataSourceAwsRegions_Filter (22.16s) --- PASS: TestAccDataSourceAwsSnsTopic_basic (26.41s) ```
…ear identifiers (#15399) Reference: #14579 Reference: https://github.com/bflad/tfproviderlint/tree/master/passes/R015 Reference: https://github.com/bflad/tfproviderlint/tree/master/passes/R016 Reference: https://github.com/bflad/tfproviderlint/tree/master/passes/R017 Reference: https://www.terraform.io/docs/extend/best-practices/versioning.html#example-major-number-increments Reference: https://registry.terraform.io/providers/hashicorp/random/ Reference: https://registry.terraform.io/providers/hashicorp/time/ Terraform 0.13 reworked data source reads into the plan graph, which had some unintentional consequences with Terraform Plugin SDK and provider behaviors that were previously ignored when displaying plan differences. While some of these differences dealing with empty and missing blocks could be addressed with extra graph logic, there remains problematic behaviors that will not be addressable in the near future in core or the SDK. This change set uses the `tfproviderlint` R015, R016, and R017 checks to find `(*schema.ResourceData).SetId()` usage with unstable values such as the current time and per-execution random identifiers and where the identifier can be stablized based on the data source purpose and surrounding context. For example, singular data sources that represent an analogous managed resource can use the same identifier (e.g. `aws_acm_certificate`, `aws_autoscaling_group`). Other cases where the data source represents information from an AWS Partition or AWS Region are stabilized with those as identifiers (e.g. `aws_regions`). Importantly, its worth noting that while the unstable `id` attribute is the most visible in the plan difference output, it does not necessarily represent the underlying issue that is causing the output to show. There are two known cases, first with providers unexpectedly writing values to unconfigured and uncomputed attributes and second with Default usage in data source schemas, that are the real triggers of the unexpected difference output. Additional upstream bug reports to properly show difference sigils in the plan difference output are likely necessary, since in many of the real world cases of this particular issue they are missing. Potential future bug reports containing these data sources may help guide those. Another important note here is that per the Extending Terraform documentation for versioning, that resource identifier changes typically fall under a best practice of a major version increment for Terraform Providers. Given the widespread reports of unexpected behavior as practitioners are upgrading to Terraform 0.13 and since the old identifiers did not represent meaningful information for the lookup context, these changes are not lightly being considered a bug fix. If the usage of a changing time stamp is necessary, the `timestamp()` function and Terraform Time Provider are recommended methodologies for this information. If the usage of a changing random identifier is necessary, the Terraform Random Provider is the recommended methodology. There still remains other data sources and resources that suffer from known unstable identifiers, such as many plural data sources. Determination of the path forward for these is still undetermined, since ideally Terraform Providers should no longer need to set an `id` attribute after Terraform 0.12, however the Terraform Plugin SDK does not provide functionality to avoid this yet. Future changes may involve a standardized pattern for these within the provider itself. Changes: ``` NOTES: * data-source/aws_acm_certificate: The `id` attribute has changed to the ARN of the ACM Certificate. The first apply of this updated data source may show this difference. * data-source/aws_autoscaling_group: The `id` attribute has changed to the name of the Auto Scaling Group. The first apply of this updated data source may show this difference. * data-source/aws_availability_zones: The `id` attribute has changed to the name of the AWS Region. The first apply of this updated data source may show this difference. * data-source/aws_db_event_categories: The `id` attribute has changed to the name of the AWS Region. The first apply of this updated data source may show this difference. * data-source/aws_ebs_default_kms_key: The `id` attribute has changed to the name of the AWS Region. The first apply of this updated data source may show this difference. * data-source/aws_ebs_encryption_by_default: The `id` attribute has changed to the name of the AWS Region. The first apply of this updated data source may show this difference. * data-source/aws_ec2_instance_type_offering: The `id` attribute has changed to the EC2 Instance Type. The first apply of this updated data source may show this difference. * data-source/aws_ecr_authorization_token: The `id` attribute has changed to the AWS Region. The first apply of this updated data source may show this difference. * data-source/aws_ecr_image: The `id` attribute has changed to the SHA256 digest of the ECR Image. The first apply of this updated data source may show this difference. * data-source/aws_eks_cluster_auth: The `id` attribute has changed to the name of the EKS Cluster. The first apply of this updated data source may show this difference. * data-source/aws_iam_account_alias: The `id` attribute has changed to the AWS Account Alias. The first apply of this updated data source may show this difference. * data-source/aws_kms_alias: The `id` attribute has changed to the ARN of the KMS Alias. The first apply of this updated data source may show this difference. * data-source/aws_partition: The `id` attribute has changed to the identifier of the AWS Partition. The first apply of this updated data source may show this difference. * data-source/aws_regions: The `id` attribute has changed to the identifier of the AWS Partition. The first apply of this updated data source may show this difference. * data-source/aws_sns_topic: The `id` attribute has changed to the ARN of the SNS Topic. The first apply of this updated data source may show this difference. FIXES: * data-source/aws_acm_certificate: Prevent plan differences with the `id` attribute * data-source/aws_autoscaling_group: Prevent plan differences with the `id` attribute * data-source/aws_availability_zones: Prevent plan differences with the `id` attribute * data-source/aws_db_event_categories: Prevent plan differences with the `id` attribute * data-source/aws_ebs_default_kms_key: Prevent plan differences with the `id` attribute * data-source/aws_ebs_encryption_by_default: Prevent plan differences with the `id` attribute * data-source/aws_ec2_instance_type_offering: Prevent plan differences with the `id` attribute * data-source/aws_ecr_authorization_token: Prevent plan differences with the `id` attribute * data-source/aws_ecr_image: Prevent plan differences with the `id` attribute * data-source/aws_eks_cluster_auth: Prevent plan differences with the `id` attribute * data-source/aws_iam_account_alias: Prevent plan differences with the `id` attribute * data-source/aws_kms_alias: Prevent plan differences with the `id` attribute * data-source/aws_partition: Prevent plan differences with the `id` attribute * data-source/aws_regions: Prevent plan differences with the `id` attribute * data-source/aws_sns_topic: Prevent plan differences with the `id` attribute ``` Output from acceptance testing: ``` --- PASS: TestAccAwsAutoScalingGroupDataSource_basic (38.65s) --- PASS: TestAccAWSAvailabilityZones_AllAvailabilityZones (23.55s) --- PASS: TestAccAWSAvailabilityZones_basic (23.40s) --- PASS: TestAccAWSAvailabilityZones_ExcludeNames (14.32s) --- PASS: TestAccAWSAvailabilityZones_ExcludeZoneIds (24.34s) --- PASS: TestAccAWSAvailabilityZones_Filter (23.32s) --- PASS: TestAccAWSAvailabilityZones_stateFilter (23.23s) --- PASS: TestAccAWSDbEventCategories_basic (15.76s) --- PASS: TestAccAWSDbEventCategories_sourceType (14.71s) --- PASS: TestAccAWSEc2InstanceTypeOfferingDataSource_Filter (23.91s) --- PASS: TestAccAWSEc2InstanceTypeOfferingDataSource_LocationType (24.65s) --- PASS: TestAccAWSEc2InstanceTypeOfferingDataSource_PreferredInstanceTypes (23.58s) --- PASS: TestAccAWSEcrAuthorizationTokenDataSource_basic (23.96s) --- PASS: TestAccAWSEcrDataSource_ecrImage (24.22s) --- PASS: TestAccAWSEksClusterAuthDataSource_basic (19.59s) --- PASS: TestAccDataSourceAwsEBSDefaultKmsKey_basic (20.11s) --- PASS: TestAccDataSourceAwsEBSEncryptionByDefault_basic (23.26s) --- PASS: TestAccDataSourceAwsKmsAlias_AwsService (24.27s) --- PASS: TestAccDataSourceAwsKmsAlias_CMK (28.03s) --- PASS: TestAccDataSourceAwsRegions_AllRegions (23.30s) --- PASS: TestAccDataSourceAwsRegions_basic (23.44s) --- PASS: TestAccDataSourceAwsRegions_Filter (22.16s) --- PASS: TestAccDataSourceAwsSnsTopic_basic (26.41s) ```
AWS provider v3.10.0 fixed this as the changelog suggested; updating from v2.70.0, I had to manually modify my state to remove some |
it has not fixed everything. For example aws_kms_secrets still has the issue. |
I'm seeing this with aws_route_tables on provider v3.10.0. This is in a brand-new Terraform project that has never used an older provider version.
|
Is there something we can do about this if we're on 2.x version of the provider? We upgraded TF to 0.13 and all seemed fine until this hit. Upgrading the provider's major version was not something we expected the TF upgrade to depend on. EDIT: It appears I was mistaken, it was another bug that looked like this and confused me. We eventually upgraded everything successfully though. Sorry for this. |
not sure how to get my PR looked at, could use some +1's on it and we solve another resource with this problem! |
…able R015, R016, R017 linters Reference: #14579 Changes: * data-source/aws_autoscaling_groups: Prevent plan differences with the `id` attribute * data-source/aws_caller_identity: Prevent plan differences with the `id` attribute * data-source/aws_ebs_snapshot_ids: Prevent plan differences with the `id` attribute * data-source/aws_ebs_volumes: Prevent plan differences with the `id` attribute * data-source/aws_ec2_coip_pools: Prevent plan differences with the `id` attribute * data-source/aws_ec2_instance_type_offerings: Prevent plan differences with the `id` attribute * data-source/aws_ec2_local_gateway_route_tables: Prevent plan differences with the `id` attribute * data-source/aws_ec2_local_gateway_virtual_interface_groups: Prevent plan differences with the `id` attribute * data-source/aws_ec2_local_gateways: Prevent plan differences with the `id` attribute * data-source/aws_ec2_spot_price: Prevent plan differences with the `id` attribute * data-source/aws_efs_access_points: Prevent plan differences with the `id` attribute * data-source/aws_glue_script: Prevent plan differences with the `id` attribute * data-source/aws_inspector_rules_packages: Prevent plan differences with the `id` attribute * data-source/aws_instances: Prevent plan differences with the `id` attribute * data-source/aws_kms_ciphertext: Prevent plan differences with the `id` attribute * data-source/aws_network_acls: Prevent plan differences with the `id` attribute * data-source/aws_network_interfaces: Prevent plan differences with the `id` attribute * data-source/aws_organizations_organizational_units: Prevent plan differences with the `id` attribute * data-source/aws_outposts_outposts: Prevent plan differences with the `id` attribute * data-source/aws_outposts_sites: Prevent plan differences with the `id` attribute * data-source/aws_route_tables: Prevent plan differences with the `id` attribute * data-source/aws_route53_resolver_rules: Prevent plan differences with the `id` attribute * data-source/aws_s3_bucket_objects: Prevent plan differences with the `id` attribute * data-source/aws_security_groups: Prevent plan differences with the `id` attribute * data-source/aws_vpc_peering_connections: Prevent plan differences with the `id` attribute * data-source/aws_vpcs: Prevent plan differences with the `id` attribute Output from acceptance testing: ``` Pending ```
…able R015, R016, R017 linters Reference: #14579 Changes: * data-source/aws_autoscaling_groups: Prevent plan differences with the `id` attribute * data-source/aws_caller_identity: Prevent plan differences with the `id` attribute * data-source/aws_ebs_snapshot_ids: Prevent plan differences with the `id` attribute * data-source/aws_ebs_volumes: Prevent plan differences with the `id` attribute * data-source/aws_ec2_coip_pools: Prevent plan differences with the `id` attribute * data-source/aws_ec2_instance_type_offerings: Prevent plan differences with the `id` attribute * data-source/aws_ec2_local_gateway_route_tables: Prevent plan differences with the `id` attribute * data-source/aws_ec2_local_gateway_virtual_interface_groups: Prevent plan differences with the `id` attribute * data-source/aws_ec2_local_gateways: Prevent plan differences with the `id` attribute * data-source/aws_ec2_spot_price: Prevent plan differences with the `id` attribute * data-source/aws_efs_access_points: Prevent plan differences with the `id` attribute * data-source/aws_glue_script: Prevent plan differences with the `id` attribute * data-source/aws_inspector_rules_packages: Prevent plan differences with the `id` attribute * data-source/aws_instances: Prevent plan differences with the `id` attribute * data-source/aws_kms_ciphertext: Prevent plan differences with the `id` attribute * data-source/aws_network_acls: Prevent plan differences with the `id` attribute * data-source/aws_network_interfaces: Prevent plan differences with the `id` attribute * data-source/aws_organizations_organizational_units: Prevent plan differences with the `id` attribute * data-source/aws_outposts_outposts: Prevent plan differences with the `id` attribute * data-source/aws_outposts_sites: Prevent plan differences with the `id` attribute * data-source/aws_route_tables: Prevent plan differences with the `id` attribute * data-source/aws_route53_resolver_rules: Prevent plan differences with the `id` attribute * data-source/aws_s3_bucket_objects: Prevent plan differences with the `id` attribute * data-source/aws_security_groups: Prevent plan differences with the `id` attribute * data-source/aws_vpc_peering_connections: Prevent plan differences with the `id` attribute * data-source/aws_vpcs: Prevent plan differences with the `id` attribute Output from acceptance testing: ``` --- PASS: TestAccAWSAutoscalingAttachment_albTargetGroup (111.36s) --- PASS: TestAccAWSAutoscalingAttachment_elb (118.66s) --- PASS: TestAccAWSAutoscalingGroups_basic (162.22s) --- PASS: TestAccAWSCallerIdentity_basic (55.69s) --- PASS: TestAccAWSEBSEncryptionByDefault_basic (52.71s) --- PASS: TestAccAWSEc2InstanceTypeOfferingsDataSource_Filter (57.28s) --- PASS: TestAccAWSEc2InstanceTypeOfferingsDataSource_LocationType (58.79s) --- PASS: TestAccAwsEc2SpotPriceDataSource_basic (54.47s) --- PASS: TestAccAwsEc2SpotPriceDataSource_Filter (59.40s) --- PASS: TestAccAWSELBAttachment_basic (185.93s) --- PASS: TestAccAWSELBAttachment_drift (113.04s) --- PASS: TestAccAWSInspectorRulesPackages_basic (58.00s) --- PASS: TestAccAWSInstancesDataSource_basic (137.19s) --- PASS: TestAccAWSInstancesDataSource_instance_state_names (122.56s) --- PASS: TestAccAWSInstancesDataSource_tags (120.98s) --- PASS: TestAccDataSourceAwsEbsSnapshotIds_basic (92.82s) --- PASS: TestAccDataSourceAwsEbsSnapshotIds_empty (57.58s) --- PASS: TestAccDataSourceAwsEbsSnapshotIds_sorted (195.34s) --- PASS: TestAccDataSourceAwsEbsVolumes_basic (178.56s) --- PASS: TestAccDataSourceAWSEFSAccessPoints_basic (71.87s) --- PASS: TestAccDataSourceAWSGlueScript_Language_Python (57.14s) --- PASS: TestAccDataSourceAWSGlueScript_Language_Scala (57.67s) --- PASS: TestAccDataSourceAwsKmsCiphertext_basic (61.22s) --- PASS: TestAccDataSourceAwsKmsCiphertext_validate (60.99s) --- PASS: TestAccDataSourceAwsKmsCiphertext_validate_withContext (60.77s) --- PASS: TestAccDataSourceAwsNetworkAcls_basic (112.54s) --- PASS: TestAccDataSourceAwsNetworkAcls_Filter (62.55s) --- PASS: TestAccDataSourceAwsNetworkAcls_Tags (58.95s) --- PASS: TestAccDataSourceAwsNetworkAcls_VpcID (60.22s) --- PASS: TestAccDataSourceAwsNetworkInterfaces_Filter (95.49s) --- PASS: TestAccDataSourceAwsNetworkInterfaces_Tags (97.05s) --- PASS: TestAccDataSourceAwsRoute53ResolverRules_basic (57.40s) --- PASS: TestAccDataSourceAwsRoute53ResolverRules_ResolverEndpointId (264.98s) --- PASS: TestAccDataSourceAwsRouteTables_basic (120.92s) --- PASS: TestAccDataSourceAWSS3BucketObjects_all (120.73s) --- PASS: TestAccDataSourceAWSS3BucketObjects_basic (122.61s) --- PASS: TestAccDataSourceAWSS3BucketObjects_basicViaAccessPoint (122.87s) --- PASS: TestAccDataSourceAWSS3BucketObjects_encoded (115.55s) --- PASS: TestAccDataSourceAWSS3BucketObjects_fetchOwner (102.52s) --- PASS: TestAccDataSourceAWSS3BucketObjects_maxKeys (100.50s) --- PASS: TestAccDataSourceAWSS3BucketObjects_prefixes (117.61s) --- PASS: TestAccDataSourceAWSS3BucketObjects_startAfter (102.55s) --- PASS: TestAccDataSourceAwsSecurityGroups_filter (70.25s) --- PASS: TestAccDataSourceAwsSecurityGroups_tag (68.53s) --- PASS: TestAccDataSourceAwsVpcPeeringConnections_basic (70.67s) --- PASS: TestAccDataSourceAwsVpcs_basic (65.12s) --- PASS: TestAccDataSourceAwsVpcs_filters (56.35s) --- PASS: TestAccDataSourceAwsVpcs_tags (58.15s) --- SKIP: TestAccAWSOutpostsOutpostsDataSource_basic (2.12s) --- SKIP: TestAccAWSOutpostsSitesDataSource_basic (1.42s) --- SKIP: TestAccDataSourceAwsEc2CoipPools_basic (15.89s) --- SKIP: TestAccDataSourceAwsEc2CoipPools_Filter (14.35s) --- SKIP: TestAccDataSourceAwsEc2LocalGatewayRouteTables_basic (14.72s) --- SKIP: TestAccDataSourceAwsEc2LocalGatewayRouteTables_Filter (2.24s) --- SKIP: TestAccDataSourceAwsEc2LocalGateways_basic (2.51s) --- SKIP: TestAccDataSourceAwsEc2LocalGatewayVirtualInterfaceGroups_basic (3.57s) --- SKIP: TestAccDataSourceAwsEc2LocalGatewayVirtualInterfaceGroups_Filter (2.13s) --- SKIP: TestAccDataSourceAwsEc2LocalGatewayVirtualInterfaceGroups_Tags (1.99s) ```
…able R015, R016, R017 linters (#15896) * provider: Stabilization of remaining data source id attributes and enable R015, R016, R017 linters Reference: #14579 Changes: * data-source/aws_autoscaling_groups: Prevent plan differences with the `id` attribute * data-source/aws_caller_identity: Prevent plan differences with the `id` attribute * data-source/aws_ebs_snapshot_ids: Prevent plan differences with the `id` attribute * data-source/aws_ebs_volumes: Prevent plan differences with the `id` attribute * data-source/aws_ec2_coip_pools: Prevent plan differences with the `id` attribute * data-source/aws_ec2_instance_type_offerings: Prevent plan differences with the `id` attribute * data-source/aws_ec2_local_gateway_route_tables: Prevent plan differences with the `id` attribute * data-source/aws_ec2_local_gateway_virtual_interface_groups: Prevent plan differences with the `id` attribute * data-source/aws_ec2_local_gateways: Prevent plan differences with the `id` attribute * data-source/aws_ec2_spot_price: Prevent plan differences with the `id` attribute * data-source/aws_efs_access_points: Prevent plan differences with the `id` attribute * data-source/aws_glue_script: Prevent plan differences with the `id` attribute * data-source/aws_inspector_rules_packages: Prevent plan differences with the `id` attribute * data-source/aws_instances: Prevent plan differences with the `id` attribute * data-source/aws_kms_ciphertext: Prevent plan differences with the `id` attribute * data-source/aws_network_acls: Prevent plan differences with the `id` attribute * data-source/aws_network_interfaces: Prevent plan differences with the `id` attribute * data-source/aws_organizations_organizational_units: Prevent plan differences with the `id` attribute * data-source/aws_outposts_outposts: Prevent plan differences with the `id` attribute * data-source/aws_outposts_sites: Prevent plan differences with the `id` attribute * data-source/aws_route_tables: Prevent plan differences with the `id` attribute * data-source/aws_route53_resolver_rules: Prevent plan differences with the `id` attribute * data-source/aws_s3_bucket_objects: Prevent plan differences with the `id` attribute * data-source/aws_security_groups: Prevent plan differences with the `id` attribute * data-source/aws_vpc_peering_connections: Prevent plan differences with the `id` attribute * data-source/aws_vpcs: Prevent plan differences with the `id` attribute Output from acceptance testing: ``` --- PASS: TestAccAWSAutoscalingAttachment_albTargetGroup (111.36s) --- PASS: TestAccAWSAutoscalingAttachment_elb (118.66s) --- PASS: TestAccAWSAutoscalingGroups_basic (162.22s) --- PASS: TestAccAWSCallerIdentity_basic (55.69s) --- PASS: TestAccAWSEBSEncryptionByDefault_basic (52.71s) --- PASS: TestAccAWSEc2InstanceTypeOfferingsDataSource_Filter (57.28s) --- PASS: TestAccAWSEc2InstanceTypeOfferingsDataSource_LocationType (58.79s) --- PASS: TestAccAwsEc2SpotPriceDataSource_basic (54.47s) --- PASS: TestAccAwsEc2SpotPriceDataSource_Filter (59.40s) --- PASS: TestAccAWSELBAttachment_basic (185.93s) --- PASS: TestAccAWSELBAttachment_drift (113.04s) --- PASS: TestAccAWSInspectorRulesPackages_basic (58.00s) --- PASS: TestAccAWSInstancesDataSource_basic (137.19s) --- PASS: TestAccAWSInstancesDataSource_instance_state_names (122.56s) --- PASS: TestAccAWSInstancesDataSource_tags (120.98s) --- PASS: TestAccDataSourceAwsEbsSnapshotIds_basic (92.82s) --- PASS: TestAccDataSourceAwsEbsSnapshotIds_empty (57.58s) --- PASS: TestAccDataSourceAwsEbsSnapshotIds_sorted (195.34s) --- PASS: TestAccDataSourceAwsEbsVolumes_basic (178.56s) --- PASS: TestAccDataSourceAWSEFSAccessPoints_basic (71.87s) --- PASS: TestAccDataSourceAWSGlueScript_Language_Python (57.14s) --- PASS: TestAccDataSourceAWSGlueScript_Language_Scala (57.67s) --- PASS: TestAccDataSourceAwsKmsCiphertext_basic (61.22s) --- PASS: TestAccDataSourceAwsKmsCiphertext_validate (60.99s) --- PASS: TestAccDataSourceAwsKmsCiphertext_validate_withContext (60.77s) --- PASS: TestAccDataSourceAwsNetworkAcls_basic (112.54s) --- PASS: TestAccDataSourceAwsNetworkAcls_Filter (62.55s) --- PASS: TestAccDataSourceAwsNetworkAcls_Tags (58.95s) --- PASS: TestAccDataSourceAwsNetworkAcls_VpcID (60.22s) --- PASS: TestAccDataSourceAwsNetworkInterfaces_Filter (95.49s) --- PASS: TestAccDataSourceAwsNetworkInterfaces_Tags (97.05s) --- PASS: TestAccDataSourceAwsRoute53ResolverRules_basic (57.40s) --- PASS: TestAccDataSourceAwsRoute53ResolverRules_ResolverEndpointId (264.98s) --- PASS: TestAccDataSourceAwsRouteTables_basic (120.92s) --- PASS: TestAccDataSourceAWSS3BucketObjects_all (120.73s) --- PASS: TestAccDataSourceAWSS3BucketObjects_basic (122.61s) --- PASS: TestAccDataSourceAWSS3BucketObjects_basicViaAccessPoint (122.87s) --- PASS: TestAccDataSourceAWSS3BucketObjects_encoded (115.55s) --- PASS: TestAccDataSourceAWSS3BucketObjects_fetchOwner (102.52s) --- PASS: TestAccDataSourceAWSS3BucketObjects_maxKeys (100.50s) --- PASS: TestAccDataSourceAWSS3BucketObjects_prefixes (117.61s) --- PASS: TestAccDataSourceAWSS3BucketObjects_startAfter (102.55s) --- PASS: TestAccDataSourceAwsSecurityGroups_filter (70.25s) --- PASS: TestAccDataSourceAwsSecurityGroups_tag (68.53s) --- PASS: TestAccDataSourceAwsVpcPeeringConnections_basic (70.67s) --- PASS: TestAccDataSourceAwsVpcs_basic (65.12s) --- PASS: TestAccDataSourceAwsVpcs_filters (56.35s) --- PASS: TestAccDataSourceAwsVpcs_tags (58.15s) --- SKIP: TestAccAWSOutpostsOutpostsDataSource_basic (2.12s) --- SKIP: TestAccAWSOutpostsSitesDataSource_basic (1.42s) --- SKIP: TestAccDataSourceAwsEc2CoipPools_basic (15.89s) --- SKIP: TestAccDataSourceAwsEc2CoipPools_Filter (14.35s) --- SKIP: TestAccDataSourceAwsEc2LocalGatewayRouteTables_basic (14.72s) --- SKIP: TestAccDataSourceAwsEc2LocalGatewayRouteTables_Filter (2.24s) --- SKIP: TestAccDataSourceAwsEc2LocalGateways_basic (2.51s) --- SKIP: TestAccDataSourceAwsEc2LocalGatewayVirtualInterfaceGroups_basic (3.57s) --- SKIP: TestAccDataSourceAwsEc2LocalGatewayVirtualInterfaceGroups_Filter (2.13s) --- SKIP: TestAccDataSourceAwsEc2LocalGatewayVirtualInterfaceGroups_Tags (1.99s) ``` * Apply suggestions from code review Co-authored-by: angie pinilla <[email protected]> Co-authored-by: angie pinilla <[email protected]>
Hi folks 👋 The remaining data sources with clear If you are still having problems with perpetual differences in data sources after that release, please file a separate GitHub issue for each data source as each cause may be different. Thanks! |
This has been released in version 3.13.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
Just filed #16239. Seeing a similar issue with |
I am using 'aws_iam_policy_document' currently without issue, I had some problems here hashicorp/terraform#26899 with v14 though. |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Terraform CLI and Terraform AWS Provider Version
Terraform v0.13.0
AWS Provider v3.1.0
Affected Resource(s)
Actual Behavior
Data sources whose ID is set to a non-deterministic value (e.g. the current timestamp or a unique ID) that changes every time a refresh (the data source's Read method) runs show a perpetual diff starting with Terraform 0.13.0.
For example
Terraform 0.12
Terraform 0.13
References
Related:
The text was updated successfully, but these errors were encountered: