Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dilanka-rathnasiri/launch-ec2
Pulumi infrastructure as code for launch ec2
https://github.com/dilanka-rathnasiri/launch-ec2
ec2 infrastructure-as-code pulumi typescript
Last synced: 26 days ago
JSON representation
Pulumi infrastructure as code for launch ec2
- Host: GitHub
- URL: https://github.com/dilanka-rathnasiri/launch-ec2
- Owner: dilanka-rathnasiri
- License: mit
- Created: 2024-06-01T17:41:22.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-08-09T06:27:33.000Z (6 months ago)
- Last Synced: 2024-08-09T07:39:59.878Z (6 months ago)
- Topics: ec2, infrastructure-as-code, pulumi, typescript
- Language: TypeScript
- Homepage:
- Size: 52.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# launch-ec2
Pulumi infrastructure as code for launch ec2### Launch an ec2
1. create a configs.yaml file with required values in the repository root
2. execute `pulumi login --local` in terminal
3. execute `pulumi install` in terminal
4. execute `export PULUMI_CONFIG_PASSPHRASE=` in terminal
5. execute `export AWS_REGION=` in terminal
6. execute `pulumi stack init ` in terminal
7. execute `pulumi preview --json` in terminal (optional)
8. execute `pulumi up --yes` in terminal### Destroy created ec2 instance
1. execute `export PULUMI_CONFIG_PASSPHRASE=` in terminal
2. execute `export AWS_REGION=` in terminal
3. execute `pulumi destroy --yes` in terminal### Configs.yaml file format
```yaml
AMI_NAME: # wildcard can be used
INSTANCE_NAME:
INSTANCE_TYPE:
SUBNET_ID:
SG_ID:
IAM_INSTANCE_PROFILE:
TAGS:
```### Example configs.yaml file
```yaml
AMI_NAME: "ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-*"
INSTANCE_NAME: "test-instance"
INSTANCE_TYPE: "t3.nano"
SUBNET_ID: "subnet-xxxxxxxxxxx"
SG_ID: "sg-xxxxxxxxxxx"
IAM_INSTANCE_PROFILE: "test-iam-profile"
TAGS:
Name: "test-instance"
Type: "public"
Version: "v1.0.0"
```