From 7b2de2b189f83e3f4c543169a51e44057b9c7dcc Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 12 Mar 2020 20:03:22 -0400 Subject: [PATCH] provider: Replace deprecated helper/validation.ValidateJsonString function Reference: https://github.com/terraform-providers/terraform-provider-aws/issues/11844 Reference: https://github.com/terraform-providers/terraform-provider-aws/issues/12087 Output from acceptance testing: ``` --- PASS: TestAccAWSAPIGatewayRestApi_api_key_source (218.84s) --- PASS: TestAccAWSAPIGatewayRestApi_basic (246.20s) --- PASS: TestAccAWSAPIGatewayRestApi_disappears (460.53s) --- PASS: TestAccAWSAPIGatewayRestApi_EndpointConfiguration (285.90s) --- PASS: TestAccAWSAPIGatewayRestApi_EndpointConfiguration_Private (467.53s) --- PASS: TestAccAWSAPIGatewayRestApi_EndpointConfiguration_VPCEndpoint (154.73s) --- PASS: TestAccAWSAPIGatewayRestApi_openapi (62.10s) --- PASS: TestAccAWSAPIGatewayRestApi_policy (199.88s) --- PASS: TestAccAWSAPIGatewayRestApi_tags (402.12s) --- PASS: TestAccAWSCloudFormationStack_allAttributes (70.67s) --- PASS: TestAccAWSCloudFormationStack_basic (59.18s) --- PASS: TestAccAWSCloudFormationStack_dataSource_basic (61.62s) --- PASS: TestAccAWSCloudFormationStack_dataSource_yaml (61.56s) --- PASS: TestAccAWSCloudFormationStack_defaultParams (58.83s) --- PASS: TestAccAWSCloudFormationStack_disappears (62.00s) --- PASS: TestAccAWSCloudFormationStack_withParams (112.25s) --- PASS: TestAccAWSCloudFormationStack_withTransform (41.95s) --- PASS: TestAccAWSCloudFormationStack_withUrl_withParams (246.31s) --- PASS: TestAccAWSCloudFormationStack_withUrl_withParams_noUpdate (70.68s) --- PASS: TestAccAWSCloudFormationStack_withUrl_withParams_withYaml (64.80s) --- PASS: TestAccAWSCloudFormationStack_yaml (60.20s) --- PASS: TestAccAWSCloudFormationStackSet_AdministrationRoleArn (29.26s) --- PASS: TestAccAWSCloudFormationStackSet_basic (16.03s) --- PASS: TestAccAWSCloudFormationStackSet_Description (29.27s) --- PASS: TestAccAWSCloudFormationStackSet_disappears (12.91s) --- PASS: TestAccAWSCloudFormationStackSet_ExecutionRoleName (29.08s) --- PASS: TestAccAWSCloudFormationStackSet_Name (24.91s) --- PASS: TestAccAWSCloudFormationStackSet_Parameters (56.43s) --- PASS: TestAccAWSCloudFormationStackSet_Tags (57.84s) --- PASS: TestAccAWSCloudFormationStackSet_TemplateBody (29.33s) --- PASS: TestAccAWSCloudFormationStackSet_TemplateUrl (30.95s) --- PASS: TestAccAWSCloudFormationStackSetInstance_disappears (144.36s) --- PASS: TestAccAWSCloudFormationStackSetInstance_disappears_StackSet (136.49s) --- PASS: TestAccAWSCloudFormationStackSetInstance_ParameterOverrides (240.59s) --- PASS: TestAccAWSCloudFormationStackSetInstance_RetainStack (163.82s) --- PASS: TestAccAWSCloudWatchDashboard_basic (9.22s) --- PASS: TestAccAWSCloudWatchDashboard_update (17.73s) --- PASS: TestAccAWSCloudWatchDashboard_updateName (16.23s) --- PASS: TestAccAWSEcrLifecyclePolicy_basic (8.19s) --- PASS: TestAccAWSElasticSearchDomain_basic (968.64s) --- PASS: TestAccAWSElasticSearchDomain_ClusterConfig_ZoneAwarenessConfig (5693.29s) --- PASS: TestAccAWSElasticSearchDomain_CognitoOptionsCreateAndRemove (1688.64s) --- PASS: TestAccAWSElasticSearchDomain_CognitoOptionsUpdate (1732.49s) --- PASS: TestAccAWSElasticSearchDomain_complex (1070.15s) --- PASS: TestAccAWSElasticSearchDomain_duplicate (750.80s) --- PASS: TestAccAWSElasticSearchDomain_encrypt_at_rest_default_key (807.91s) --- PASS: TestAccAWSElasticSearchDomain_encrypt_at_rest_specify_key (982.53s) --- PASS: TestAccAWSElasticSearchDomain_internetToVpcEndpoint (2248.88s) --- PASS: TestAccAWSElasticSearchDomain_LogPublishingOptions (1860.12s) --- PASS: TestAccAWSElasticSearchDomain_NodeToNodeEncryption (1244.68s) --- PASS: TestAccAWSElasticSearchDomain_policy (1478.83s) --- PASS: TestAccAWSElasticSearchDomain_RequireHTTPS (2255.42s) --- PASS: TestAccAWSElasticSearchDomain_tags (1705.94s) --- PASS: TestAccAWSElasticSearchDomain_update (2530.76s) --- PASS: TestAccAWSElasticSearchDomain_update_version (3559.61s) --- PASS: TestAccAWSElasticSearchDomain_update_volume_type (3442.15s) --- PASS: TestAccAWSElasticSearchDomain_v23 (1098.40s) --- PASS: TestAccAWSElasticSearchDomain_vpc (1306.48s) --- PASS: TestAccAWSElasticSearchDomain_vpc_update (3239.89s) --- PASS: TestAccAWSElasticSearchDomain_withDedicatedMaster (3452.05s) --- PASS: TestAccAWSElasticSearchDomainPolicy_basic (1600.78s) --- PASS: TestAccAWSEMRCluster_additionalInfo (509.02s) --- PASS: TestAccAWSEMRCluster_basic (428.91s) --- PASS: TestAccAWSEMRCluster_bootstrap_ordering (445.41s) --- PASS: TestAccAWSEMRCluster_configurationsJson (639.64s) --- PASS: TestAccAWSEMRCluster_CoreInstanceGroup_AutoscalingPolicy (478.82s) --- PASS: TestAccAWSEMRCluster_CoreInstanceGroup_BidPrice (982.01s) --- PASS: TestAccAWSEMRCluster_CoreInstanceGroup_InstanceCount (488.56s) --- PASS: TestAccAWSEMRCluster_CoreInstanceGroup_InstanceType (825.23s) --- PASS: TestAccAWSEMRCluster_CoreInstanceGroup_Migration_CoreInstanceType (417.46s) --- PASS: TestAccAWSEMRCluster_CoreInstanceGroup_Migration_InstanceGroup (386.07s) --- PASS: TestAccAWSEMRCluster_CoreInstanceGroup_Name (799.01s) --- PASS: TestAccAWSEMRCluster_custom_ami_id (481.47s) --- PASS: TestAccAWSEMRCluster_disappears (377.84s) --- PASS: TestAccAWSEMRCluster_Ec2Attributes_DefaultManagedSecurityGroups (729.59s) --- PASS: TestAccAWSEMRCluster_instance_group (497.55s) --- PASS: TestAccAWSEMRCluster_instance_group_EBSVolumeType_st1 (520.38s) --- PASS: TestAccAWSEMRCluster_instance_group_names (596.00s) --- PASS: TestAccAWSEMRCluster_instance_group_update (493.37s) --- PASS: TestAccAWSEMRCluster_keepJob (451.47s) --- PASS: TestAccAWSEMRCluster_Kerberos_ClusterDedicatedKdc (433.56s) --- PASS: TestAccAWSEMRCluster_MasterInstanceGroup_BidPrice (746.72s) --- PASS: TestAccAWSEMRCluster_MasterInstanceGroup_InstanceCount (1281.57s) --- PASS: TestAccAWSEMRCluster_MasterInstanceGroup_InstanceType (778.11s) --- PASS: TestAccAWSEMRCluster_MasterInstanceGroup_Migration_InstanceGroup (483.64s) --- PASS: TestAccAWSEMRCluster_MasterInstanceGroup_Migration_MasterInstanceType (425.17s) --- PASS: TestAccAWSEMRCluster_MasterInstanceGroup_Name (850.44s) --- PASS: TestAccAWSEMRCluster_root_volume_size (858.22s) --- PASS: TestAccAWSEMRCluster_s3Logging (508.32s) --- PASS: TestAccAWSEMRCluster_security_config (576.85s) --- PASS: TestAccAWSEMRCluster_Step_Basic (586.06s) --- PASS: TestAccAWSEMRCluster_step_concurrency_level (395.29s) --- PASS: TestAccAWSEMRCluster_Step_ConfigMode (855.25s) --- PASS: TestAccAWSEMRCluster_Step_Multiple (454.02s) --- PASS: TestAccAWSEMRCluster_tags (814.84s) --- PASS: TestAccAWSEMRCluster_terminationProtected (446.75s) --- PASS: TestAccAWSEMRCluster_updateAutoScalingPolicy (494.30s) --- PASS: TestAccAWSEMRCluster_visibleToAllUsers (899.11s) --- PASS: TestAccAWSEMRInstanceGroup_AutoScalingPolicy (853.38s) --- PASS: TestAccAWSEMRInstanceGroup_basic (794.28s) --- PASS: TestAccAWSEMRInstanceGroup_BidPrice (1390.82s) --- PASS: TestAccAWSEMRInstanceGroup_ConfigurationsJson (842.20s) --- PASS: TestAccAWSEMRInstanceGroup_EbsConfig_EbsOptimized (1106.71s) --- PASS: TestAccAWSEMRInstanceGroup_EmrClusterDisappears (679.63s) --- PASS: TestAccAWSEMRInstanceGroup_InstanceCount (1403.60s) --- PASS: TestAccAWSEmrSecurityConfiguration_basic (8.76s) --- PASS: TestAccAWSGlacierVault_basic (8.63s) --- PASS: TestAccAWSGlacierVault_full (9.14s) --- PASS: TestAccAWSGlacierVault_RemoveNotifications (14.43s) --- PASS: TestAccAWSGlacierVaultLock_basic (9.82s) --- PASS: TestAccAWSGlacierVaultLock_CompleteLock (10.20s) --- PASS: TestAccAWSGlueCrawler_CatalogTarget (38.61s) --- PASS: TestAccAWSGlueCrawler_CatalogTarget_Multiple (47.35s) --- PASS: TestAccAWSGlueCrawler_Classifiers (36.80s) --- PASS: TestAccAWSGlueCrawler_Configuration (37.05s) --- PASS: TestAccAWSGlueCrawler_Description (37.00s) --- PASS: TestAccAWSGlueCrawler_DynamodbTarget (30.29s) --- PASS: TestAccAWSGlueCrawler_JdbcTarget (38.50s) --- PASS: TestAccAWSGlueCrawler_JdbcTarget_Exclusions (38.06s) --- PASS: TestAccAWSGlueCrawler_JdbcTarget_Multiple (46.36s) --- PASS: TestAccAWSGlueCrawler_recreates (35.97s) --- PASS: TestAccAWSGlueCrawler_Role_ARN_NoPath (21.88s) --- PASS: TestAccAWSGlueCrawler_Role_ARN_Path (20.64s) --- PASS: TestAccAWSGlueCrawler_Role_Name_Path (28.52s) --- PASS: TestAccAWSGlueCrawler_S3Target (37.82s) --- PASS: TestAccAWSGlueCrawler_S3Target_Exclusions (29.77s) --- PASS: TestAccAWSGlueCrawler_S3Target_Multiple (45.00s) --- PASS: TestAccAWSGlueCrawler_Schedule (38.24s) --- PASS: TestAccAWSGlueCrawler_SchemaChangePolicy (37.62s) --- PASS: TestAccAWSGlueCrawler_SecurityConfiguration (37.94s) --- PASS: TestAccAWSGlueCrawler_TablePrefix (37.14s) --- PASS: TestAccAWSGlueCrawler_Tags (46.21s) --- PASS: TestAccAWSIAMRole_badJSON (1.15s) --- PASS: TestAccAWSIAMRole_basic (10.76s) --- PASS: TestAccAWSIAMRole_basicWithDescription (23.81s) --- PASS: TestAccAWSIAMRole_disappears (7.55s) --- PASS: TestAccAWSIAMRole_force_detach_policies (14.40s) --- PASS: TestAccAWSIAMRole_MaxSessionDuration (18.56s) --- PASS: TestAccAWSIAMRole_namePrefix (10.93s) --- PASS: TestAccAWSIAMRole_PermissionsBoundary (36.79s) --- PASS: TestAccAWSIAMRole_tags (17.40s) --- PASS: TestAccAWSIAMRole_testNameChange (24.14s) --- PASS: TestAccAWSIAMRolePolicy_basic (19.89s) --- PASS: TestAccAWSIAMRolePolicy_disappears (10.60s) --- PASS: TestAccAWSIAMRolePolicy_generatedName (19.39s) --- PASS: TestAccAWSIAMRolePolicy_invalidJSON (1.07s) --- PASS: TestAccAWSIAMRolePolicy_namePrefix (19.99s) --- PASS: TestAccAWSIAMRolePolicy_Policy_InvalidResource (6.41s) --- PASS: TestAccAWSKmsExternalKey_basic (26.08s) --- PASS: TestAccAWSKmsExternalKey_DeletionWindowInDays (31.27s) --- PASS: TestAccAWSKmsExternalKey_Description (30.91s) --- PASS: TestAccAWSKmsExternalKey_disappears (24.43s) --- PASS: TestAccAWSKmsExternalKey_Enabled (155.55s) --- PASS: TestAccAWSKmsExternalKey_KeyMaterialBase64 (152.20s) --- PASS: TestAccAWSKmsExternalKey_Tags (36.09s) --- PASS: TestAccAWSKmsExternalKey_ValidTo (134.44s) --- PASS: TestAccAWSKmsKey_asymmetricKey (25.37s) --- PASS: TestAccAWSKmsKey_basic (26.63s) --- PASS: TestAccAWSKmsKey_disappears (6.53s) --- PASS: TestAccAWSKmsKey_isEnabled (252.23s) --- PASS: TestAccAWSKmsKey_policy (31.77s) --- PASS: TestAccAWSKmsKey_tags (32.26s) --- PASS: TestAccAWSS3Bucket_acceleration (21.85s) --- PASS: TestAccAWSS3Bucket_AclToGrant (18.23s) --- PASS: TestAccAWSS3Bucket_basic (11.21s) --- PASS: TestAccAWSS3Bucket_Bucket_EmptyString (11.03s) --- PASS: TestAccAWSS3Bucket_Cors_Delete (11.79s) --- PASS: TestAccAWSS3Bucket_Cors_EmptyOrigin (13.19s) --- PASS: TestAccAWSS3Bucket_Cors_Update (19.59s) --- PASS: TestAccAWSS3Bucket_disableDefaultEncryption_whenDefaultEncryptionIsEnabled (18.47s) --- PASS: TestAccAWSS3Bucket_enableDefaultEncryption_whenAES256IsUsed (12.39s) --- PASS: TestAccAWSS3Bucket_enableDefaultEncryption_whenTypical (30.78s) --- PASS: TestAccAWSS3Bucket_forceDestroy (11.09s) --- PASS: TestAccAWSS3Bucket_forceDestroyWithEmptyPrefixes (9.94s) --- PASS: TestAccAWSS3Bucket_forceDestroyWithObjectLockEnabled (11.26s) --- PASS: TestAccAWSS3Bucket_generatedName (11.85s) --- PASS: TestAccAWSS3Bucket_GrantToAcl (18.10s) --- PASS: TestAccAWSS3Bucket_LifecycleExpireMarkerOnly (19.81s) --- PASS: TestAccAWSS3Bucket_Logging (13.72s) --- PASS: TestAccAWSS3Bucket_namePrefix (11.57s) --- PASS: TestAccAWSS3Bucket_objectLock (18.09s) --- PASS: TestAccAWSS3Bucket_Policy (27.62s) --- PASS: TestAccAWSS3Bucket_region (11.65s) --- PASS: TestAccAWSS3Bucket_Replication (129.48s) --- PASS: TestAccAWSS3Bucket_ReplicationConfiguration_Rule_Destination_AccessControlTranslation (87.12s) --- PASS: TestAccAWSS3Bucket_ReplicationExpectVersioningValidationError (24.10s) --- PASS: TestAccAWSS3Bucket_ReplicationSchemaV2 (112.93s) --- PASS: TestAccAWSS3Bucket_ReplicationWithoutPrefix (40.15s) --- PASS: TestAccAWSS3Bucket_ReplicationWithoutStorageClass (40.30s) --- PASS: TestAccAWSS3Bucket_RequestPayer (19.03s) --- PASS: TestAccAWSS3Bucket_shouldFailNotFound (7.66s) --- PASS: TestAccAWSS3Bucket_tagsWithNoSystemTags (33.35s) --- PASS: TestAccAWSS3Bucket_tagsWithSystemTags (79.48s) --- PASS: TestAccAWSS3Bucket_UpdateAcl (19.13s) --- PASS: TestAccAWSS3Bucket_UpdateGrant (26.93s) --- PASS: TestAccAWSS3Bucket_Versioning (26.43s) --- PASS: TestAccAWSS3Bucket_Website_Simple (25.61s) --- PASS: TestAccAWSS3Bucket_WebsiteRedirect (24.99s) --- PASS: TestAccAWSS3Bucket_WebsiteRoutingRules (19.05s) --- PASS: TestAccAWSS3MultiBucket_withTags (13.95s) --- PASS: TestAccAWSS3BucketAnalyticsConfiguration_basic (11.63s) --- PASS: TestAccAWSS3BucketAnalyticsConfiguration_removed (16.49s) --- PASS: TestAccAWSS3BucketAnalyticsConfiguration_updateBasic (25.76s) --- PASS: TestAccAWSS3BucketAnalyticsConfiguration_WithFilter_Empty (1.07s) --- PASS: TestAccAWSS3BucketAnalyticsConfiguration_WithFilter_MultipleTags (17.35s) --- PASS: TestAccAWSS3BucketAnalyticsConfiguration_WithFilter_Prefix (18.13s) --- PASS: TestAccAWSS3BucketAnalyticsConfiguration_WithFilter_PrefixAndTags (17.55s) --- PASS: TestAccAWSS3BucketAnalyticsConfiguration_WithFilter_Remove (18.44s) --- PASS: TestAccAWSS3BucketAnalyticsConfiguration_WithFilter_SingleTag (17.35s) --- PASS: TestAccAWSS3BucketAnalyticsConfiguration_WithStorageClassAnalysis_Default (11.24s) --- PASS: TestAccAWSS3BucketAnalyticsConfiguration_WithStorageClassAnalysis_Empty (1.00s) --- PASS: TestAccAWSS3BucketAnalyticsConfiguration_WithStorageClassAnalysis_Full (11.93s) --- PASS: TestAccAWSS3BucketInventory_basic (12.77s) --- PASS: TestAccAWSS3BucketInventory_encryptWithSSEKMS (29.01s) --- PASS: TestAccAWSS3BucketInventory_encryptWithSSES3 (11.71s) --- PASS: TestAccAWSS3BucketMetric_basic (10.78s) --- PASS: TestAccAWSS3BucketMetric_WithEmptyFilter (9.68s) --- PASS: TestAccAWSS3BucketMetric_WithFilterMultipleTags (17.06s) --- PASS: TestAccAWSS3BucketMetric_WithFilterPrefix (17.44s) --- PASS: TestAccAWSS3BucketMetric_WithFilterPrefixAndMultipleTags (16.44s) --- PASS: TestAccAWSS3BucketMetric_WithFilterPrefixAndSingleTag (16.90s) --- PASS: TestAccAWSS3BucketMetric_WithFilterSingleTag (17.44s) --- PASS: TestAccAWSS3BucketNotification_LambdaFunction (33.03s) --- PASS: TestAccAWSS3BucketNotification_LambdaFunction_LambdaFunctionArn_Alias (32.74s) --- PASS: TestAccAWSS3BucketNotification_Queue (12.90s) --- PASS: TestAccAWSS3BucketNotification_Topic (12.99s) --- PASS: TestAccAWSS3BucketNotification_Topic_Multiple (13.95s) --- PASS: TestAccAWSS3BucketNotification_update (19.63s) --- PASS: TestAccAWSS3BucketObject_acl (24.41s) --- PASS: TestAccAWSS3BucketObject_content (9.92s) --- PASS: TestAccAWSS3BucketObject_contentBase64 (10.27s) --- PASS: TestAccAWSS3BucketObject_empty (10.26s) --- PASS: TestAccAWSS3BucketObject_etagEncryption (10.84s) --- PASS: TestAccAWSS3BucketObject_kms (29.19s) --- PASS: TestAccAWSS3BucketObject_metadata (23.93s) --- PASS: TestAccAWSS3BucketObject_noNameNoKey (1.36s) --- PASS: TestAccAWSS3BucketObject_NonVersioned (10.81s) --- PASS: TestAccAWSS3BucketObject_ObjectLockLegalHoldStartWithNone (24.84s) --- PASS: TestAccAWSS3BucketObject_ObjectLockLegalHoldStartWithOn (17.18s) --- PASS: TestAccAWSS3BucketObject_ObjectLockRetentionStartWithNone (25.37s) --- PASS: TestAccAWSS3BucketObject_ObjectLockRetentionStartWithSet (30.59s) --- PASS: TestAccAWSS3BucketObject_source (10.15s) --- PASS: TestAccAWSS3BucketObject_sse (11.86s) --- PASS: TestAccAWSS3BucketObject_storageClass (37.17s) --- PASS: TestAccAWSS3BucketObject_tags (30.42s) --- PASS: TestAccAWSS3BucketObject_tagsLeadingSlash (31.04s) --- PASS: TestAccAWSS3BucketObject_updates (17.59s) --- PASS: TestAccAWSS3BucketObject_updateSameFile (17.71s) --- PASS: TestAccAWSS3BucketObject_updatesWithVersioning (17.64s) --- PASS: TestAccAWSS3BucketObject_updatesWithVersioningViaAccessPoint (19.48s) --- PASS: TestAccAWSS3BucketObject_withContentCharacteristics (10.76s) --- PASS: TestAccAWSS3BucketPolicy_basic (12.65s) --- PASS: TestAccAWSS3BucketPolicy_policyUpdate (19.53s) --- PASS: TestAccAWSS3BucketPublicAccessBlock_basic (12.28s) --- PASS: TestAccAWSS3BucketPublicAccessBlock_BlockPublicAcls (25.82s) --- PASS: TestAccAWSS3BucketPublicAccessBlock_BlockPublicPolicy (25.48s) --- PASS: TestAccAWSS3BucketPublicAccessBlock_bucketDisappears (8.80s) --- PASS: TestAccAWSS3BucketPublicAccessBlock_disappears (10.79s) --- PASS: TestAccAWSS3BucketPublicAccessBlock_IgnorePublicAcls (25.40s) --- PASS: TestAccAWSS3BucketPublicAccessBlock_RestrictPublicBuckets (25.45s) --- PASS: TestAccAwsSecretsManagerSecret_Basic (9.27s) --- PASS: TestAccAwsSecretsManagerSecret_Description (13.90s) --- PASS: TestAccAwsSecretsManagerSecret_KmsKeyID (32.67s) --- PASS: TestAccAwsSecretsManagerSecret_policy (7.35s) --- PASS: TestAccAwsSecretsManagerSecret_RecoveryWindowInDays_Recreate (49.94s) --- PASS: TestAccAwsSecretsManagerSecret_RotationLambdaARN (44.62s) --- PASS: TestAccAwsSecretsManagerSecret_RotationRules (38.99s) --- PASS: TestAccAwsSecretsManagerSecret_Tags (23.26s) --- PASS: TestAccAwsSecretsManagerSecret_withNamePrefix (9.10s) --- PASS: TestAccAwsSecretsManagerSecretVersion_Base64Binary (8.89s) --- PASS: TestAccAwsSecretsManagerSecretVersion_BasicString (8.47s) --- PASS: TestAccAwsSecretsManagerSecretVersion_VersionStages (19.44s) --- PASS: TestAccAWSSESIdentityPolicy_basic (9.48s) --- PASS: TestAccAWSSESIdentityPolicy_Identity_Email (9.53s) --- PASS: TestAccAWSSESIdentityPolicy_Policy (15.16s) --- PASS: TestAccAWSSNSTopic_basic (8.57s) --- PASS: TestAccAWSSNSTopic_deliveryStatus (23.89s) --- PASS: TestAccAWSSNSTopic_encryption (14.20s) --- PASS: TestAccAWSSNSTopic_name (9.16s) --- PASS: TestAccAWSSNSTopic_namePrefix (8.80s) --- PASS: TestAccAWSSNSTopic_policy (8.73s) --- PASS: TestAccAWSSNSTopic_tags (20.13s) --- PASS: TestAccAWSSNSTopic_withDeliveryPolicy (9.00s) --- PASS: TestAccAWSSNSTopic_withFakeIAMRole (125.13s) --- PASS: TestAccAWSSNSTopic_withIAMRole (25.72s) --- PASS: TestAccAWSSNSTopicPolicy_basic (9.30s) --- PASS: TestAccAWSSNSTopicSubscription_autoConfirmingEndpoint (35.16s) --- PASS: TestAccAWSSNSTopicSubscription_basic (9.19s) --- PASS: TestAccAWSSNSTopicSubscription_deliveryPolicy (20.42s) --- PASS: TestAccAWSSNSTopicSubscription_filterPolicy (20.10s) --- PASS: TestAccAWSSNSTopicSubscription_rawMessageDelivery (20.85s) --- PASS: TestAccAWSSQSQueue_basic (20.16s) --- PASS: TestAccAWSSQSQueue_Encryption (7.99s) --- PASS: TestAccAWSSQSQueue_ExpectContentBasedDeduplicationError (3.66s) --- PASS: TestAccAWSSQSQueue_FIFO (8.56s) --- PASS: TestAccAWSSQSQueue_FIFOExpectNameError (3.85s) --- PASS: TestAccAWSSQSQueue_FIFOWithContentBasedDeduplication (8.58s) --- PASS: TestAccAWSSQSQueue_namePrefix (9.20s) --- PASS: TestAccAWSSQSQueue_namePrefix_fifo (8.69s) --- PASS: TestAccAWSSQSQueue_policy (9.82s) --- PASS: TestAccAWSSQSQueue_Policybasic (9.64s) --- PASS: TestAccAWSSQSQueue_queueDeletedRecently (79.37s) --- PASS: TestAccAWSSQSQueue_redrivePolicy (9.59s) --- PASS: TestAccAWSSQSQueue_tags (19.91s) --- PASS: TestAccAWSSQSQueuePolicy_basic (8.76s) --- PASS: TestAccAWSVpcEndpoint_gatewayBasic (21.12s) --- PASS: TestAccAWSVpcEndpoint_gatewayPolicy (34.24s) --- PASS: TestAccAWSVpcEndpoint_gatewayWithRouteTableAndPolicyAndTags (39.01s) --- PASS: TestAccAWSVpcEndpoint_interfaceBasic (101.25s) --- PASS: TestAccAWSVpcEndpoint_interfaceNonAWSService (270.04s) --- PASS: TestAccAWSVpcEndpoint_interfaceWithSubnetAndSecurityGroup (344.60s) --- PASS: TestAccAWSVpcEndpoint_removed (15.31s) --- PASS: TestAccAWSVpcEndpointConnectionNotification_basic (250.06s) --- PASS: TestAccAWSVpcEndpointRouteTableAssociation_basic (22.18s) --- PASS: TestAccAWSVpcEndpointService_AllowedPrincipalsAndTags (248.90s) --- PASS: TestAccAWSVpcEndpointService_basic (245.68s) --- PASS: TestAccAWSVpcEndpointService_removed (249.43s) --- PASS: TestAccAWSVpcEndpointServiceAllowedPrincipal_basic (217.69s) --- PASS: TestAccAWSVpcEndpointSubnetAssociation_basic (254.18s) --- PASS: TestAccAWSVpcEndpointSubnetAssociation_multiple (587.43s) --- PASS: TestAccDataSourceAwsLambdaInvocation_basic (37.09s) --- PASS: TestAccDataSourceAwsLambdaInvocation_complex (37.57s) --- PASS: TestAccDataSourceAwsLambdaInvocation_qualifier (36.15s) ``` --- GNUmakefile | 1 + aws/data_source_aws_lambda_invocation.go | 2 +- aws/resource_aws_api_gateway_rest_api.go | 2 +- aws/resource_aws_cloudformation_stack.go | 2 +- aws/resource_aws_cloudwatch_dashboard.go | 2 +- aws/resource_aws_config_config_rule.go | 2 +- aws/resource_aws_config_organization_custom_rule.go | 2 +- aws/resource_aws_config_organization_managed_rule.go | 2 +- aws/resource_aws_dms_replication_task.go | 4 ++-- aws/resource_aws_ecr_lifecycle_policy.go | 2 +- aws/resource_aws_elasticsearch_domain.go | 2 +- aws/resource_aws_emr_cluster.go | 8 ++++---- aws/resource_aws_emr_instance_group.go | 4 ++-- aws/resource_aws_emr_security_configuration.go | 2 +- aws/resource_aws_glacier_vault.go | 2 +- aws/resource_aws_glue_crawler.go | 2 +- aws/resource_aws_iam_role.go | 2 +- aws/resource_aws_kms_external_key.go | 2 +- aws/resource_aws_kms_key.go | 2 +- aws/resource_aws_organizations_policy.go | 2 +- aws/resource_aws_s3_bucket.go | 4 ++-- aws/resource_aws_s3_bucket_policy.go | 2 +- aws/resource_aws_secretsmanager_secret.go | 2 +- aws/resource_aws_ses_identity_policy.go | 2 +- aws/resource_aws_sns_topic.go | 4 ++-- aws/resource_aws_sns_topic_policy.go | 2 +- aws/resource_aws_sns_topic_subscription.go | 4 ++-- aws/resource_aws_sqs_queue.go | 4 ++-- aws/resource_aws_sqs_queue_policy.go | 4 ++-- aws/resource_aws_vpc_endpoint.go | 2 +- 30 files changed, 40 insertions(+), 39 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index a8df79344ef..ebc5197ca55 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -105,6 +105,7 @@ lint: -V002 \ -V003 \ -V004 \ + -V005 \ -V006 \ -V007 \ -V008 \ diff --git a/aws/data_source_aws_lambda_invocation.go b/aws/data_source_aws_lambda_invocation.go index d896c109dbc..86600702960 100644 --- a/aws/data_source_aws_lambda_invocation.go +++ b/aws/data_source_aws_lambda_invocation.go @@ -34,7 +34,7 @@ func dataSourceAwsLambdaInvocation() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, }, "result": { diff --git a/aws/resource_aws_api_gateway_rest_api.go b/aws/resource_aws_api_gateway_rest_api.go index 2f65535b7f6..6872939d762 100644 --- a/aws/resource_aws_api_gateway_rest_api.go +++ b/aws/resource_aws_api_gateway_rest_api.go @@ -49,7 +49,7 @@ func resourceAwsApiGatewayRestApi() *schema.Resource { "policy": { Type: schema.TypeString, Optional: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, diff --git a/aws/resource_aws_cloudformation_stack.go b/aws/resource_aws_cloudformation_stack.go index 68280373216..af964b67951 100644 --- a/aws/resource_aws_cloudformation_stack.go +++ b/aws/resource_aws_cloudformation_stack.go @@ -88,7 +88,7 @@ func resourceAwsCloudFormationStack() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) return json diff --git a/aws/resource_aws_cloudwatch_dashboard.go b/aws/resource_aws_cloudwatch_dashboard.go index a7ff5aac312..04d742bed41 100644 --- a/aws/resource_aws_cloudwatch_dashboard.go +++ b/aws/resource_aws_cloudwatch_dashboard.go @@ -34,7 +34,7 @@ func resourceAwsCloudWatchDashboard() *schema.Resource { "dashboard_body": { Type: schema.TypeString, Required: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) return json diff --git a/aws/resource_aws_config_config_rule.go b/aws/resource_aws_config_config_rule.go index 2c552a85f32..aba4c393550 100644 --- a/aws/resource_aws_config_config_rule.go +++ b/aws/resource_aws_config_config_rule.go @@ -49,7 +49,7 @@ func resourceAwsConfigConfigRule() *schema.Resource { "input_parameters": { Type: schema.TypeString, Optional: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, }, "maximum_execution_frequency": { Type: schema.TypeString, diff --git a/aws/resource_aws_config_organization_custom_rule.go b/aws/resource_aws_config_organization_custom_rule.go index c4ddc2fd56e..04f3941bee5 100644 --- a/aws/resource_aws_config_organization_custom_rule.go +++ b/aws/resource_aws_config_organization_custom_rule.go @@ -53,7 +53,7 @@ func resourceAwsConfigOrganizationCustomRule() *schema.Resource { DiffSuppressFunc: suppressEquivalentJsonDiffs, ValidateFunc: validation.All( validation.StringLenBetween(0, 2048), - validation.ValidateJsonString, + validation.StringIsJSON, ), }, "lambda_function_arn": { diff --git a/aws/resource_aws_config_organization_managed_rule.go b/aws/resource_aws_config_organization_managed_rule.go index b37f6d7999d..0868caedf79 100644 --- a/aws/resource_aws_config_organization_managed_rule.go +++ b/aws/resource_aws_config_organization_managed_rule.go @@ -53,7 +53,7 @@ func resourceAwsConfigOrganizationManagedRule() *schema.Resource { DiffSuppressFunc: suppressEquivalentJsonDiffs, ValidateFunc: validation.All( validation.StringLenBetween(0, 2048), - validation.ValidateJsonString, + validation.StringIsJSON, ), }, "maximum_execution_frequency": { diff --git a/aws/resource_aws_dms_replication_task.go b/aws/resource_aws_dms_replication_task.go index b8ee831df9c..4884795b95f 100644 --- a/aws/resource_aws_dms_replication_task.go +++ b/aws/resource_aws_dms_replication_task.go @@ -60,7 +60,7 @@ func resourceAwsDmsReplicationTask() *schema.Resource { "replication_task_settings": { Type: schema.TypeString, Optional: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentJsonDiffs, }, "source_endpoint_arn": { @@ -72,7 +72,7 @@ func resourceAwsDmsReplicationTask() *schema.Resource { "table_mappings": { Type: schema.TypeString, Required: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentJsonDiffs, }, "tags": tagsSchema(), diff --git a/aws/resource_aws_ecr_lifecycle_policy.go b/aws/resource_aws_ecr_lifecycle_policy.go index 3ff36581c5c..643a5e15593 100644 --- a/aws/resource_aws_ecr_lifecycle_policy.go +++ b/aws/resource_aws_ecr_lifecycle_policy.go @@ -27,7 +27,7 @@ func resourceAwsEcrLifecyclePolicy() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentJsonDiffs, }, "registry_id": { diff --git a/aws/resource_aws_elasticsearch_domain.go b/aws/resource_aws_elasticsearch_domain.go index 169e6275dfd..30a1df464bd 100644 --- a/aws/resource_aws_elasticsearch_domain.go +++ b/aws/resource_aws_elasticsearch_domain.go @@ -58,7 +58,7 @@ func resourceAwsElasticSearchDomain() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, "advanced_options": { diff --git a/aws/resource_aws_emr_cluster.go b/aws/resource_aws_emr_cluster.go index 3e4d689f79d..0655a9c8ab1 100644 --- a/aws/resource_aws_emr_cluster.go +++ b/aws/resource_aws_emr_cluster.go @@ -111,7 +111,7 @@ func resourceAwsEMRCluster() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentJsonDiffs, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) @@ -276,7 +276,7 @@ func resourceAwsEMRCluster() *schema.Resource { Type: schema.TypeString, Optional: true, DiffSuppressFunc: suppressEquivalentJsonDiffs, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, }, "bid_price": { Type: schema.TypeString, @@ -460,7 +460,7 @@ func resourceAwsEMRCluster() *schema.Resource { Type: schema.TypeString, Optional: true, DiffSuppressFunc: suppressEquivalentJsonDiffs, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, StateFunc: func(v interface{}) string { jsonString, _ := structure.NormalizeJsonString(v) return jsonString @@ -585,7 +585,7 @@ func resourceAwsEMRCluster() *schema.Resource { Optional: true, ForceNew: true, ConflictsWith: []string{"configurations"}, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentJsonDiffs, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) diff --git a/aws/resource_aws_emr_instance_group.go b/aws/resource_aws_emr_instance_group.go index 172c3fc2b4c..2e9a4c57dbd 100644 --- a/aws/resource_aws_emr_instance_group.go +++ b/aws/resource_aws_emr_instance_group.go @@ -44,7 +44,7 @@ func resourceAwsEMRInstanceGroup() *schema.Resource { Type: schema.TypeString, Optional: true, DiffSuppressFunc: suppressEquivalentJsonDiffs, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, }, "bid_price": { Type: schema.TypeString, @@ -60,7 +60,7 @@ func resourceAwsEMRInstanceGroup() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: false, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentJsonDiffs, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) diff --git a/aws/resource_aws_emr_security_configuration.go b/aws/resource_aws_emr_security_configuration.go index a30d6f0247d..1783adbbadf 100644 --- a/aws/resource_aws_emr_security_configuration.go +++ b/aws/resource_aws_emr_security_configuration.go @@ -41,7 +41,7 @@ func resourceAwsEMRSecurityConfiguration() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, }, "creation_date": { diff --git a/aws/resource_aws_glacier_vault.go b/aws/resource_aws_glacier_vault.go index 840e22df449..a31827d15b0 100644 --- a/aws/resource_aws_glacier_vault.go +++ b/aws/resource_aws_glacier_vault.go @@ -58,7 +58,7 @@ func resourceAwsGlacierVault() *schema.Resource { "access_policy": { Type: schema.TypeString, Optional: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) return json diff --git a/aws/resource_aws_glue_crawler.go b/aws/resource_aws_glue_crawler.go index 8d7e16adc25..b7df0863b30 100644 --- a/aws/resource_aws_glue_crawler.go +++ b/aws/resource_aws_glue_crawler.go @@ -186,7 +186,7 @@ func resourceAwsGlueCrawler() *schema.Resource { json, _ := structure.NormalizeJsonString(v) return json }, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, }, "security_configuration": { Type: schema.TypeString, diff --git a/aws/resource_aws_iam_role.go b/aws/resource_aws_iam_role.go index 60f03f8dc02..8a4d72e33cf 100644 --- a/aws/resource_aws_iam_role.go +++ b/aws/resource_aws_iam_role.go @@ -101,7 +101,7 @@ func resourceAwsIamRole() *schema.Resource { Type: schema.TypeString, Required: true, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, }, "force_detach_policies": { diff --git a/aws/resource_aws_kms_external_key.go b/aws/resource_aws_kms_external_key.go index 981bfffd4b1..a636ee26407 100644 --- a/aws/resource_aws_kms_external_key.go +++ b/aws/resource_aws_kms_external_key.go @@ -76,7 +76,7 @@ func resourceAwsKmsExternalKey() *schema.Resource { DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, ValidateFunc: validation.All( validation.StringLenBetween(0, 32768), - validation.ValidateJsonString, + validation.StringIsJSON, ), }, "tags": tagsSchema(), diff --git a/aws/resource_aws_kms_key.go b/aws/resource_aws_kms_key.go index 13f1d664000..6345c67e5cc 100644 --- a/aws/resource_aws_kms_key.go +++ b/aws/resource_aws_kms_key.go @@ -71,7 +71,7 @@ func resourceAwsKmsKey() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, "is_enabled": { diff --git a/aws/resource_aws_organizations_policy.go b/aws/resource_aws_organizations_policy.go index 739a7448a7a..0bd1bb7415a 100644 --- a/aws/resource_aws_organizations_policy.go +++ b/aws/resource_aws_organizations_policy.go @@ -31,7 +31,7 @@ func resourceAwsOrganizationsPolicy() *schema.Resource { Type: schema.TypeString, Required: true, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, }, "description": { Type: schema.TypeString, diff --git a/aws/resource_aws_s3_bucket.go b/aws/resource_aws_s3_bucket.go index 40f1ed8254d..18e3cbdb9f3 100644 --- a/aws/resource_aws_s3_bucket.go +++ b/aws/resource_aws_s3_bucket.go @@ -121,7 +121,7 @@ func resourceAwsS3Bucket() *schema.Resource { "policy": { Type: schema.TypeString, Optional: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, @@ -187,7 +187,7 @@ func resourceAwsS3Bucket() *schema.Resource { "routing_rules": { Type: schema.TypeString, Optional: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) return json diff --git a/aws/resource_aws_s3_bucket_policy.go b/aws/resource_aws_s3_bucket_policy.go index bc651406f3d..89e7bd9dfe4 100644 --- a/aws/resource_aws_s3_bucket_policy.go +++ b/aws/resource_aws_s3_bucket_policy.go @@ -33,7 +33,7 @@ func resourceAwsS3BucketPolicy() *schema.Resource { "policy": { Type: schema.TypeString, Required: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, }, diff --git a/aws/resource_aws_secretsmanager_secret.go b/aws/resource_aws_secretsmanager_secret.go index 7395059f16e..345f3c8360a 100644 --- a/aws/resource_aws_secretsmanager_secret.go +++ b/aws/resource_aws_secretsmanager_secret.go @@ -56,7 +56,7 @@ func resourceAwsSecretsManagerSecret() *schema.Resource { "policy": { Type: schema.TypeString, Optional: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, "recovery_window_in_days": { diff --git a/aws/resource_aws_ses_identity_policy.go b/aws/resource_aws_ses_identity_policy.go index fc16d8a56d7..68262c941c0 100644 --- a/aws/resource_aws_ses_identity_policy.go +++ b/aws/resource_aws_ses_identity_policy.go @@ -40,7 +40,7 @@ func resourceAwsSesIdentityPolicy() *schema.Resource { "policy": { Type: schema.TypeString, Required: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, }, diff --git a/aws/resource_aws_sns_topic.go b/aws/resource_aws_sns_topic.go index 271aafad90b..6bcd4641000 100644 --- a/aws/resource_aws_sns_topic.go +++ b/aws/resource_aws_sns_topic.go @@ -67,7 +67,7 @@ func resourceAwsSnsTopic() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) @@ -78,7 +78,7 @@ func resourceAwsSnsTopic() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: false, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentJsonDiffs, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) diff --git a/aws/resource_aws_sns_topic_policy.go b/aws/resource_aws_sns_topic_policy.go index 9d8d915b222..200a45ce7ed 100644 --- a/aws/resource_aws_sns_topic_policy.go +++ b/aws/resource_aws_sns_topic_policy.go @@ -33,7 +33,7 @@ func resourceAwsSnsTopicPolicy() *schema.Resource { "policy": { Type: schema.TypeString, Required: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, }, diff --git a/aws/resource_aws_sns_topic_subscription.go b/aws/resource_aws_sns_topic_subscription.go index 9c422dddb5a..2f665448675 100644 --- a/aws/resource_aws_sns_topic_subscription.go +++ b/aws/resource_aws_sns_topic_subscription.go @@ -71,7 +71,7 @@ func resourceAwsSnsTopicSubscription() *schema.Resource { "delivery_policy": { Type: schema.TypeString, Optional: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentSnsTopicSubscriptionDeliveryPolicy, }, "raw_message_delivery": { @@ -86,7 +86,7 @@ func resourceAwsSnsTopicSubscription() *schema.Resource { "filter_policy": { Type: schema.TypeString, Optional: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentJsonDiffs, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) diff --git a/aws/resource_aws_sqs_queue.go b/aws/resource_aws_sqs_queue.go index 6d55747ec19..18cd860fdb1 100644 --- a/aws/resource_aws_sqs_queue.go +++ b/aws/resource_aws_sqs_queue.go @@ -91,13 +91,13 @@ func resourceAwsSqsQueue() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, "redrive_policy": { Type: schema.TypeString, Optional: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v) return json diff --git a/aws/resource_aws_sqs_queue_policy.go b/aws/resource_aws_sqs_queue_policy.go index 20fd51da67a..3c7e3c56f4e 100644 --- a/aws/resource_aws_sqs_queue_policy.go +++ b/aws/resource_aws_sqs_queue_policy.go @@ -10,7 +10,7 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/helper/schema" "github.com/hashicorp/terraform-plugin-sdk/helper/validation" - "github.com/jen20/awspolicyequivalence" + awspolicy "github.com/jen20/awspolicyequivalence" ) func resourceAwsSqsQueuePolicy() *schema.Resource { @@ -35,7 +35,7 @@ func resourceAwsSqsQueuePolicy() *schema.Resource { "policy": { Type: schema.TypeString, Required: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, }, }, diff --git a/aws/resource_aws_vpc_endpoint.go b/aws/resource_aws_vpc_endpoint.go index c9623b13be4..8a26cf59b27 100644 --- a/aws/resource_aws_vpc_endpoint.go +++ b/aws/resource_aws_vpc_endpoint.go @@ -65,7 +65,7 @@ func resourceAwsVpcEndpoint() *schema.Resource { Type: schema.TypeString, Optional: true, Computed: true, - ValidateFunc: validation.ValidateJsonString, + ValidateFunc: validation.StringIsJSON, DiffSuppressFunc: suppressEquivalentAwsPolicyDiffs, StateFunc: func(v interface{}) string { json, _ := structure.NormalizeJsonString(v)