YAML creates nested objects instead of string representations
See original GitHub issueESDomain.AdvancedOptions parsed to object.
Description
The update/deployment of an “AWS::Elasticsearch::Domain” using 1.13.x
For bug reports:
The AdvancedOptions are broken and invalid for cloudformation:
Serverless Error ---------------------------------------
An error occurred while provisioning your stack: ESDomain
- Value of property AdvancedOptions must be an object
with String (or simple type) properties.
The cloudFormation definition should provide the following options:
"AdvancedOptions": {
"rest.action.multi.allow_explicit_index": "true",
"indices.fielddata.cache.size": ""
}
Here are the AWS::Elasticsearch::Domain defintions
resources:
Resources:
ESDomain:
Type: AWS::Elasticsearch::Domain
Properties:
AccessPolicies: 'xxx'
DomainName: xxxx
ElasticsearchVersion: "5.1"
ElasticsearchClusterConfig:
InstanceType: t2.medium.elasticsearch
InstanceCount: 1
EBSOptions:
EBSEnabled: true
VolumeType: standard
VolumeSize: 10
AdvancedOptions:
rest.action.multi.allow_explicit_index: "true"
indices.fielddata.cache.size: ""
Here is the cloudformation-template-update-stack.json (ES.Domain AdvancedOptions part) which is invalid for cloud-formation.
"AdvancedOptions": {
"rest.action.multi.allow_explicit_index": "true",
"indices.fielddata.cache.size": "",
"rest": {
"action": {
"multi": {
"allow_explicit_index": "true"
}
}
},
"indices": {
"fielddata": {
"cache": {
"size": ""
}
}
}
}
Additional Data
- Serverless Framework Version: 1.13.x
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:15 (11 by maintainers)
Top Results From Across the Web
How to nest objects and arrays in a YAML file? - Stack Overflow
I currently have this JS array that I want to turn into a YAML file. I tried looking things up and ...
Read more >YAML Tutorial: Everything You Need to Get Started in Minutes
YAML's simple nesting gives us the power to build sophisticated objects. But that's only the beginning.
Read more >TypeDefinition for a nested collection, and how to ignore most ...
Given a document containing just the "developers" entry, I can write a constructor that parses it into objects of appropriate types. If composer...
Read more >YAML Ain't Markup Language (YAML™) revision 1.2.2
Therefore, this specification defines two concepts: a class of data objects called YAML representations and a syntax for presenting YAML ...
Read more >Tips, Tricks, Troubleshooting - yq - GitBook
Create bash array. Given a yaml file like. coolActions: - create ... There are a couple of tricks to getting the right string...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Also blocks us from upgrading to 1.13. The quoted YAML identifiers must not be parsed into objects.
@alex20465 @pmuens There is a difference in YAML between double and single quotes. Double quotes need escaping in the quoted text, while single quotes do not.
Could you try to put the dotted keys into single quotes like this?
'rest.action.multi.allow_explicit_index': 'true'
BTW: I wonder why you also quoted the boolean value - does it have to be a string?