Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: allowvalidation to be used withoptions#202

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
dannykopping merged 5 commits intocoder:mainfromdannykopping:dk/monotonic
Mar 22, 2024

Conversation

dannykopping
Copy link
Contributor

Addressescoder/coder#11579, PR in coder/coder will close

Currently we have a conflict declared betweenoption andvalidation configs incoder_parameter Terraform resources (@mtojek do you have some historical context as to why that was the case?).

This PR removes that conflict since there is nothing inherent in the codebase disallowing them, and we need to allow both to to accommodate the use-case mentioned in the linked issue.

I expanded the tests and added documentation for testing the provider locally.

Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
@mtojek
Copy link
Member

Currently we have a conflict declared between option and validation configs in coder_parameter Terraform resources (@mtojek do you have some historical context as to why that was the case?).

Yes, the initial implementation just assumed so. I'm sure the constraint can be relaxed now.

dannykopping reacted with thumbs up emoji

@dannykoppingdannykopping marked this pull request as ready for reviewMarch 22, 2024 10:03
}
}
```
2. Run `terraform init` and observe a warning like `Warning: Provider development overrides are in effect`
Copy link
Member

Choose a reason for hiding this comment

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

Nice trick!

Config: `
data "coder_parameter" "region" {
name = "Region"
type = "number"
Copy link
Member

Choose a reason for hiding this comment

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

nit: formatting?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Oh weird, my editor is probably handling tabs in a strange way. Thanks 👍

}

validation {
monotonic = "increasing"
Copy link
Member

Choose a reason for hiding this comment

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

nit: indent

@@ -424,6 +440,54 @@ data "coder_parameter" "region" {
require.Equal(t, expected, state.Primary.Attributes[key])
}
},
}, {
Name: "NumberValidation_MonotonicWithOptions",
Copy link
Member

Choose a reason for hiding this comment

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

I used to drop an examplehere as well.

dannykopping reacted with thumbs up emoji
Signed-off-by: Danny Kopping <danny@coder.com>
Signed-off-by: Danny Kopping <danny@coder.com>
Copy link
Member

@mtojekmtojek left a comment

Choose a reason for hiding this comment

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

Great!

@dannykoppingdannykopping merged commitec5b604 intocoder:mainMar 22, 2024
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMar 22, 2024
@dannykoppingdannykopping deleted the dk/monotonic branchMarch 22, 2024 13:05
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@mtojekmtojekmtojek approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@dannykopping@mtojek

[8]ページ先頭

©2009-2025 Movatter.jp