Skip to content

Commit

Permalink
Combine JSON + YAML example (#1561)
Browse files Browse the repository at this point in the history
  • Loading branch information
PatMyron authored and markpeek committed Jan 17, 2020
1 parent 5668540 commit c873ed2
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions README.rst
Expand Up @@ -81,22 +81,7 @@ A simple example to create an instance would look like this:
}
}
}
A simple example to create an instance (YAML) would look like this:

.. code:: python
>>> from troposphere import Ref, Template
>>> import troposphere.ec2 as ec2
>>> t = Template()
>>> instance = ec2.Instance("myinstance")
>>> instance.ImageId = "ami-951945d0"
>>> instance.InstanceType = "t1.micro"
>>> t.add_resource(instance)
<troposphere.ec2.Instance object at 0x101bf3390>
>>> print(t.to_yaml())
Resources:
myinstance:
Properties:
Expand Down

0 comments on commit c873ed2

Please sign in to comment.