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

[datadog_provider] Add resource wrapper and support adding enum values to docs #1922

Merged
merged 10 commits into from
May 23, 2023

Conversation

skarimo
Copy link
Member

@skarimo skarimo commented May 18, 2023

No description provided.

}
description = fmt.Sprintf("%s Valid values are %s.", description, validValuesMsg)
break
}
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
}
}
if validators.Index(i).Elem().Type().Name() == "atLeastValidator" {
atLeast := validators.Index(i).Elem().FieldByName("min")
if atLeast.IsValid() {
description = fmt.Sprintf("%s Value must be at least %d.", description, atLeast.Int())
break
}
}

thoughts on adding more validators to this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea, I will work on this in a separate pr. I would need to cross check what type of validation are included in the documentation for resources written using terraform-plugin-sdk and implement the same ones for framework.

@skarimo skarimo marked this pull request as ready for review May 22, 2023 17:08
@skarimo skarimo requested a review from a team as a code owner May 22, 2023 17:08
@skarimo skarimo changed the title Add resource wrapper and support adding enum values to docs [datadog_provider] Add resource wrapper and support adding enum values to docs May 22, 2023
nkzou
nkzou previously approved these changes May 22, 2023
datadog/fwprovider/framework_provider.go Outdated Show resolved Hide resolved
Co-authored-by: Kevin Zou <17015060+nkzou@users.noreply.github.com>
@skarimo skarimo merged commit 1bb9808 into master May 23, 2023
8 checks passed
@skarimo skarimo deleted the sherz/r-wrapper branch May 23, 2023 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants