From 0cb5acb0213e1afded6a6c6508e3b59d9613311a Mon Sep 17 00:00:00 2001 From: pulumi-bot Date: Wed, 9 Oct 2024 16:48:52 +0000 Subject: [PATCH] (pulumi-bot) Synced local 'pkg/codegen/testing/test/testdata/transpiled_examples' with remote 'pkg/tests/transpiled_examples' --- .../aws-static-website.pp | 28 +++++++++++++++---- .../awsx-fargate-pp/awsx-fargate.pp | 12 ++++++++ .../pulumi-variable-pp/pulumi-variable.pp | 5 ++++ .../webserver-json-pp/webserver-json.pp | 4 +-- .../webserver-pp/webserver.pp | 26 +++++++++++++++-- 5 files changed, 65 insertions(+), 10 deletions(-) diff --git a/pkg/codegen/testing/test/testdata/transpiled_examples/aws-static-website-pp/aws-static-website.pp b/pkg/codegen/testing/test/testdata/transpiled_examples/aws-static-website-pp/aws-static-website.pp index 28da0e7b782..d148019c820 100644 --- a/pkg/codegen/testing/test/testdata/transpiled_examples/aws-static-website-pp/aws-static-website.pp +++ b/pkg/codegen/testing/test/testdata/transpiled_examples/aws-static-website-pp/aws-static-website.pp @@ -3,6 +3,14 @@ websiteConfiguration = { indexDocument = "index.html" } + publicAccessBlockConfiguration = { + blockPublicAcls = false + } + ownershipControls = { + rules = [{ + objectOwnership = "ObjectWriter" + }] + } } resource indexHtml "aws:s3/bucketObject:BucketObject" { @@ -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" { @@ -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 { @@ -34,5 +52,5 @@ output websiteUrl { __logicalName = "websiteUrl" - value = siteBucket.websiteURL + value = siteBucket.websiteUrl } diff --git a/pkg/codegen/testing/test/testdata/transpiled_examples/awsx-fargate-pp/awsx-fargate.pp b/pkg/codegen/testing/test/testdata/transpiled_examples/awsx-fargate-pp/awsx-fargate.pp index cf98c6f9ade..7515e135aa8 100644 --- a/pkg/codegen/testing/test/testdata/transpiled_examples/awsx-fargate-pp/awsx-fargate.pp +++ b/pkg/codegen/testing/test/testdata/transpiled_examples/awsx-fargate-pp/awsx-fargate.pp @@ -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" { @@ -20,6 +28,10 @@ }] } } + + options { + version = "1.0.0-beta.5" + } } output url { diff --git a/pkg/codegen/testing/test/testdata/transpiled_examples/pulumi-variable-pp/pulumi-variable.pp b/pkg/codegen/testing/test/testdata/transpiled_examples/pulumi-variable-pp/pulumi-variable.pp index 46ac1b3d5d5..bb92e50d6aa 100644 --- a/pkg/codegen/testing/test/testdata/transpiled_examples/pulumi-variable-pp/pulumi-variable.pp +++ b/pkg/codegen/testing/test/testdata/transpiled_examples/pulumi-variable-pp/pulumi-variable.pp @@ -12,3 +12,8 @@ __logicalName = "project" value = project() } + +output organization0 { + __logicalName = "organization" + value = organization() +} diff --git a/pkg/codegen/testing/test/testdata/transpiled_examples/webserver-json-pp/webserver-json.pp b/pkg/codegen/testing/test/testdata/transpiled_examples/webserver-json-pp/webserver-json.pp index f7f3259fe5b..d424bd397f5 100644 --- a/pkg/codegen/testing/test/testdata/transpiled_examples/webserver-json-pp/webserver-json.pp +++ b/pkg/codegen/testing/test/testdata/transpiled_examples/webserver-json-pp/webserver-json.pp @@ -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 diff --git a/pkg/codegen/testing/test/testdata/transpiled_examples/webserver-pp/webserver.pp b/pkg/codegen/testing/test/testdata/transpiled_examples/webserver-pp/webserver.pp index f4282ce2d96..68b70dfea95 100644 --- a/pkg/codegen/testing/test/testdata/transpiled_examples/webserver-pp/webserver.pp +++ b/pkg/codegen/testing/test/testdata/transpiled_examples/webserver-pp/webserver.pp @@ -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 @@ -20,6 +20,10 @@ toPort = 80, cidrBlocks = ["0.0.0.0/0"] }] + + options { + version = "5.16.2" + } } resource webServer "aws:ec2/instance:Instance" { @@ -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" } }