Both mongodbatlas_privatelink_endpoint_service and mongodbatlas_privatelink_endpoint have a error_message computed attribute (present in GET response), however no error message is being created to make users aware of the error when it is present. This PR adds the necessary logic to inform the user when an error is present.
Within the mongodbatlas_privatelink_endpoint_service, a testcase, TestAccNetworkRSPrivateLinkEndpointServiceAWS_Failed, has been added to verify error is now received.
This test passes an invalid vcpe id to a mongodbatlas_privatelink_endpoint_service resource. Creation will succeed but GET requests will fail with Interface endpoint <invalid_vcpe_id> was not found
A testcase within mongodbatlas_privatelink_endpoint was not found and, hence, no test has been added.
[ ] Bug fix (non-breaking change which fixes an issue). Please, add the "bug" label to the PR.
[ ] New feature (non-breaking change which adds functionality). Please, add the "enhancement" label to the PR. A migration guide must be created or updated if the new feature will go in a major version.
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected). Please, add the "breaking change" label to the PR. A migration guide must be created or updated.
[ ] I have checked that this change does not generate any credentials and that they are NOT accidentally logged anywhere.
[x] I have added tests that prove my fix is effective or that my feature works per HashiCorp requirements
[ ] I have added any necessary documentation (if appropriate)
[x] I have run make fmt and formatted my code
[ ] If changes include deprecations or removals I have added appropriate changelog entries.
[ ] If changes include removal or addition of 3rd party GitHub actions, I updated our internal document. Reach out to the APIx Integration slack channel to get access to the internal document.
Description
Both mongodbatlas_privatelink_endpoint_service and mongodbatlas_privatelink_endpoint have a error_message computed attribute (present in GET response), however no error message is being created to make users aware of the error when it is present. This PR adds the necessary logic to inform the user when an error is present.
Within the
mongodbatlas_privatelink_endpoint_service
, a testcase,TestAccNetworkRSPrivateLinkEndpointServiceAWS_Failed
, has been added to verify error is now received. This test passes an invalid vcpe id to amongodbatlas_privatelink_endpoint_service
resource. Creation will succeed but GET requests will fail withInterface endpoint <invalid_vcpe_id> was not found
A testcase within
mongodbatlas_privatelink_endpoint
was not found and, hence, no test has been added.Link to any related issue(s): CLOUDP-282564
Type of change:
Required Checklist:
Further comments