From ac7714871bd6114c251732869b4dc7d08be78a37 Mon Sep 17 00:00:00 2001 From: "pulumi-renovate[bot]" <189166143+pulumi-renovate[bot]@users.noreply.github.com> Date: Fri, 27 Dec 2024 21:56:13 +0000 Subject: [PATCH 1/3] Update first-party Pulumi dependencies --- examples/bucket/package.json | 2 +- examples/cloudwatch/package.json | 2 +- examples/dedicated-hosts/package.json | 4 ++-- examples/delete_before_create/mount_target/step1/package.json | 2 +- examples/ecr/package.json | 2 +- examples/eventbus/package.json | 2 +- examples/ignoreChanges/package.json | 2 +- examples/kms-alias/package.json | 2 +- examples/lambda-container-image/package.json | 4 ++-- examples/lambda-import-ts/package.json | 2 +- examples/lambda-layer-new/package.json | 2 +- examples/lambda-layer-old/package.json | 2 +- examples/logGroup/package.json | 2 +- examples/minimal/package.json | 2 +- examples/multiple-regions/package.json | 2 +- examples/queue/package.json | 2 +- examples/regress-1423/package.json | 2 +- examples/regression/package.json | 2 +- examples/role-inline-policy-auto-name/package.json | 2 +- examples/route53/package.json | 2 +- examples/secretcapture/package.json | 2 +- examples/serverless-raw/package.json | 2 +- examples/serverless/package.json | 2 +- examples/serverless_functions/package.json | 2 +- examples/sqs-fifo-queue/ts/package.json | 2 +- examples/ssmparameter/package.json | 2 +- examples/stream/package.json | 2 +- examples/switchrole/create-user-and-role/package.json | 2 +- examples/switchrole/use-role/package.json | 2 +- examples/table/package.json | 2 +- examples/test-programs/job-queue/package.json | 2 +- examples/topic/package.json | 2 +- examples/wafv2/package.json | 2 +- examples/webserver-comp/package.json | 2 +- examples/webserver/package.json | 2 +- examples/webserver/variants/get/package.json | 2 +- examples/webserver/variants/ssh/package.json | 2 +- examples/webserver/variants/ssh_description/package.json | 2 +- examples/webserver/variants/zones/package.json | 2 +- 39 files changed, 41 insertions(+), 41 deletions(-) diff --git a/examples/bucket/package.json b/examples/bucket/package.json index 955a5a8cc99..e84c79b66cf 100644 --- a/examples/bucket/package.json +++ b/examples/bucket/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@aws-sdk/client-s3": "^3.362.0", - "@pulumi/aws": "^5.0.0", + "@pulumi/aws": "^6.0.0", "@pulumi/pulumi": "^3.0.0" }, "devDependencies": { diff --git a/examples/cloudwatch/package.json b/examples/cloudwatch/package.json index ed914265488..42d78db7bb6 100644 --- a/examples/cloudwatch/package.json +++ b/examples/cloudwatch/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/dedicated-hosts/package.json b/examples/dedicated-hosts/package.json index c8c3a49c7ac..c818c7a0636 100644 --- a/examples/dedicated-hosts/package.json +++ b/examples/dedicated-hosts/package.json @@ -5,7 +5,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0", - "@pulumi/awsx": "^0.22.0" + "@pulumi/aws": "^6.0.0", + "@pulumi/awsx": "^2.0.0" } } diff --git a/examples/delete_before_create/mount_target/step1/package.json b/examples/delete_before_create/mount_target/step1/package.json index efd5daa5606..82aa07eafd7 100644 --- a/examples/delete_before_create/mount_target/step1/package.json +++ b/examples/delete_before_create/mount_target/step1/package.json @@ -6,7 +6,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/ecr/package.json b/examples/ecr/package.json index d54c4f5effc..35f59c24fd2 100644 --- a/examples/ecr/package.json +++ b/examples/ecr/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/eventbus/package.json b/examples/eventbus/package.json index 34a30550a5d..31ac47ef56d 100644 --- a/examples/eventbus/package.json +++ b/examples/eventbus/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/ignoreChanges/package.json b/examples/ignoreChanges/package.json index 2d22ffec5c5..215b1e68d31 100644 --- a/examples/ignoreChanges/package.json +++ b/examples/ignoreChanges/package.json @@ -4,7 +4,7 @@ "license": "Apache-2.0", "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/kms-alias/package.json b/examples/kms-alias/package.json index 87131cba313..b73f250bd29 100644 --- a/examples/kms-alias/package.json +++ b/examples/kms-alias/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/lambda-container-image/package.json b/examples/lambda-container-image/package.json index 8acdf701cb7..59a3f391df3 100644 --- a/examples/lambda-container-image/package.json +++ b/examples/lambda-container-image/package.json @@ -7,8 +7,8 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0", - "@pulumi/awsx": "^0.22.0" + "@pulumi/aws": "^6.0.0", + "@pulumi/awsx": "^2.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/lambda-import-ts/package.json b/examples/lambda-import-ts/package.json index 43363d71fb3..078f7bacc47 100644 --- a/examples/lambda-import-ts/package.json +++ b/examples/lambda-import-ts/package.json @@ -6,7 +6,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "5.28.0", + "@pulumi/aws": "6.66.1", "@pulumi/awsx": "^2.0.2", "@pulumi/archive": "^0.0.4" } diff --git a/examples/lambda-layer-new/package.json b/examples/lambda-layer-new/package.json index dd9c4115ebb..5343dc0069e 100644 --- a/examples/lambda-layer-new/package.json +++ b/examples/lambda-layer-new/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/lambda-layer-old/package.json b/examples/lambda-layer-old/package.json index a569f26b2e0..8cd89daaafc 100644 --- a/examples/lambda-layer-old/package.json +++ b/examples/lambda-layer-old/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/logGroup/package.json b/examples/logGroup/package.json index 32d30897b8f..764b7660f5a 100644 --- a/examples/logGroup/package.json +++ b/examples/logGroup/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/minimal/package.json b/examples/minimal/package.json index 929155f1385..2d388dad8aa 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/multiple-regions/package.json b/examples/multiple-regions/package.json index 1cc71dc4eb1..cc54dc4c2da 100644 --- a/examples/multiple-regions/package.json +++ b/examples/multiple-regions/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/queue/package.json b/examples/queue/package.json index 0fbd292cb68..237bc89d95e 100644 --- a/examples/queue/package.json +++ b/examples/queue/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/regress-1423/package.json b/examples/regress-1423/package.json index 4ba8967a924..354072f393c 100644 --- a/examples/regress-1423/package.json +++ b/examples/regress-1423/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/aws-sdk": "^2.7.0", diff --git a/examples/regression/package.json b/examples/regression/package.json index a0a9da033e8..73968eb3981 100644 --- a/examples/regression/package.json +++ b/examples/regression/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/role-inline-policy-auto-name/package.json b/examples/role-inline-policy-auto-name/package.json index 955a5a8cc99..e84c79b66cf 100644 --- a/examples/role-inline-policy-auto-name/package.json +++ b/examples/role-inline-policy-auto-name/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@aws-sdk/client-s3": "^3.362.0", - "@pulumi/aws": "^5.0.0", + "@pulumi/aws": "^6.0.0", "@pulumi/pulumi": "^3.0.0" }, "devDependencies": { diff --git a/examples/route53/package.json b/examples/route53/package.json index ed914265488..42d78db7bb6 100644 --- a/examples/route53/package.json +++ b/examples/route53/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/secretcapture/package.json b/examples/secretcapture/package.json index bbd8402e8f3..2467720fc9c 100644 --- a/examples/secretcapture/package.json +++ b/examples/secretcapture/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/serverless-raw/package.json b/examples/serverless-raw/package.json index 1915bb972ef..150c3146dd1 100644 --- a/examples/serverless-raw/package.json +++ b/examples/serverless-raw/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/serverless/package.json b/examples/serverless/package.json index 49bb7da98f6..44e7ba843f9 100644 --- a/examples/serverless/package.json +++ b/examples/serverless/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/serverless_functions/package.json b/examples/serverless_functions/package.json index c83f1674a9f..0fad9c36e32 100644 --- a/examples/serverless_functions/package.json +++ b/examples/serverless_functions/package.json @@ -10,7 +10,7 @@ "@slack/client": "4.3.1", "aws-sdk": "^2.252.1", "express": "^4.16.3", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/express": "^4.16.0", diff --git a/examples/sqs-fifo-queue/ts/package.json b/examples/sqs-fifo-queue/ts/package.json index 71cd71a72a6..af40c0b7ad1 100644 --- a/examples/sqs-fifo-queue/ts/package.json +++ b/examples/sqs-fifo-queue/ts/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/ssmparameter/package.json b/examples/ssmparameter/package.json index 8e37a4fda3e..6440cdc1cf5 100644 --- a/examples/ssmparameter/package.json +++ b/examples/ssmparameter/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/stream/package.json b/examples/stream/package.json index 82e48c961f5..a7aea61e9ec 100644 --- a/examples/stream/package.json +++ b/examples/stream/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/switchrole/create-user-and-role/package.json b/examples/switchrole/create-user-and-role/package.json index 37a11c00b5e..9b1fbd596f2 100644 --- a/examples/switchrole/create-user-and-role/package.json +++ b/examples/switchrole/create-user-and-role/package.json @@ -4,7 +4,7 @@ "@types/node": "^8.0.0" }, "dependencies": { - "@pulumi/aws": "^5.0.0", + "@pulumi/aws": "^6.0.0", "@pulumi/pulumi": "^3.0.0" } } diff --git a/examples/switchrole/use-role/package.json b/examples/switchrole/use-role/package.json index 37a11c00b5e..9b1fbd596f2 100644 --- a/examples/switchrole/use-role/package.json +++ b/examples/switchrole/use-role/package.json @@ -4,7 +4,7 @@ "@types/node": "^8.0.0" }, "dependencies": { - "@pulumi/aws": "^5.0.0", + "@pulumi/aws": "^6.0.0", "@pulumi/pulumi": "^3.0.0" } } diff --git a/examples/table/package.json b/examples/table/package.json index 14525bfa04f..c6b5fc92462 100644 --- a/examples/table/package.json +++ b/examples/table/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/test-programs/job-queue/package.json b/examples/test-programs/job-queue/package.json index e64929f6774..d1678ba7b10 100644 --- a/examples/test-programs/job-queue/package.json +++ b/examples/test-programs/job-queue/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/topic/package.json b/examples/topic/package.json index 76545372dc4..e338c5a5add 100644 --- a/examples/topic/package.json +++ b/examples/topic/package.json @@ -8,7 +8,7 @@ "dependencies": { "@pulumi/pulumi": "^3.0.0", "node-fetch": "^2.2.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0", diff --git a/examples/wafv2/package.json b/examples/wafv2/package.json index 703c3c9f2a5..b4eb4e0ec22 100644 --- a/examples/wafv2/package.json +++ b/examples/wafv2/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/aws-sdk": "^2.7.0", diff --git a/examples/webserver-comp/package.json b/examples/webserver-comp/package.json index 1cc71dc4eb1..cc54dc4c2da 100644 --- a/examples/webserver-comp/package.json +++ b/examples/webserver-comp/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/webserver/package.json b/examples/webserver/package.json index a067833a4f7..16981cdddab 100644 --- a/examples/webserver/package.json +++ b/examples/webserver/package.json @@ -6,7 +6,7 @@ "build": "tsc" }, "dependencies": { - "@pulumi/aws": "^5.13.0", + "@pulumi/aws": "^6.0.0", "@pulumi/pulumi": "^3.0.0" }, "devDependencies": { diff --git a/examples/webserver/variants/get/package.json b/examples/webserver/variants/get/package.json index bf839777aca..0a741dd875b 100644 --- a/examples/webserver/variants/get/package.json +++ b/examples/webserver/variants/get/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/webserver/variants/ssh/package.json b/examples/webserver/variants/ssh/package.json index bf839777aca..0a741dd875b 100644 --- a/examples/webserver/variants/ssh/package.json +++ b/examples/webserver/variants/ssh/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/webserver/variants/ssh_description/package.json b/examples/webserver/variants/ssh_description/package.json index bf839777aca..0a741dd875b 100644 --- a/examples/webserver/variants/ssh_description/package.json +++ b/examples/webserver/variants/ssh_description/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" diff --git a/examples/webserver/variants/zones/package.json b/examples/webserver/variants/zones/package.json index bf839777aca..0a741dd875b 100644 --- a/examples/webserver/variants/zones/package.json +++ b/examples/webserver/variants/zones/package.json @@ -7,7 +7,7 @@ }, "dependencies": { "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" + "@pulumi/aws": "^6.0.0" }, "devDependencies": { "@types/node": "^8.0.0" From 1cf615a696725f44c6b9ff1da1b7efeb426ba3e2 Mon Sep 17 00:00:00 2001 From: Anton Tayanovskyy Date: Mon, 30 Dec 2024 15:11:57 -0500 Subject: [PATCH 2/3] Explicitly use AWS SDK v3 in examples/queue --- examples/queue/index.ts | 6 +++--- examples/queue/package.json | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/examples/queue/index.ts b/examples/queue/index.ts index f616bc29e91..2d1c36388f6 100644 --- a/examples/queue/index.ts +++ b/examples/queue/index.ts @@ -14,6 +14,7 @@ import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws"; +import { S3 } from "@aws-sdk/client-s3"; const config = new pulumi.Config("aws"); const providerOpts = { provider: new aws.Provider("prov", { region: config.require("envRegion") }) }; @@ -35,8 +36,7 @@ const queue = new aws.sqs.Queue("queue", { queue.onEvent("subscription", async (event) => { console.log("Received: " + JSON.stringify(event, null, 2)); - const awssdk = await import("aws-sdk"); - const s3 = new awssdk.S3(); + const s3 = new S3(); const recordFile = "lastEvent.json"; @@ -45,7 +45,7 @@ queue.onEvent("subscription", async (event) => { Bucket: bucket.id.get(), Key: recordFile, Body: JSON.stringify(event), - }).promise(); + }); console.log("Stored sqs message to S3."); }, { batchSize: 1 }); diff --git a/examples/queue/package.json b/examples/queue/package.json index 237bc89d95e..6e55bb32c6a 100644 --- a/examples/queue/package.json +++ b/examples/queue/package.json @@ -6,8 +6,9 @@ "build": "tsc" }, "dependencies": { - "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^6.0.0" + "@aws-sdk/client-s3": "^3.717.0", + "@pulumi/aws": "^6.0.0", + "@pulumi/pulumi": "^3.0.0" }, "devDependencies": { "@types/node": "^8.0.0" From 67f7508def4e57e66becace308a70a713713091a Mon Sep 17 00:00:00 2001 From: Anton Tayanovskyy Date: Mon, 30 Dec 2024 15:28:59 -0500 Subject: [PATCH 3/3] Update examples/lambda-container-image/index.ts to AWSX 2.0 --- examples/examples_nodejs_test.go | 3 +-- examples/lambda-container-image/index.ts | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/examples/examples_nodejs_test.go b/examples/examples_nodejs_test.go index fddb5420765..a97d28880cd 100644 --- a/examples/examples_nodejs_test.go +++ b/examples/examples_nodejs_test.go @@ -379,8 +379,7 @@ func TestAccLambdaLayer(t *testing.T) { func TestAccLambdaContainerImages(t *testing.T) { test := getJSBaseOptions(t). With(integration.ProgramTestOptions{ - RunUpdateTest: false, // new feature! - Dir: filepath.Join(getCwd(t), "lambda-container-image"), + Dir: filepath.Join(getCwd(t), "lambda-container-image"), }) skipRefresh(&test) integration.ProgramTest(t, &test) diff --git a/examples/lambda-container-image/index.ts b/examples/lambda-container-image/index.ts index 1369d090ed9..fe46c45547f 100644 --- a/examples/lambda-container-image/index.ts +++ b/examples/lambda-container-image/index.ts @@ -1,4 +1,4 @@ -// Copyright 2016-2017, Pulumi Corporation. All rights reserved. +// Copyright 2016-2024, Pulumi Corporation. All rights reserved. import * as aws from "@pulumi/aws"; import * as awsx from "@pulumi/awsx"; @@ -11,9 +11,10 @@ const repository = new aws.ecr.Repository("repository", { forceDelete: true, }, providerOpts); -const image = awsx.ecr.buildAndPushImage("basic-container", { +const image = new awsx.ecr.Image("basic-container", { + repositoryUrl: repository.repositoryUrl, context: "./app", -}, { repository }, providerOpts); +}, providerOpts); const role = new aws.iam.Role("demo-role", { assumeRolePolicy: aws.iam.assumeRolePolicyForPrincipal({ @@ -25,6 +26,7 @@ const lambdaFullAccessCopyAttachment = new aws.iam.RolePolicyAttachment("lambdaF role: role, policyArn: aws.iam.ManagedPolicy.AWSLambdaExecute, }, providerOpts) + const ecsFullAccess = new aws.iam.RolePolicyAttachment("ecsFullAccess", { role: role.name, policyArn: aws.iam.ManagedPolicy.AmazonECSFullAccess, @@ -32,8 +34,12 @@ const ecsFullAccess = new aws.iam.RolePolicyAttachment("ecsFullAccess", { const func = new aws.lambda.Function("demo-func", { role: role.arn, - imageUri: image.imageValue, + imageUri: image.imageUri, packageType: "Image" -}, providerOpts); +}, { + provider: providerOpts.provider, + dependsOn: [ecsFullAccess, lambdaFullAccessCopyAttachment] +}); -export const imageUri = image.imageValue; +export const imageUri = image.imageUri; +export const funcARN = func.arn;