Skip to content

Commit 9f1539a

Browse files
authored
1 parent e161f33 commit 9f1539a

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

src/rpdk/core/project.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,11 @@ def _set_docs_properties( # noqa: C901
859859
and proppath_ptr in self.schema["createOnlyProperties"]
860860
):
861861
prop["createonly"] = True
862-
862+
if (
863+
"conditionalCreateOnlyProperties" in self.schema
864+
and proppath_ptr in self.schema["conditionalCreateOnlyProperties"]
865+
):
866+
prop["conditionalCreateOnly"] = True
863867
if (
864868
"readOnlyProperties" in self.schema
865869
and proppath_ptr in self.schema["readOnlyProperties"]

src/rpdk/core/templates/docs-readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ _Pattern_: <code>{{ prop.pattern }}</code>
7676
{% if prop.createonly %}
7777

7878
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)
79+
{% elif prop.conditionalCreateOnly %}
80+
81+
_Update requires_: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)
7982
{% else %}
8083

8184
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

src/rpdk/core/templates/docs-subproperty.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ _Pattern_: <code>{{ prop.pattern }}</code>
7171
{% if prop.createonly %}
7272

7373
_Update requires_: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)
74+
{% elif prop.conditionalCreateOnly %}
75+
76+
_Update requires_: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)
7477
{% else %}
7578

7679
_Update requires_: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

tests/data/schema/valid/valid_type_complex.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,8 @@
7171
"createOnlyProperties": [
7272
"/properties/str2"
7373
],
74+
"conditionalCreateOnlyProperties": [
75+
"/properties/obj1"
76+
],
7477
"additionalProperties": false
7578
}

0 commit comments

Comments
 (0)