Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Add connection validation #43

Closed

Conversation

hypnoglow
Copy link
Contributor

@hypnoglow hypnoglow commented Aug 26, 2018

for now, this is for demonstration and discussion. see related issue

Ref: #42

@alexkappa
Copy link
Owner

Hi @hypnoglow, sorry for the late reply. Thanks for taking a stab at this! I will take a look and share my feedback very soon.

Copy link
Owner

@alexkappa alexkappa left a comment

Choose a reason for hiding this comment

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

@hypnoglow could you also add a test using these fields?

auth0/resource_auth0_connection.go Outdated Show resolved Hide resolved
auth0/resource_auth0_connection.go Outdated Show resolved Hide resolved
@alexkappa
Copy link
Owner

@hypnoglow ping!

@hypnoglow hypnoglow force-pushed the add-connection-validation branch 2 times, most recently from b44b386 to 69b5cd0 Compare October 14, 2018 20:17
@hypnoglow
Copy link
Contributor Author

Hi @alexkappa, sorry for the delay.

Added the test, but I don't get why it fails with * auth0_connection.my_connection_with_validation: 400 Bad Request: Payload validation error: 'Invalid value "{params[0]}"' on property options.passwordPolicy (Password strength level)..

@alexkappa
Copy link
Owner

Not sure exactly what's the issue, this is an error from the auth0 api. I would recommend adding some log.Printf()'s to print your payloads (i.e. Connection) and running TF_LOG=1 terraform apply.

You can see the provider logs prefixed with plugin.terraform-provider-auth0.

We also support debugging info directly by the go-auth0 library with the AUTH0_DEBUG=1 flag but I haven't tested this myself.

@alexkappa
Copy link
Owner

Any luck with this @hypnoglow ? I can also give it a go if you don't mind.

The TF_LOG=DEBUG AUTH0_DEBUG=1 terraform apply will print out the requests/responses so it might help with the error (its an error from the auth0 management api). Its not the most descriptive error message, perhaps we could give them this feedback as I've come across the same and its difficult to debug.

@hypnoglow hypnoglow force-pushed the add-connection-validation branch 2 times, most recently from d7a5768 to 4aa2e48 Compare December 5, 2018 16:27
@hypnoglow hypnoglow changed the title WIP add connection validation Add connection validation Dec 5, 2018
@hypnoglow
Copy link
Contributor Author

That problem gone, it seems it was not introduced by this PR though.

Also, I replaced buildConnectionValidation with your new List(MapData(m), .... Not sure how to replace readConnectionValidation, haven't found any similar logic in readConnection function.

@github-actions
Copy link

This PR has become stale as it has been open 30 days with no activity.
Stale PRs will be closed after 5 days if no action is taken. If you
think this PR should not be closed, remove the stale label.

@github-actions github-actions bot added the stale label Dec 13, 2019
@github-actions github-actions bot closed this Dec 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants