-
Notifications
You must be signed in to change notification settings - Fork 38
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
Adding conditionalCreateOnlyProperties to metaschema #121
Adding conditionalCreateOnlyProperties to metaschema #121
Conversation
@@ -387,6 +387,10 @@ | |||
"description": "A list of JSON pointers to properties (typically sensitive) that are able to be specified by the customer but unable to be returned in a Read request", | |||
"$ref": "#/definitions/jsonPointerArray" | |||
}, | |||
"conditionallyCreateOnlyProperties": { | |||
"description": "A list of JSON pointers to properties that are only able to cause replacement during the Update request.", |
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.
think only
might be misleading. Also, do you think it's worth adding an example?
"description": "A list of JSON pointers to properties that are only able to cause replacement during the Update request.", | |
"description": "A list of JSON pointers to properties that may or may not cause replacement during the Update request. For example, a version property might be upgradable in-place but downgrading may require resource replacement", |
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.
You think we should have a specific example like version?
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.
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.
I would even give a specific example, like that for EBS volumes you can increase the size
property, but decreasing it would require replacement https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/modify-volume-requirements.html#elastic-volumes-limitations
That being said, I would not even mention replacement, or if so mention that specifically as a cloudformation specific thing. Cloud API will never replace your resource, it would just fail with NotUpdatable
exception. I would say something like:
A list of JSON pointers for properties that can only be updated under certain conditions. For example, you can increase the size of an EBS volume but you cannot decrease it. When updating this property for a resource in a CloudFormation stack, the resource will be replaced if it cannot be updated.
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.
One consideration about specific examples is that they may change in the future. EBS might remove the restriction on decreasing size
in-place eventually
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.
true, I'm fine with the generic example you had above, but again be careful about using "replacement"
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.
how about using rds? db downgrade is unlikely to change over time:
A list of JSON pointers for properties that can only be updated under certain conditions. For example, you can upgrade the engine version of a RDS DBInstance but you cannot downgrade it. When updating this property for a resource in a CloudFormation stack, the resource will be replaced if it cannot be updated.
Could I suggest these be called |
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.
Looks good pending the change to the description
I at first thought to call it |
My main point is that it seems unusually phrased, and thus easy to forget/get confused. But in my mind, it's a create-only property, that isn't always triggered, as opposed to be only sometimes create-only. |
Thanks for making the change! I saw the merge notification, but not the new commit. When I talked with TAM about the new feature, I called it |
* generate_docs() for conditionalCreateOnlyProperties #367 (comment) aws-cloudformation/cloudformation-resource-schema#121 https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt * test coverage
* generate_docs() for conditionalCreateOnlyProperties aws-cloudformation/cloudformation-cli#367 (comment) aws-cloudformation/cloudformation-resource-schema#121 https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt * test coverage
Issue #, if available: #30
Description of changes:
Adding
conditionallyCreateOnlyProperties
to meta schema, so that resource providers could model properties that could not deterministically predict replacement/inline updateBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.