This repository has been archived by the owner on Jul 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a9869d8
commit e1949b1
Showing
11 changed files
with
131 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
.../content/learn/creating-pulumi-programs/define-and-provision/code/typescript/baseline.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import * as aws from "@pulumi/aws"; | ||
import * as pulumi from "@pulumi/pulumi"; | ||
|
||
// [Step 1: Create an EC2 instance.] | ||
|
||
// [Step 2: Create a security group.] |
6 changes: 6 additions & 0 deletions
6
...ontent/learn/creating-pulumi-programs/define-and-provision/code/typescript/create-ec2.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import * as aws from "@pulumi/aws"; | ||
import * as pulumi from "@pulumi/pulumi"; | ||
|
||
// [Step 1: Create an EC2 instance.] | ||
|
||
// [Step 2: Create a security group.] |
6 changes: 6 additions & 0 deletions
6
...content/learn/creating-pulumi-programs/define-and-provision/code/typescript/create-sg.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import * as aws from "@pulumi/aws"; | ||
import * as pulumi from "@pulumi/pulumi"; | ||
|
||
// [Step 1: Create an EC2 instance.] | ||
|
||
// [Step 2: Create a security group.] |
6 changes: 6 additions & 0 deletions
6
.../learn/creating-pulumi-programs/define-and-provision/code/typescript/updated-baseline.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import * as aws from "@pulumi/aws"; | ||
import * as pulumi from "@pulumi/pulumi"; | ||
|
||
// [Step 1: Create an EC2 instance.] | ||
|
||
// [Step 2: Create a security group.] |
7 changes: 7 additions & 0 deletions
7
...fault/content/learn/creating-pulumi-programs/define-and-provision/code/yaml/baseline.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: nginx-server | ||
runtime: yaml | ||
description: A program to create an Nginx server on AWS | ||
resources: | ||
# [Step 1: Create an EC2 instance.] | ||
|
||
# [Step 2: Create a security group.] |
23 changes: 23 additions & 0 deletions
23
...ult/content/learn/creating-pulumi-programs/define-and-provision/code/yaml/create-ec2.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: nginx-server | ||
runtime: yaml | ||
description: A program to create an Nginx server on AWS | ||
|
||
resources: | ||
# [Step 1: Create an EC2 instance.] | ||
webserver-www: | ||
type: aws:ec2:Instance | ||
properties: | ||
instanceType: t2.micro | ||
ami: "ami-09538990a0c4fe9be" | ||
userData: | | ||
#!/bin/bash | ||
sudo yum update -y | ||
sudo yum upgrade -y | ||
sudo amazon-linux-extras install nginx1 -y | ||
sudo systemctl enable nginx | ||
sudo systemctl start nginx | ||
# [Step 2: Create a security group.] | ||
|
||
outputs: | ||
publicIp: ${webserver-www.publicIp} |
35 changes: 35 additions & 0 deletions
35
...ault/content/learn/creating-pulumi-programs/define-and-provision/code/yaml/create-sg.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: nginx-server | ||
runtime: yaml | ||
description: A program to create an Nginx server on AWS | ||
|
||
resources: | ||
# [Step 2: Create a security group.] | ||
webserver-secgrp: | ||
type: aws:ec2:SecurityGroup | ||
properties: | ||
description: Enable HTTP access | ||
ingress: | ||
- protocol: tcp | ||
fromPort: 80 | ||
toPort: 80 | ||
cidrBlocks: | ||
- 0.0.0.0/0 | ||
|
||
# [Step 1: Create an EC2 instance.] | ||
webserver-www: | ||
type: aws:ec2:Instance | ||
properties: | ||
instanceType: t2.micro | ||
ami: "ami-09538990a0c4fe9be" | ||
userData: | | ||
#!/bin/bash | ||
sudo yum update -y | ||
sudo yum upgrade -y | ||
sudo amazon-linux-extras install nginx1 -y | ||
sudo systemctl enable nginx | ||
sudo systemctl start nginx | ||
vpcSecurityGroupIds: | ||
- ${webserver-secgrp.id} | ||
|
||
outputs: | ||
publicIp: ${webserver-www.publicIp} |
25 changes: 25 additions & 0 deletions
25
...ntent/learn/creating-pulumi-programs/define-and-provision/code/yaml/updated-baseline.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: nginx-server | ||
runtime: yaml | ||
description: A program to create an Nginx server on AWS | ||
|
||
resources: | ||
# [Step 2: Create a security group.] | ||
webserver-secgrp: | ||
#TO-DO | ||
|
||
# [Step 1: Create an EC2 instance.] | ||
webserver-www: | ||
type: aws:ec2:Instance | ||
properties: | ||
instanceType: t2.micro | ||
ami: "ami-09538990a0c4fe9be" | ||
userData: | | ||
#!/bin/bash | ||
sudo yum update -y | ||
sudo yum upgrade -y | ||
sudo amazon-linux-extras install nginx1 -y | ||
sudo systemctl enable nginx | ||
sudo systemctl start nginx | ||
outputs: | ||
publicIp: ${webserver-www.publicIp} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
|
||
{{ (.Page.Resources.GetMatch (.Get 0)).Content | htmlUnescape | safeHTML }} |