Skip to content

Commit

Permalink
provider: Fix and enable tfproviderlint V002, V004, V007, and V008 (#…
Browse files Browse the repository at this point in the history
…12233)

Reference: #11844

Previously:

```
aws/resource_aws_codepipeline_webhook.go:54:22: V002: deprecated validation.CIDRNetwork should be replaced with validation.IsCIDRNetwork
aws/resource_aws_vpc.go:37:19: V002: deprecated validation.CIDRNetwork should be replaced with validation.IsCIDRNetwork
aws/resource_aws_vpc_ipv4_cidr_block_association.go:39:19: V002: deprecated validation.CIDRNetwork should be replaced with validation.IsCIDRNetwork

aws/resource_aws_route53_resolver_endpoint.go:58:22: V004: deprecated validation.SingleIP should be replaced with validation.IsIPAddress
aws/resource_aws_route53_resolver_rule.go:79:22: V004: deprecated validation.SingleIP should be replaced with validation.IsIPAddress

aws/data_source_aws_ami.go:35:19: V007: deprecated validation.ValidateRegexp should be replaced with validation.StringIsValidRegExp
aws/data_source_aws_ami_ids.go:33:19: V007: deprecated validation.ValidateRegexp should be replaced with validation.StringIsValidRegExp
aws/data_source_aws_elastic_beanstalk_solution_stack.go:22:19: V007: deprecated validation.ValidateRegexp should be replaced with validation.StringIsValidRegExp

aws/resource_aws_appsync_api_key.go:46:19: V008: deprecated validation.ValidateRFC3339TimeString should be replaced with validation.IsRFC3339Time
aws/resource_aws_ec2_capacity_reservation.go:45:19: V008: deprecated validation.ValidateRFC3339TimeString should be replaced with validation.IsRFC3339Time
aws/resource_aws_kms_external_key.go:86:19: V008: deprecated validation.ValidateRFC3339TimeString should be replaced with validation.IsRFC3339Time
aws/resource_aws_lambda_event_source_mapping.go:62:19: V008: deprecated validation.ValidateRFC3339TimeString should be replaced with validation.IsRFC3339Time
aws/resource_aws_launch_template.go:320:25: V008: deprecated validation.ValidateRFC3339TimeString should be replaced with validation.IsRFC3339Time
aws/resource_aws_s3_bucket_object.go:193:19: V008: deprecated validation.ValidateRFC3339TimeString should be replaced with validation.IsRFC3339Time
aws/resource_aws_spot_fleet_request.go:343:19: V008: deprecated validation.ValidateRFC3339TimeString should be replaced with validation.IsRFC3339Time
aws/resource_aws_spot_fleet_request.go:349:19: V008: deprecated validation.ValidateRFC3339TimeString should be replaced with validation.IsRFC3339Time
aws/resource_aws_spot_instance_request.go:104:19: V008: deprecated validation.ValidateRFC3339TimeString should be replaced with validation.IsRFC3339Time
aws/resource_aws_spot_instance_request.go:97:19: V008: deprecated validation.ValidateRFC3339TimeString should be replaced with validation.IsRFC3339Time
aws/resource_aws_ssm_activation.go:42:19: V008: deprecated validation.ValidateRFC3339TimeString should be replaced with validation.IsRFC3339Time
```

Output from acceptance testing:

```
--- PASS: TestAccAWSAmiDataSource_instanceStore (14.77s)
--- PASS: TestAccAWSAmiDataSource_localNameFilter (18.63s)
--- PASS: TestAccAWSAmiDataSource_natInstance (15.86s)
--- PASS: TestAccAWSAmiDataSource_windowsInstance (17.85s)

--- PASS: TestAccDataSourceAwsAmiIds_basic (15.83s)
--- PASS: TestAccDataSourceAwsAmiIds_sorted (31.07s)

--- PASS: TestAccAWSElasticBeanstalkSolutionStackDataSource (13.74s)

--- PASS: TestAccAWSAppsyncApiKey_basic (19.11s)
--- PASS: TestAccAWSAppsyncApiKey_Description (26.75s)
--- PASS: TestAccAWSAppsyncApiKey_Expires (26.03s)

--- PASS: TestAccAWSCodePipelineWebhook_basic (45.87s)
--- PASS: TestAccAWSCodePipelineWebhook_ipAuth (44.09s)
--- PASS: TestAccAWSCodePipelineWebhook_tags (92.65s)
--- PASS: TestAccAWSCodePipelineWebhook_unauthenticated (45.40s)
--- PASS: TestAccAWSCodePipelineWebhook_UpdateAuthenticationConfiguration_SecretToken (63.24s)

--- PASS: TestAccAWSEc2CapacityReservation_basic (19.18s)
--- PASS: TestAccAWSEc2CapacityReservation_ebsOptimized (18.24s)
--- PASS: TestAccAWSEc2CapacityReservation_endDate (30.99s)
--- PASS: TestAccAWSEc2CapacityReservation_endDateType (44.58s)
--- PASS: TestAccAWSEc2CapacityReservation_ephemeralStorage (18.73s)
--- PASS: TestAccAWSEc2CapacityReservation_instanceCount (32.83s)
--- PASS: TestAccAWSEc2CapacityReservation_instanceMatchCriteria (18.71s)
--- PASS: TestAccAWSEc2CapacityReservation_instanceType (32.72s)
--- PASS: TestAccAWSEc2CapacityReservation_tags (45.51s)

--- PASS: TestAccAWSKmsExternalKey_basic (41.14s)
--- PASS: TestAccAWSKmsExternalKey_DeletionWindowInDays (52.45s)
--- PASS: TestAccAWSKmsExternalKey_Description (52.48s)
--- PASS: TestAccAWSKmsExternalKey_disappears (33.53s)
--- PASS: TestAccAWSKmsExternalKey_Enabled (308.60s)
--- PASS: TestAccAWSKmsExternalKey_KeyMaterialBase64 (145.65s)
--- PASS: TestAccAWSKmsExternalKey_Policy (53.09s)
--- PASS: TestAccAWSKmsExternalKey_Tags (65.26s)
--- PASS: TestAccAWSKmsExternalKey_ValidTo (191.46s)

--- PASS: TestAccAWSLambdaEventSourceMapping_BatchWindow (85.38s)
--- PASS: TestAccAWSLambdaEventSourceMapping_BisectBatch (83.25s)
--- PASS: TestAccAWSLambdaEventSourceMapping_changesInEnabledAreDetected (86.33s)
--- PASS: TestAccAWSLambdaEventSourceMapping_kinesis_basic (84.71s)
--- PASS: TestAccAWSLambdaEventSourceMapping_kinesis_disappears (70.37s)
--- PASS: TestAccAWSLambdaEventSourceMapping_kinesis_removeBatchSize (84.85s)
--- PASS: TestAccAWSLambdaEventSourceMapping_KinesisDestinationConfig (87.03s)
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRecordAgeInSeconds (83.44s)
--- PASS: TestAccAWSLambdaEventSourceMapping_MaximumRetryAttempts (83.57s)
--- PASS: TestAccAWSLambdaEventSourceMapping_ParallelizationFactor (84.20s)
--- PASS: TestAccAWSLambdaEventSourceMapping_sqs_basic (91.05s)
--- PASS: TestAccAWSLambdaEventSourceMapping_sqs_withFunctionName (38.73s)
--- PASS: TestAccAWSLambdaEventSourceMapping_sqsDisappears (132.14s)
--- PASS: TestAccAWSLambdaEventSourceMapping_StartingPositionTimestamp (70.89s)

--- PASS: TestAccAWSLaunchTemplate_associatePublicIPAddress (81.29s)
--- PASS: TestAccAWSLaunchTemplate_basic (16.75s)
--- PASS: TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS (41.98s)
--- PASS: TestAccAWSLaunchTemplate_BlockDeviceMappings_EBS_DeleteOnTermination (48.44s)
--- PASS: TestAccAWSLaunchTemplate_capacityReservation_preference (19.58s)
--- PASS: TestAccAWSLaunchTemplate_capacityReservation_target (20.22s)
--- PASS: TestAccAWSLaunchTemplate_cpuOptions (16.28s)
--- PASS: TestAccAWSLaunchTemplate_creditSpecification_nonBurstable (16.50s)
--- PASS: TestAccAWSLaunchTemplate_creditSpecification_t2 (19.34s)
--- PASS: TestAccAWSLaunchTemplate_creditSpecification_t3 (17.09s)
--- PASS: TestAccAWSLaunchTemplate_data (17.93s)
--- PASS: TestAccAWSLaunchTemplate_description (31.55s)
--- PASS: TestAccAWSLaunchTemplate_disappears (12.52s)
--- PASS: TestAccAWSLaunchTemplate_EbsOptimized (61.86s)
--- PASS: TestAccAWSLaunchTemplate_ElasticInferenceAccelerator (30.31s)
--- PASS: TestAccAWSLaunchTemplate_IamInstanceProfile_EmptyConfigurationBlock (14.70s)
--- PASS: TestAccAWSLaunchTemplate_instanceMarketOptions (50.72s)
--- PASS: TestAccAWSLaunchTemplate_licenseSpecification (21.67s)
--- PASS: TestAccAWSLaunchTemplate_networkInterface (36.47s)
--- PASS: TestAccAWSLaunchTemplate_networkInterface_ipv6AddressCount (16.76s)
--- PASS: TestAccAWSLaunchTemplate_networkInterface_ipv6Addresses (17.95s)
--- PASS: TestAccAWSLaunchTemplate_tags (34.53s)
--- PASS: TestAccAWSLaunchTemplate_update (79.77s)

--- PASS: TestAccAwsRoute53ResolverEndpoint_basicInbound (97.11s)
--- PASS: TestAccAwsRoute53ResolverEndpoint_updateOutbound (394.08s)

--- PASS: TestAccAwsRoute53ResolverRule_basic (41.82s)
--- PASS: TestAccAwsRoute53ResolverRule_forward (297.20s)
--- PASS: TestAccAwsRoute53ResolverRule_forwardEndpointRecreate (430.76s)
--- PASS: TestAccAwsRoute53ResolverRule_tags (69.62s)
--- PASS: TestAccAwsRoute53ResolverRule_updateName (67.71s)

--- PASS: TestAccAWSS3BucketObject_acl (76.63s)
--- PASS: TestAccAWSS3BucketObject_content (35.37s)
--- PASS: TestAccAWSS3BucketObject_contentBase64 (36.20s)
--- PASS: TestAccAWSS3BucketObject_empty (32.32s)
--- PASS: TestAccAWSS3BucketObject_etagEncryption (34.91s)
--- PASS: TestAccAWSS3BucketObject_kms (56.13s)
--- PASS: TestAccAWSS3BucketObject_metadata (74.02s)
--- PASS: TestAccAWSS3BucketObject_noNameNoKey (1.31s)
--- PASS: TestAccAWSS3BucketObject_ObjectLockLegalHoldStartWithNone (77.38s)
--- PASS: TestAccAWSS3BucketObject_ObjectLockLegalHoldStartWithOn (58.46s)
--- PASS: TestAccAWSS3BucketObject_ObjectLockRetentionStartWithNone (79.33s)
--- PASS: TestAccAWSS3BucketObject_ObjectLockRetentionStartWithSet (99.87s)
--- PASS: TestAccAWSS3BucketObject_source (31.86s)
--- PASS: TestAccAWSS3BucketObject_sse (34.55s)
--- PASS: TestAccAWSS3BucketObject_storageClass (116.76s)
--- PASS: TestAccAWSS3BucketObject_tags (101.60s)
--- PASS: TestAccAWSS3BucketObject_tagsLeadingSlash (99.58s)
--- PASS: TestAccAWSS3BucketObject_updates (55.60s)
--- PASS: TestAccAWSS3BucketObject_updateSameFile (57.91s)
--- PASS: TestAccAWSS3BucketObject_updatesWithVersioning (54.93s)
--- PASS: TestAccAWSS3BucketObject_updatesWithVersioningViaAccessPoint (63.40s)
--- PASS: TestAccAWSS3BucketObject_withContentCharacteristics (38.99s)

--- PASS: TestAccAWSSpotFleetRequest_associatePublicIpAddress (285.86s)
--- PASS: TestAccAWSSpotFleetRequest_basic (412.16s)
--- PASS: TestAccAWSSpotFleetRequest_changePriceForcesNewRequest (525.75s)
--- PASS: TestAccAWSSpotFleetRequest_diversifiedAllocation (266.75s)
--- PASS: TestAccAWSSpotFleetRequest_fleetType (295.24s)
--- PASS: TestAccAWSSpotFleetRequest_iamInstanceProfileArn (387.80s)
--- PASS: TestAccAWSSpotFleetRequest_instanceInterruptionBehavior (276.65s)
--- PASS: TestAccAWSSpotFleetRequest_LaunchSpecification_EbsBlockDevice_KmsKeyId (191.89s)
--- PASS: TestAccAWSSpotFleetRequest_LaunchSpecification_RootBlockDevice_KmsKeyId (182.38s)
--- PASS: TestAccAWSSpotFleetRequest_lowestPriceAzInGivenList (274.39s)
--- PASS: TestAccAWSSpotFleetRequest_lowestPriceAzOrSubnetInRegion (276.68s)
--- PASS: TestAccAWSSpotFleetRequest_lowestPriceSubnetInGivenList (218.95s)
--- PASS: TestAccAWSSpotFleetRequest_multipleInstancePools (265.21s)
--- PASS: TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameAz (288.81s)
--- PASS: TestAccAWSSpotFleetRequest_multipleInstanceTypesInSameSubnet (228.79s)
--- PASS: TestAccAWSSpotFleetRequest_overriddingSpotPrice (255.04s)
--- PASS: TestAccAWSSpotFleetRequest_placementTenancyAndGroup (61.33s)
--- PASS: TestAccAWSSpotFleetRequest_updateExcessCapacityTerminationPolicy (543.75s)
--- PASS: TestAccAWSSpotFleetRequest_updateTargetCapacity (883.50s)
--- PASS: TestAccAWSSpotFleetRequest_withEBSDisk (368.32s)
--- PASS: TestAccAWSSpotFleetRequest_WithELBs (266.91s)
--- PASS: TestAccAWSSpotFleetRequest_withoutSpotPrice (262.01s)
--- PASS: TestAccAWSSpotFleetRequest_withTags (295.13s)
--- PASS: TestAccAWSSpotFleetRequest_WithTargetGroups (403.21s)
--- PASS: TestAccAWSSpotFleetRequest_withWeightedCapacity (275.44s)

--- PASS: TestAccAWSSpotInstanceRequest_basic (106.05s)
--- PASS: TestAccAWSSpotInstanceRequest_getPasswordData (261.45s)
--- PASS: TestAccAWSSpotInstanceRequest_NetworkInterfaceAttributes (100.98s)
--- PASS: TestAccAWSSpotInstanceRequest_SubnetAndSGAndPublicIpAddress (143.21s)
--- PASS: TestAccAWSSpotInstanceRequest_validUntil (116.82s)
--- PASS: TestAccAWSSpotInstanceRequest_vpc (122.18s)
--- PASS: TestAccAWSSpotInstanceRequest_withBlockDuration (95.86s)
--- PASS: TestAccAWSSpotInstanceRequest_withLaunchGroup (85.79s)
--- PASS: TestAccAWSSpotInstanceRequest_withoutSpotPrice (117.04s)

--- PASS: TestAccAWSSSMActivation_basic (34.84s)
--- PASS: TestAccAWSSSMActivation_disappears (27.99s)
--- PASS: TestAccAWSSSMActivation_update (39.53s)

--- PASS: TestAccAWSVpc_AssignGeneratedIpv6CidrBlock (75.46s)
--- PASS: TestAccAWSVpc_basic (30.07s)
--- PASS: TestAccAWSVpc_bothDnsOptionsSet (31.61s)
--- PASS: TestAccAWSVpc_classiclinkDnsSupportOptionSet (34.03s)
--- PASS: TestAccAWSVpc_classiclinkOptionSet (30.84s)
--- PASS: TestAccAWSVpc_coreMismatchedDiffs (26.30s)
--- PASS: TestAccAWSVpc_DisabledDnsSupport (31.74s)
--- PASS: TestAccAWSVpc_disappears (16.57s)
--- PASS: TestAccAWSVpc_ignoreTags (52.00s)
--- PASS: TestAccAWSVpc_tags (52.71s)
--- PASS: TestAccAWSVpc_Tenancy (76.46s)
--- PASS: TestAccAWSVpc_update (45.63s)

--- PASS: TestAccAwsVpcIpv4CidrBlockAssociation_basic (53.59s)
```
  • Loading branch information
bflad authored Mar 10, 2020
1 parent e6489e6 commit 12461ea
Show file tree
Hide file tree
Showing 18 changed files with 26 additions and 23 deletions.
4 changes: 4 additions & 0 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,12 @@ lint:
-S032 \
-S033 \
-S034 \
-V002 \
-V003 \
-V004 \
-V006 \
-V007 \
-V008 \
./$(PKG_NAME)

tools:
Expand Down
2 changes: 1 addition & 1 deletion aws/data_source_aws_ami.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func dataSourceAwsAmi() *schema.Resource {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
ValidateFunc: validation.ValidateRegexp,
ValidateFunc: validation.StringIsValidRegExp,
},
"most_recent": {
Type: schema.TypeBool,
Expand Down
2 changes: 1 addition & 1 deletion aws/data_source_aws_ami_ids.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func dataSourceAwsAmiIds() *schema.Resource {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
ValidateFunc: validation.ValidateRegexp,
ValidateFunc: validation.StringIsValidRegExp,
},
"owners": {
Type: schema.TypeList,
Expand Down
2 changes: 1 addition & 1 deletion aws/data_source_aws_elastic_beanstalk_solution_stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func dataSourceAwsElasticBeanstalkSolutionStack() *schema.Resource {
Type: schema.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: validation.ValidateRegexp,
ValidateFunc: validation.StringIsValidRegExp,
},
"most_recent": {
Type: schema.TypeBool,
Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_appsync_api_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func resourceAwsAppsyncApiKey() *schema.Resource {
}
return false
},
ValidateFunc: validation.ValidateRFC3339TimeString,
ValidateFunc: validation.IsRFC3339Time,
},
"key": {
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_codepipeline_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func resourceAwsCodePipelineWebhook() *schema.Resource {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
ValidateFunc: validation.CIDRNetwork(0, 32),
ValidateFunc: validation.IsCIDRNetwork(0, 32),
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_ec2_capacity_reservation.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func resourceAwsEc2CapacityReservation() *schema.Resource {
"end_date": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validation.ValidateRFC3339TimeString,
ValidateFunc: validation.IsRFC3339Time,
},
"end_date_type": {
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_kms_external_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func resourceAwsKmsExternalKey() *schema.Resource {
"valid_to": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validation.ValidateRFC3339TimeString,
ValidateFunc: validation.IsRFC3339Time,
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_lambda_event_source_mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func resourceAwsLambdaEventSourceMapping() *schema.Resource {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
ValidateFunc: validation.ValidateRFC3339TimeString,
ValidateFunc: validation.IsRFC3339Time,
},
"batch_size": {
Type: schema.TypeInt,
Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_launch_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ func resourceAwsLaunchTemplate() *schema.Resource {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.ValidateRFC3339TimeString,
ValidateFunc: validation.IsRFC3339Time,
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_route53_resolver_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func resourceAwsRoute53ResolverEndpoint() *schema.Resource {
Type: schema.TypeString,
Optional: true,
Computed: true,
ValidateFunc: validation.SingleIP(),
ValidateFunc: validation.IsIPAddress,
},
"ip_id": {
Type: schema.TypeString,
Expand Down
9 changes: 4 additions & 5 deletions aws/resource_aws_route53_resolver_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@ package aws
import (
"bytes"
"fmt"
"github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags"
"log"
"time"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/route53resolver"
"github.com/hashicorp/terraform-plugin-sdk/helper/hashcode"
"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/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/route53resolver"
"github.com/terraform-providers/terraform-provider-aws/aws/internal/keyvaluetags"
)

const (
Expand Down Expand Up @@ -76,7 +75,7 @@ func resourceAwsRoute53ResolverRule() *schema.Resource {
"ip": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.SingleIP(),
ValidateFunc: validation.IsIPAddress,
},
"port": {
Type: schema.TypeInt,
Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_s3_bucket_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func resourceAwsS3BucketObject() *schema.Resource {
"object_lock_retain_until_date": {
Type: schema.TypeString,
Optional: true,
ValidateFunc: validation.ValidateRFC3339TimeString,
ValidateFunc: validation.IsRFC3339Time,
},
},
}
Expand Down
4 changes: 2 additions & 2 deletions aws/resource_aws_spot_fleet_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,13 +341,13 @@ func resourceAwsSpotFleetRequest() *schema.Resource {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
ValidateFunc: validation.ValidateRFC3339TimeString,
ValidateFunc: validation.IsRFC3339Time,
},
"valid_until": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
ValidateFunc: validation.ValidateRFC3339TimeString,
ValidateFunc: validation.IsRFC3339Time,
},
"fleet_type": {
Type: schema.TypeString,
Expand Down
4 changes: 2 additions & 2 deletions aws/resource_aws_spot_instance_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ func resourceAwsSpotInstanceRequest() *schema.Resource {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
ValidateFunc: validation.ValidateRFC3339TimeString,
ValidateFunc: validation.IsRFC3339Time,
Computed: true,
}
s["valid_until"] = &schema.Schema{
Type: schema.TypeString,
Optional: true,
ForceNew: true,
ValidateFunc: validation.ValidateRFC3339TimeString,
ValidateFunc: validation.IsRFC3339Time,
Computed: true,
}
return s
Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_ssm_activation.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func resourceAwsSsmActivation() *schema.Resource {
Optional: true,
Computed: true,
ForceNew: true,
ValidateFunc: validation.ValidateRFC3339TimeString,
ValidateFunc: validation.IsRFC3339Time,
},
"iam_role": {
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_vpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func resourceAwsVpc() *schema.Resource {
Type: schema.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: validation.CIDRNetwork(16, 28),
ValidateFunc: validation.IsCIDRNetwork(16, 28),
},

"instance_tenancy": {
Expand Down
2 changes: 1 addition & 1 deletion aws/resource_aws_vpc_ipv4_cidr_block_association.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func resourceAwsVpcIpv4CidrBlockAssociation() *schema.Resource {
Type: schema.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: validation.CIDRNetwork(16, 28), // The allowed block size is between a /28 netmask and /16 netmask.
ValidateFunc: validation.IsCIDRNetwork(16, 28), // The allowed block size is between a /28 netmask and /16 netmask.
},
},

Expand Down

0 comments on commit 12461ea

Please sign in to comment.