-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add input constraints to AWS::OpsWorksCM::Server resource #16
Add input constraints to AWS::OpsWorksCM::Server resource #16
Conversation
"pattern": "arn:aws:iam::[0-9]{12}:role/.*", | ||
"maxLength": 10000 | ||
}, | ||
"DisableAutomatedBackup": { | ||
"type": "boolean" | ||
}, | ||
"BackupId": { | ||
"type": "string" | ||
"type": "string", | ||
"pattern": "[a-zA-Z][a-zA-Z0-9\\-\\.\\:]*", | ||
"maxLength": 79 | ||
}, | ||
"EngineModel": { | ||
"type": "string" | ||
"type": "string", | ||
"maxLength": 10000 | ||
}, | ||
"PreferredMaintenanceWindow": { | ||
"type": "string" | ||
"type": "string", | ||
"pattern": "^((Mon|Tue|Wed|Thu|Fri|Sat|Sun):)?([0-1][0-9]|2[0-3]):[0-5][0-9]$", | ||
"maxLength": 10000 | ||
}, | ||
"AssociatePublicIpAddress": { | ||
"type": "boolean" | ||
}, | ||
"InstanceProfileArn": { | ||
"type": "string" | ||
"type": "string", | ||
"pattern": "arn:aws:iam::[0-9]{12}:instance-profile/.*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would un-hardcode the commercial AWS partition in these ARN patterns in order to more easily support the other AWS partitions OpsWorks will hopefully support in the future:
https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arns-syntax
https://docs.aws.amazon.com/sdk-for-go/api/aws/endpoints/#pkg-constants
https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/
"BackupRetentionCount": { | ||
"type": "integer" | ||
"type": "integer", | ||
"minLength": 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the integer
range constraint be minimum
instead of minLength
?
https://json-schema.org/understanding-json-schema/reference/numeric.html#range
aws-cloudformation/aws-cloudformation-resource-providers-kinesisfirehose#16 (comment)
aws-cloudformation/cloudformation-cli#414
…nt instead of minLength (#33) aws-cloudformation/cloudformation-cli#414 https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-opsworkscm-server.html#cfn-opsworkscm-server-backupretentioncount #16 (comment) https://json-schema.org/understanding-json-schema/reference/numeric.html#range
Description of changes:
Every input parameter has regex and length restrictions for AWS::OpsWorksCM::Server resource
Testing