-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: enable release verification take 2 (#5053)
This enables release verification for AWS. Tested by manually executing the `Verify-Release` workflow using this branch. Run can be seen here https://github.com/pulumi/pulumi-aws/actions/runs/12691069824 closes pulumi/ci-mgmt#1265
- Loading branch information
Showing
8 changed files
with
164 additions
and
11 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
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
name: bucket | ||
runtime: nodejs | ||
description: A simple example of using the `Bucket` APIs. |
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,3 @@ | ||
# examples/release-verification | ||
|
||
An example that can be used in the release verification workflow |
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,71 @@ | ||
// Copyright 2016-2018, Pulumi Corporation. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
import * as pulumi from "@pulumi/pulumi"; | ||
// Import the nested module directly to regression test: | ||
// https://github.com/pulumi/pulumi-aws/issues/772 | ||
import { Bucket } from "@pulumi/aws/s3"; | ||
import * as aws from "@pulumi/aws"; | ||
import * as s3 from "@aws-sdk/client-s3"; | ||
|
||
const bucket = new Bucket("testbucket", { | ||
serverSideEncryptionConfiguration: { | ||
rule: { | ||
applyServerSideEncryptionByDefault: { | ||
sseAlgorithm: "AES256", | ||
}, | ||
}, | ||
}, | ||
forceDestroy: true, | ||
}); | ||
|
||
bucket.onObjectCreated("bucket-callback", async (event) => { | ||
const s3Client = new s3.S3Client({}); | ||
const recordFile = "lastPutFile.json"; | ||
const records = event.Records || []; | ||
for (const record of records) { | ||
const key = record.s3.object.key; | ||
|
||
if (key !== recordFile) { | ||
// Construct an event arguments object. | ||
const args = { | ||
key: record.s3.object.key, | ||
size: record.s3.object.size, | ||
eventTime: record.eventTime, | ||
}; | ||
const res = await s3Client.send(new s3.PutObjectCommand({ | ||
Bucket: bucket.id.get(), | ||
Key: recordFile, | ||
Body: JSON.stringify(args), | ||
})); | ||
} | ||
} | ||
}); | ||
|
||
// Another bucket with some strongly-typed routingRules. | ||
const websiteBucket = new aws.s3.Bucket("websiteBucket", { | ||
website: { | ||
indexDocument: "index.html", | ||
routingRules: [{ | ||
Condition: { | ||
KeyPrefixEquals: "docs/", | ||
}, | ||
Redirect: { | ||
ReplaceKeyPrefixWith: "documents/", | ||
} | ||
}] | ||
} | ||
}); | ||
|
||
export const bucketName = bucket.id; |
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,16 @@ | ||
{ | ||
"name": "bucket", | ||
"version": "0.0.1", | ||
"license": "Apache-2.0", | ||
"scripts": { | ||
"build": "tsc" | ||
}, | ||
"dependencies": { | ||
"@aws-sdk/client-s3": "^3.362.0", | ||
"@pulumi/aws": "^6.0.0", | ||
"@pulumi/pulumi": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^8.0.0" | ||
} | ||
} |
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,18 @@ | ||
{ | ||
"compilerOptions": { | ||
"strict": true, | ||
"outDir": "bin", | ||
"target": "es2016", | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"sourceMap": true, | ||
"experimentalDecorators": true, | ||
"pretty": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"noImplicitReturns": true, | ||
"forceConsistentCasingInFileNames": true | ||
}, | ||
"files": [ | ||
"index.ts" | ||
] | ||
} |
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,3 +1,6 @@ | ||
name: webserver-py | ||
runtime: python | ||
runtime: | ||
name: python | ||
options: | ||
virtualenv: venv | ||
description: Basic example of an AWS web server accessible over HTTP (in Python!) |