aws-cloudformation / aws-cloudformation/cloudformation-resource-schema
What is the expected format of `readOnlyProperties`?
- Dominant language
- Java
- Stars
- 96
- Forks
- 38
- PR merge metrics
- No merged PRs in 30d
Description
What is the expected format of `readOnlyProperties`? There are several examples in the current schemas, shown below. Since this format is an extension of JSON Schema, I'd have expected `readOnlyProperties` to match `required`, i.e. just having property names. Instead it has something which looks like a JSON Pointer, but in most cases isn't actually a valid reference.
Are all of the properties listed here supposed to be now accessible with `Fn::GetAtt`? The last word on this was in 2019 (#59): "supposed to be, but not quite working yet".
#### Prefixed with `/properties/`, nested with `/`
The `/properties/` prefix implies that this is a JSON Pointer, but these aren't actually valid references, since the nested property isn't a child of the schema at that location.
E.g. `AWS::RDS::DBInstance`:
```json
"readOnlyProperties": [
"/properties/Endpoint/Address",
"/properties/Endpoint/Port",
"/properties/Endpoint/HostedZoneId",
"/properties/DbiResourceId",
"/properties/DBInstanceArn",
"/properties/DBSystemId",
"/properties/MasterUserSecret/SecretArn",
"/properties/CertificateDetails/CAIdentifier",
"/properties/CertificateDetails/ValidTill"
],
```
#### Prefixed with `/properties/`, nested with `/`, contains `*` wildcards
Also not a valid reference. E.g. `AWS::WAFv2::RuleGroup`:
```json
"readOnlyProperties": [
"/properties/Arn",
"/properties/Id",
"/properties/LabelNamespace",
"/properties/AvailableLabels/*/Name",
"/properties/ConsumedLabels/*/Name"
],
```
#### Prefixed with `/properties/`, nested with `.`
Also not a valid reference. E.g. `AWS::ElastiCache::CacheCluster`:
```json
"readOnlyProperties": [
"/properties/ConfigurationEndpoint.Address",
"/properties/Id",
"/properties/ConfigurationEndpoint.Port",
"/properties/RedisEndpoint.Port",
"/properties/RedisEndpoint.Address"
],
```
#### Prefixed with `/Properties/` (uppercase `P`)
I assume this is a mistake. Only example is `AWS::DMS::ReplicationConfig`:
```json
"readOnlyProperties": ["/Properties/ReplicationConfigArn"],
```
Contributor guide
Research direction
Review the current resource schemas and the prior discussion in issue #59, focusing on the readOnlyProperties examples and their relationship to Fn::GetAtt. Done means the expected path format and the intended Fn::GetAtt behavior are decided and clearly documented, including whether the differing examples are valid.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, json
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100