Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tlinhart/pulumi-aws-python
Sample Pulumi program for deploying dockerized app to AWS EC2
https://github.com/tlinhart/pulumi-aws-python
Last synced: 18 days ago
JSON representation
Sample Pulumi program for deploying dockerized app to AWS EC2
- Host: GitHub
- URL: https://github.com/tlinhart/pulumi-aws-python
- Owner: tlinhart
- License: mit
- Created: 2020-12-18T15:48:49.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-03-26T05:47:14.000Z (10 months ago)
- Last Synced: 2024-03-26T06:45:59.215Z (10 months ago)
- Language: Python
- Size: 4.88 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
Build and push Docker image
---------------------------.. code-block:: bash
echo | docker login ghcr.io -u tlinhart --password-stdin
docker build -t ghcr.io/tlinhart/pulumi-aws-python .
docker push ghcr.io/tlinhart/pulumi-aws-python:latestCreate Pulumi project and stack
-------------------------------.. code-block:: bash
export AWS_PROFILE=pasmen
pulumi login --cloud-url s3://pulumi.linhart.tech
pulumi new aws-python --dir infraProvide these values:
- *project name*: pulumi-aws-python
- *project description*: Sample AWS Python Pulumi program
- *stack name*: pulumi-aws-python-prod
- *passphrase*:
- *aws:region*: eu-central-1.. code-block:: bash
export PULUMI_CONFIG_PASSPHRASE=
cd infra
pulumi config set aws:profile pasmen
pulumi config set ghcr-token --secretManage the stack
----------------- ``pulumi up`` - Create or update the resources in a stack
- ``pulumi stack output []`` - Show a stack's output properties
- ``pulumi destroy`` - Destroy an existing stack and its resources
- ``pulumi stack rm []`` - Remove a stack and its configurationAccess the web server
---------------------.. code-block:: bash
curl $(pulumi stack output public_ip):5000
Resources
---------- https://www.pulumi.com/docs/get-started/aws/
- https://github.com/pulumi/examples/tree/master/aws-py-webserver
- https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html#user-data-shell-scripts
- https://stackoverflow.com/a/9766919/5832540