Replies: 5 comments
-
|
And JUST for fun (sigh!) The cause? The use of a |
Beta Was this translation helpful? Give feedback.
-
Can you explain an algorithm/data structure for doing this in words or pseudocode? I'm not clear on what "naming conventions" is, is this actually about tagging limitations in various AWS service? |
Beta Was this translation helpful? Give feedback.
-
|
The regex rules are defined as follows (purely examples):
The above may already be handled. I don't know.
It maybe that the tags regex work is probably more easily identified by the nature of the tags. If they are a set of objects, then validate with one set of rules. If it is a key/value object, then validate with that set of rules. It MAY be that not all tags on all resources have the same rules. If that case, the resource_property_regex_rules set will have an entry. It is also NOT just about tags. Different properties have different lengths. Some are 255. Some are 128, 64, or 32. I've been told there is one that is 17. If you are generating/composing content for these values dynamically, then knowing before you've deployed half the things you're doing does feel related of lint/validation. So would this be feasible and maintainable. |
Beta Was this translation helpful? Give feedback.
-
I am not looking for you to try to pseudocode a rule, just explain the business logic. Don't get bogged down in how to implement. Explain the issue and how you'd detect it systematically. Take your stream of consciousness and distill it into a clear root cause analysis for us. Even the title needs clarification—validation rule ≠ "conventions." Is tag validation standard across all services and the rule just implements one pattern for keys and another for values? Or is it per-service? If rules differ by service, have you checked the AWS API models (Smithy) to see if the tag patterns are available in machine readable format? None of the above should involve reading any Go code.
The hearsay/vagaries don't make a good case. We need documentation of either:
Which, respectively, translates to:
Or perhaps a combination of the two if tag keys were standard across all services, whereas tag values had service-specific rules. |
Beta Was this translation helpful? Give feedback.
-
|
I asked ChatGPT to collate some inconsistencies. Observed Inconsistencies in AWS API Validation of Human-Readable Text Fields
SummaryAWS applies service-specific, inconsistent, and often undocumented content validation to human-readable text fields such as names and descriptions. These constraints are not enforced by Terraform Validate or TFLint, causing errors to surface only at apply time. A heuristic, warning-based approach in TFLint’s AWS ruleset could surface many of these issues earlier without introducing provider-level breaking changes. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
WIBNI (It would be nice if) the AWS ruleset could validate the naming conventions of resources as they are seemingly inconsistent.
For example:
I guess
terraform validateshould also pick these up.Whilst I'm NOT a full on go developer, considering this sort of check is hopefully a simple one to template out (a list of resource properties and the regex), it could be easily maintainable?
Beta Was this translation helpful? Give feedback.
All reactions