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

server_name should be a required parameter for dms_endpoint #10963

Closed
ghost opened this issue Nov 21, 2019 · 2 comments
Closed

server_name should be a required parameter for dms_endpoint #10963

ghost opened this issue Nov 21, 2019 · 2 comments
Assignees

Comments

@ghost
Copy link

ghost commented Nov 21, 2019

This issue was originally opened by @themrmax as hashicorp/terraform#23442. It was migrated here as a result of the provider split. The original body of the issue is below.


Terraform Version

Terraform v0.12.13                                                                                                                      │  File "<ipython-input-2-6502e8fc9f2e>", line 1
+ provider.aws v2.36.0                                                                                                                  │    brew install libomp
+ provider.vault v2.6.0 

Terraform Configuration Files

resource "aws_dms_endpoint" "source" {
  endpoint_id                 = "test"
  endpoint_type               = "source"
  engine_name                 = "mysql"
  extra_connection_attributes = ""
  password                    = "secret"
  port                        = 3306
  ssl_mode                    = "none"

  username = "root"
}

Debug Output

Crash Output

Error: Error creating DMS endpoint: InvalidParameterValueException: The parameter serverName must be provided and must not be blank.
        status code: 400, request id: 74120879-162e-46bc-8820-af6a5ba17767

  on dms.tf line 2, in resource "aws_dms_endpoint" "source":
   2: resource "aws_dms_endpoint" "source" {

Expected Behavior

Should have raised an exception on terraform plan

Actual Behavior

made an invalid request against aws api

Steps to Reproduce

terraform apply

Additional Context

References

@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Nov 21, 2019
@ryndaniels ryndaniels self-assigned this Nov 22, 2019
@ryndaniels
Copy link
Contributor

Hi @themrmax - thanks for taking the time to open this! Looking into this, I am seeing that the DMS endpoint API allows many parameters to technically be optional. This is because the endpoint can be created with a number of different engine_names, each of which have different parameters that are required for that database engine type. So while the mysql engine like you are using here does require a server_name parameter, other endpoint types (such as dynamodb, for example) do not, so it doesn't make sense to make that parameter required for the DMS endpoint resource as a whole. Hope this helps clear things up, and if you have further questions, feel free to check out the AWS provider forums 🙂

@ghost
Copy link
Author

ghost commented Mar 29, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 29, 2020
@breathingdust breathingdust removed the needs-triage Waiting for first response or review from a maintainer. label Sep 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants