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

Resource-Specific Schema Attribute Validation Functions #16434

Closed
bflad opened this issue Nov 25, 2020 · 2 comments
Closed

Resource-Specific Schema Attribute Validation Functions #16434

bflad opened this issue Nov 25, 2020 · 2 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. proposal Proposes new design or functionality. provider Pertains to the provider itself, rather than any interaction with AWS. stale Old or inactive issues managed by automation, if no further action taken these will get closed.

Comments

@bflad
Copy link
Contributor

bflad commented Nov 25, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

NOTE: This issue needs more design consideration before implementation.

Currently the codebase has a generic ARN validation helper, validateArn, which is commonly applied in many places. However, we could offer more specific ARN validation, such as ensuring specific service and resource type are applied in attributes accepting ARNs. More broadly, there are other places where this may be very helpful, such as common resource identifiers like EC2 Security Group, Subnet, and VPC IDs.

For example, the Image Builder API includes the more specific ARN patterns in the API model, which were included in the initial Terraform AWS Provider resource implementations.

Initial considerations:

  • Each Terraform AWS Provider resource has a common pattern for providing the regular expression patterns, other resources can reference the pattern to create a validation function
  • Each Terraform AWS Provider resource has a common pattern for providing the regular expression patterns along with the associated attribute, other resources can reference the resource and attribute to create a validation function
  • Each Terraform AWS Provider resource has a common pattern for providing the regular expression patterns and validation function along with the associated attribute, other resources can reference that resource and attribute for the validation function

Probably much more to think about, but jotting this down to start. 😄

References

@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. proposal Proposes new design or functionality. provider Pertains to the provider itself, rather than any interaction with AWS. labels Nov 25, 2020
@bflad bflad changed the title Consider Resource-Specific Schema Attribute Validation Functions Resource-Specific Schema Attribute Validation Functions Nov 25, 2020
@github-actions
Copy link

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

@github-actions github-actions bot added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Nov 15, 2022
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 16, 2022
@github-actions
Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. proposal Proposes new design or functionality. provider Pertains to the provider itself, rather than any interaction with AWS. stale Old or inactive issues managed by automation, if no further action taken these will get closed.
Projects
None yet
Development

No branches or pull requests

1 participant