Closed l0n3star closed 2 months ago
Please also verify the case when the private endpoint service is enabled and private endpoints are added. If we then delete the private endpoint service, the private endpoints will still be in the state file. How will Terraform plan and apply behave after that?
Please also add the process for how customers can use the Terraform provider to first enable the private endpoint service, then create the command, and then what customers need to do in their VPC. After that, explain how they can accept the endpoint.
like in the form of step1, step2...
Please also verify the case when the private endpoint service is enabled and private endpoints are added. If we then delete the private endpoint service, the private endpoints will still be in the state file. How will Terraform plan and apply behave after that?
plan and apply fail:
Error: Error reading private endpoint status
│
│ with couchbase-capella_private_endpoints.accept_endpoint,
│ on config.tf line 21, in resource "couchbase-capella_private_endpoints" "accept_endpoint":
│ 21: resource "couchbase-capella_private_endpoints" "accept_endpoint" {
│
│ Error reading private endpoint status, unexpected error: {"code":400,"hint":"Please review your request and ensure that all required parameters are correctly
│ provided.","httpStatusCode":400,"message":"Private endpoints aren't enabled for this cluster. Please select another cluster."}
╵
this is expected.
terraform will call Read which in turn will execute LIST endpoint. but it is invalid to execute LIST when private endpoint service is disabled on the cluster.
thus this is user error. the user must delete private endpoint service and all private endpoints at the same time.
Please also add the process for how customers can use the Terraform provider to first enable the private endpoint service, then create the command, and then what customers need to do in their VPC. After that, explain how they can accept the endpoint.
like in the form of step1, step2...
That's what getting_started
folder is for.
According to Go guidelines, it is recommended to write GoDoc comments for all exported functions.
So, can you please check where it is missing and add it.
Please also verify the case when the private endpoint service is enabled and private endpoints are added. If we then delete the private endpoint service, the private endpoints will still be in the state file. How will Terraform plan and apply behave after that?
plan and apply fail:
Error: Error reading private endpoint status │ │ with couchbase-capella_private_endpoints.accept_endpoint, │ on config.tf line 21, in resource "couchbase-capella_private_endpoints" "accept_endpoint": │ 21: resource "couchbase-capella_private_endpoints" "accept_endpoint" { │ │ Error reading private endpoint status, unexpected error: {"code":400,"hint":"Please review your request and ensure that all required parameters are correctly │ provided.","httpStatusCode":400,"message":"Private endpoints aren't enabled for this cluster. Please select another cluster."} ╵
this is expected.
terraform will call Read which in turn will execute LIST endpoint. but it is invalid to execute LIST when private endpoint service is disabled on the cluster.
thus this is user error. the user must delete private endpoint service and all private endpoints at the same time.
Yes, I think we should recommend this to customers so they can avoid this issue, otherwise it will come to us as CBSE, and then we have to give the same explanation
Please also add the process for how customers can use the Terraform provider to first enable the private endpoint service, then create the command, and then what customers need to do in their VPC. After that, explain how they can accept the endpoint. like in the form of step1, step2...
That's what
getting_started
folder is for.
Actually, the getting started guide talks about each resource or datasource individually.
I am thinking in this way like:- First, the customer has to enable the private endpoint service, then generate the private endpoint command, and then accept the private endpoint.
So, there should be a way for the customer to know which resource or data source should be utilized in combination to enable the private endpoint service and add the private endpoint, if the customer hasn't used the UI beforehand.
Please also verify the case when the private endpoint service is enabled and private endpoints are added. If we then delete the private endpoint service, the private endpoints will still be in the state file. How will Terraform plan and apply behave after that?
plan and apply fail:
Error: Error reading private endpoint status │ │ with couchbase-capella_private_endpoints.accept_endpoint, │ on config.tf line 21, in resource "couchbase-capella_private_endpoints" "accept_endpoint": │ 21: resource "couchbase-capella_private_endpoints" "accept_endpoint" { │ │ Error reading private endpoint status, unexpected error: {"code":400,"hint":"Please review your request and ensure that all required parameters are correctly │ provided.","httpStatusCode":400,"message":"Private endpoints aren't enabled for this cluster. Please select another cluster."} ╵
this is expected. terraform will call Read which in turn will execute LIST endpoint. but it is invalid to execute LIST when private endpoint service is disabled on the cluster. thus this is user error. the user must delete private endpoint service and all private endpoints at the same time.
Yes, I think we should recommend this to customers so they can avoid this issue, otherwise it will come to us as CBSE, and then we have to give the same explanation
The error tells the user what the issue is. If user needs more help, then we are happy to help on CBSE.
Please also add the process for how customers can use the Terraform provider to first enable the private endpoint service, then create the command, and then what customers need to do in their VPC. After that, explain how they can accept the endpoint. like in the form of step1, step2...
That's what
getting_started
folder is for.Actually, the getting started guide talks about each resource or datasource individually.
I am thinking in this way like:- First, the customer has to enable the private endpoint service, then generate the private endpoint command, and then accept the private endpoint.
So, there should be a way for the customer to know which resource or data source should be utilized in combination to enable the private endpoint service and add the private endpoint, if the customer hasn't used the UI beforehand.
This is something we should discuss on a team meeting, not a PR. This affects many features.
According to Go guidelines, it is recommended to write GoDoc comments for all exported functions.
So, can you please check where it is missing and add it.
Good shout, thanks. Addressed in c2fca196e6012bc7d90d6fecf6bfb07e5d93ec4a.
Jira
Description
New feature to support private endpoints with terraform.
Type of Change
Manual Testing Approach
How was this change tested and do you have evidence? (REQUIRED: Select at least 1)
Testing
Testing enable/disable private endpoint service
// data read
// enable private endpoint service
// update not allowed
// disable private endpoint service
// import state
Test accept/reject private endpoint
// accept private endpoint
// reject private endpoint
// import private endpoint
Test get private endpoint CLI command for specific CSP
// get aws private endpoint command
// get azure private endpoint command
Required Checklist:
Further comments