I can create an elastic instance using console using the options mentioned below:
Network configuration: Public access
Fine Grained access control - enabled
Create Master user: selected
Master Username: root
Master Password: PassWord152)
Domain access policy: Allow open access
Here is an example:
How do I create a cloudformation template with these parameters?
Update:
@Marcin forgot to add this line in "Properties" section -
DomainName: !Ref DomainName
Elasticsearch created a new random name that contradicted with this line...
"Resource": "arn:aws:es:${AWS::Region}:${AWS::AccountId}:domain/${DomainName}/*"
And I got the AccessDenied error. After adding "DomainName" parameter, it worked.