Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(pulumi-bot) Synced file(s) with pulumi/pulumi-yaml #1176

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
websiteConfiguration = {
indexDocument = "index.html"
}
publicAccessBlockConfiguration = {
blockPublicAcls = false
}
ownershipControls = {
rules = [{
objectOwnership = "ObjectWriter"
}]
}
}

resource indexHtml "aws:s3/bucketObject:BucketObject" {
Expand All @@ -11,6 +19,10 @@
source = fileAsset("./www/index.html")
acl = "public-read"
contentType = "text/html"

options {
version = "5.16.2"
}
}

resource faviconPng "aws:s3/bucketObject:BucketObject" {
Expand All @@ -19,12 +31,18 @@
source = fileAsset("./www/favicon.png")
acl = "public-read"
contentType = "image/png"

options {
version = "5.16.2"
}
}

resource bucketPolicy "aws:s3/bucketPolicy:BucketPolicy" {
__logicalName = "bucketPolicy"
bucket = siteBucket.id
policy = "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Effect\": \"Allow\",\n \"Principal\": \"*\",\n \"Action\": [\"s3:GetObject\"],\n \"Resource\": [\"${siteBucket.arn}/*\"]\n }\n ]\n}\n"
resource defaultProvider "pulumi:providers:aws" {
__logicalName = "defaultProvider"

options {
version = "5.16.2"
}
}

output bucketName {
Expand All @@ -34,5 +52,5 @@

output websiteUrl {
__logicalName = "websiteUrl"
value = siteBucket.websiteURL
value = siteBucket.websiteUrl
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
resource cluster "aws:ecs/cluster:Cluster" {
__logicalName = "cluster"

options {
version = "5.16.2"
}
}

resource lb "awsx:lb:ApplicationLoadBalancer" {
__logicalName = "lb"

options {
version = "1.0.0-beta.5"
}
}

resource nginx "awsx:ecs:FargateService" {
Expand All @@ -20,6 +28,10 @@
}]
}
}

options {
version = "1.0.0-beta.5"
}
}

output url {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@
__logicalName = "project"
value = project()
}

output organization0 {
__logicalName = "organization"
value = organization()
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
resource webServer "aws:ec2/instance:Instance" {
__logicalName = "WebServer"
instanceType = instanceType
ami = invoke("aws:index/getAmi:getAmi", {
ami = invoke("aws:ec2/getAmi:getAmi", {
filters = [{
name = "name",
values = ["amzn-ami-hvm-*-x86_64-ebs"]
values = ["amzn2-ami-hvm-2.0.20231218.0-x86_64-ebs"]
}],
owners = ["137112412989"],
mostRecent = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
default = "t3.micro"
}

ec2Ami = invoke("aws:index/getAmi:getAmi", {
ec2Ami = invoke("aws:ec2/getAmi:getAmi", {
filters = [{
name = "name",
values = ["amzn-ami-hvm-*-x86_64-ebs"]
values = ["amzn2-ami-hvm-2.0.20231218.0-x86_64-ebs"]
}],
owners = ["137112412989"],
mostRecent = true
Expand All @@ -20,6 +20,10 @@
toPort = 80,
cidrBlocks = ["0.0.0.0/0"]
}]

options {
version = "5.16.2"
}
}

resource webServer "aws:ec2/instance:Instance" {
Expand All @@ -28,18 +32,34 @@
ami = ec2Ami
userData = "#!/bin/bash\necho 'Hello, World from ${webSecGrp.arn}!' > index.html\nnohup python -m SimpleHTTPServer 80 &"
vpcSecurityGroupIds = [webSecGrp.id]

options {
version = "5.16.2"
}
}

resource defaultProvider "pulumi:providers:aws" {
__logicalName = "DefaultProvider"

options {
version = "5.16.2"
}
}

resource usEast2Provider "pulumi:providers:aws" {
__logicalName = "UsEast2Provider"
region = "us-east-2"

options {
version = "5.16.2"
}
}

resource myBucket "aws:s3/bucket:Bucket" {
__logicalName = "MyBucket"

options {
provider = usEast2Provider
version = "5.16.2"
}
}

Expand Down
Loading