diff --git a/examples/credentialsConfigTest/Pulumi.yaml b/examples/credentialsConfigTest/Pulumi.yaml deleted file mode 100644 index 879a6d3273e..00000000000 --- a/examples/credentialsConfigTest/Pulumi.yaml +++ /dev/null @@ -1,3 +0,0 @@ -name: bucket -runtime: nodejs -description: A simple example of using the `Bucket` APIs. diff --git a/examples/credentialsConfigTest/index.ts b/examples/credentialsConfigTest/index.ts deleted file mode 100644 index b08ac5fea5b..00000000000 --- a/examples/credentialsConfigTest/index.ts +++ /dev/null @@ -1,72 +0,0 @@ -// 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 * as aws from "@pulumi/aws"; - -const config = new pulumi.Config("aws"); -const providerOpts = { provider: new aws.Provider("prov", { region: config.require("missingRegion") }) }; - -const bucket = new aws.s3.Bucket("testbucket", { - serverSideEncryptionConfiguration: { - rule: { - applyServerSideEncryptionByDefault: { - sseAlgorithm: "AES256", - }, - }, - }, - forceDestroy: true, -}, providerOpts); - -bucket.onObjectCreated("bucket-callback", async (event) => { - const awssdk = await import("aws-sdk"); - const s3 = new awssdk.S3(); - - 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 s3.putObject({ - Bucket: bucket.id.get(), - Key: recordFile, - Body: JSON.stringify(args), - }).promise(); - } - } -}); - -// 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/", - } - }] - } -}, providerOpts); diff --git a/examples/credentialsConfigTest/package.json b/examples/credentialsConfigTest/package.json deleted file mode 100644 index d0cb74f75ca..00000000000 --- a/examples/credentialsConfigTest/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "credentialsConfigTest", - "version": "0.0.1", - "license": "Apache-2.0", - "scripts": { - "build": "tsc" - }, - "dependencies": { - "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^5.0.0" - }, - "devDependencies": { - "@types/node": "^8.0.0" - } -} diff --git a/examples/credentialsConfigTest/tsconfig.json b/examples/credentialsConfigTest/tsconfig.json deleted file mode 100644 index ab65afa6135..00000000000 --- a/examples/credentialsConfigTest/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "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" - ] -} diff --git a/examples/examples_nodejs_test.go b/examples/examples_nodejs_test.go index 96cc8d018f4..e4b26b5f96c 100644 --- a/examples/examples_nodejs_test.go +++ b/examples/examples_nodejs_test.go @@ -37,23 +37,6 @@ func TestAccDedicatedHosts(t *testing.T) { } */ -// This is a specific test to ensure that we are testing for a missing region and erroring -func TestAccCredentialsConfigTest(t *testing.T) { - t.Skip("STACK72: Temp skip until we investigate the cause of https://github.com/pulumi/pulumi-aws/issues/1995") - baseJS := integration.ProgramTestOptions{ - Config: map[string]string{ - "aws:region": "INVALID_REGION", - }, - Dependencies: []string{ - "@pulumi/aws", - }, - Dir: filepath.Join(getCwd(t), "credentialsConfigTest"), - ExpectFailure: true, - } - - integration.ProgramTest(t, &baseJS) -} - func TestAccMinimal(t *testing.T) { test := getJSBaseOptions(t). With(integration.ProgramTestOptions{