Skip to content
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

Remove last empty string validation #22954

Merged
merged 11 commits into from
Feb 7, 2022
Merged

Conversation

YakDriver
Copy link
Member

@YakDriver YakDriver commented Feb 4, 2022

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #13943

Output from acceptance testing:

% make testacc TESTS=TestAccEFSMountTarget PKG=efs
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/efs/... -v -count 1 -parallel 20 -run='TestAccEFSMountTarget'  -timeout 180m
--- PASS: TestAccEFSMountTarget_IPAddress_emptyString (144.23s)
--- PASS: TestAccEFSMountTarget_disappears (133.90s)
--- PASS: TestAccEFSMountTarget_ipAddress (139.09s)
--- PASS: TestAccEFSMountTargetDataSource_byAccessPointID (143.58s)
--- PASS: TestAccEFSMountTargetDataSource_byFileSystemID (150.54s)
--- PASS: TestAccEFSMountTargetDataSource_basic (162.46s)
--- PASS: TestAccEFSMountTarget_basic (256.76s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/efs	258.501s
% make testacc TESTS=TestAccEventsTarget_ PKG=events
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/events/... -v -count 1 -parallel 20 -run='TestAccEventsTarget_'  -timeout 180m
--- SKIP: TestAccEventsTarget_partnerEventBus (0.00s)
--- PASS: TestAccEventsTarget_disappears (26.87s)
--- PASS: TestAccEventsTarget_ssmDocument (28.90s)
--- PASS: TestAccEventsTarget_generatedTargetID (30.36s)
--- PASS: TestAccEventsTarget_eventBusARN (31.20s)
--- PASS: TestAccEventsTarget_http (33.82s)
--- PASS: TestAccEventsTarget_inputTransformerJSONString (43.12s)
--- PASS: TestAccEventsTarget_ecsFull (44.03s)
--- PASS: TestAccEventsTarget_ecsWithBlankTaskCount (44.10s)
--- PASS: TestAccEventsTarget_eventBusName (52.22s)
--- PASS: TestAccEventsTarget_Input_transformer (52.52s)
--- PASS: TestAccEventsTarget_kinesis (59.79s)
--- PASS: TestAccEventsTarget_full (60.44s)
--- PASS: TestAccEventsTarget_basic (61.35s)
--- PASS: TestAccEventsTarget_sqs (61.94s)
--- PASS: TestAccEventsTarget_RetryPolicy_deadLetter (63.36s)
--- PASS: TestAccEventsTarget_ecsWithoutLaunchType (86.61s)
--- PASS: TestAccEventsTarget_batch (135.60s)
--- PASS: TestAccEventsTarget_redshift (214.81s)
--- PASS: TestAccEventsTarget_ecs (283.56s)
--- PASS: TestAccEventsTarget_ecsWithBlankLaunchType (304.91s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/events	306.531s
% make testacc TESTS='TestAccElasticsearchDomain_|TestAccElasticsearchDomainDataSource' PKG=elasticsearch
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/elasticsearch/... -v -count 1 -parallel 20 -run='TestAccElasticsearchDomain_|TestAccElasticsearchDomainDataSource'  -timeout 180m
--- PASS: TestAccElasticsearchDomain_WithVolumeType_missing (1286.91s)
--- PASS: TestAccElasticsearchDomain_EncryptAtRestDefault_key (951.47s)
--- PASS: TestAccElasticsearchDomain_policyIgnoreEquivalent (1040.32s)
--- PASS: TestAccElasticsearchDomain_nodeToNodeEncryption (1051.47s)
--- PASS: TestAccElasticsearchDomain_tags (1149.95s)
--- PASS: TestAccElasticsearchDomain_policy (1201.56s)
--- PASS: TestAccElasticsearchDomain_EncryptAtRestSpecify_key (1206.94s)
--- PASS: TestAccElasticsearchDomain_AdvancedSecurityOptions_disabled (1269.89s)
--- PASS: TestAccElasticsearchDomainDataSource_Data_basic (1364.29s)
--- PASS: TestAccElasticsearchDomain_LogPublishingOptions_esApplicationLogs (1403.99s)
--- PASS: TestAccElasticsearchDomain_disappears (1448.70s)
--- PASS: TestAccElasticsearchDomain_AutoTuneOptions (1498.63s)
--- PASS: TestAccElasticsearchDomain_LogPublishingOptions_searchSlowLogs (1803.40s)
--- PASS: TestAccElasticsearchDomain_duplicate (636.67s)
--- PASS: TestAccElasticsearchDomain_v23 (2041.81s)
--- PASS: TestAccElasticsearchDomain_AdvancedSecurityOptions_userDB (1370.97s)
--- PASS: TestAccElasticsearchDomain_AdvancedSecurityOptions_iam (2334.20s)
--- PASS: TestAccElasticsearchDomain_cognitoOptionsCreateAndRemove (2464.70s)
--- PASS: TestAccElasticsearchDomain_LogPublishingOptions_auditLogs (1487.16s)
--- PASS: TestAccElasticsearchDomain_cognitoOptionsUpdate (2577.96s)
--- PASS: TestAccElasticsearchDomain_LogPublishingOptions_indexSlowLogs (2686.10s)
--- PASS: TestAccElasticsearchDomain_complex (1031.55s)
--- PASS: TestAccElasticsearchDomain_basic (839.65s)
--- PASS: TestAccElasticsearchDomain_vpc (1493.08s)
--- PASS: TestAccElasticsearchDomain_UpdateVolume_type (3376.26s)
--- PASS: TestAccElasticsearchDomain_update (3412.40s)
--- PASS: TestAccElasticsearchDomain_customEndpoint (1974.99s)
--- PASS: TestAccElasticsearchDomainDataSource_Data_advanced (1620.45s)
--- PASS: TestAccElasticsearchDomain_internetToVPCEndpoint (2601.80s)
... still running

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. service/ec2 Issues and PRs that pertain to the ec2 service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/XL Managed by automation to categorize the size of a PR. service/efs Issues and PRs that pertain to the efs service. labels Feb 4, 2022
@YakDriver YakDriver force-pushed the td-empty-valid-everything-else branch from fcdcf4c to 4f69100 Compare February 4, 2022 19:29
@github-actions github-actions bot added size/XS Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. size/S Managed by automation to categorize the size of a PR. size/L Managed by automation to categorize the size of a PR. service/elasticsearch Issues and PRs that pertain to the elasticsearch service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. linter Pertains to changes to or issues with the various linters. service/events Issues and PRs that pertain to the events service. size/XL Managed by automation to categorize the size of a PR. and removed tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/ec2 Issues and PRs that pertain to the ec2 service. documentation Introduces or discusses updates to documentation. size/XL Managed by automation to categorize the size of a PR. size/XS Managed by automation to categorize the size of a PR. size/S Managed by automation to categorize the size of a PR. size/L Managed by automation to categorize the size of a PR. labels Feb 4, 2022
@YakDriver YakDriver added this to the v4.0.0 milestone Feb 4, 2022
@anGie44 anGie44 self-assigned this Feb 4, 2022
Copy link
Contributor

@anGie44 anGie44 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, just need to update the one test to make golangci-lint happy

Output of affected tests:

--- PASS: TestAccEFSMountTarget_basic (257.17s)
--- PASS: TestAccEFSMountTarget_IPAddress_emptyString (145.44s)

--- PASS: TestAccEventsTarget_basic (1806.59s)
--- PASS: TestAccEventsTarget_ecsWithBlankLaunchType (2214.51s)

--- PASS: TestAccElasticsearchDomain_WithVolumeType_missing (2059.82s)

@@ -683,3 +683,13 @@ rules:
metavariable: "$FUNC"
regex: "^resource\\w*(Delete|Disable)$"
severity: WARNING

- id: avoid-string-is-empty-validation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

@@ -363,6 +365,49 @@ resource "aws_efs_mount_target" "test" {
`, ipAddress)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`, ipAddress)
`, rName, ipAddress)

And in the test the ip_address just needs to be updated as well

@anGie44 anGie44 added the breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. label Feb 4, 2022
@YakDriver YakDriver force-pushed the td-empty-valid-everything-else branch from f1cdf57 to 2def944 Compare February 7, 2022 16:18
@github-actions github-actions bot added service/s3 Issues and PRs that pertain to the s3 service. and removed service/s3 Issues and PRs that pertain to the s3 service. labels Feb 7, 2022
@YakDriver YakDriver merged commit 4bff770 into main Feb 7, 2022
@YakDriver YakDriver deleted the td-empty-valid-everything-else branch February 7, 2022 16:54
github-actions bot pushed a commit that referenced this pull request Feb 7, 2022
@github-actions
Copy link

This functionality has been released in v4.0.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. Thank you!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. documentation Introduces or discusses updates to documentation. linter Pertains to changes to or issues with the various linters. service/efs Issues and PRs that pertain to the efs service. service/elasticsearch Issues and PRs that pertain to the elasticsearch service. service/events Issues and PRs that pertain to the events service. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove Zero Values From Attribute Validations
2 participants