diff --git a/.github/workflows/license.yml b/.github/workflows/license.yml index 6ff84ab6..4ec4747f 100644 --- a/.github/workflows/license.yml +++ b/.github/workflows/license.yml @@ -67,6 +67,7 @@ jobs: github.com/cloudflare/circl, github.com/golang, github.com/gorhill/cronexpr, + github.com/in-toto/in-toto-golang, github.com/jmespath/go-jmespath, github.com/keybase/go-crypto, github.com/klauspost/compress, diff --git a/.github/workflows/run-acceptance-tests.yml b/.github/workflows/run-acceptance-tests.yml index a4b70f8d..dd934e51 100644 --- a/.github/workflows/run-acceptance-tests.yml +++ b/.github/workflows/run-acceptance-tests.yml @@ -407,10 +407,6 @@ jobs: name: run-acceptance-tests on: pull_request: - branches: - - master - - v* - - feature* paths-ignore: - CHANGELOG.md repository_dispatch: diff --git a/.github/workflows/upgrade-bridge.yml b/.github/workflows/upgrade-bridge.yml index dc395c56..2bef8e93 100644 --- a/.github/workflows/upgrade-bridge.yml +++ b/.github/workflows/upgrade-bridge.yml @@ -67,7 +67,7 @@ jobs: if: github.event_name == 'repository_dispatch' uses: pulumi/pulumi-upgrade-provider-action@v0.0.11 with: - kind: ${{ inputs.kind }} + kind: ${{ github.event.client_payload.kind || 'bridge' }} email: bot@pulumi.com username: pulumi-bot automerge: ${{ github.event.client_payload.automerge }} diff --git a/examples/virtualappliance/index.ts b/examples/virtualappliance/index.ts index 70c682d4..4139edc9 100644 --- a/examples/virtualappliance/index.ts +++ b/examples/virtualappliance/index.ts @@ -3,42 +3,42 @@ import * as f5bigip from "@pulumi/f5bigip"; import * as virtualappliance from "./virtualappliance"; import * as backendinstances from "./loadbalancedinstances"; import * as https from "https"; -import fetch from "node-fetch"; +import * as fetch from "node-fetch"; -function sleep(ms: number) : Promise { - return new Promise(resolve => setTimeout(resolve, ms)); +function sleep(ms: number): Promise { + return new Promise((resolve) => setTimeout(resolve, ms)); } // Wait for the virtual appliance to be avaiabe to log in to. -const virtualapplicanceAddress = pulumi.all([virtualappliance.f5Address, virtualappliance.f5Password]) - .apply(async ([address,password]) => { - let ready = false; - const agent = new https.Agent({ - rejectUnauthorized: false - }); - const token = Buffer.from(`admin:${password}`).toString("base64"); - while (!ready) { - try { - const res = await fetch(`${address}/mgmt/tm/ltm`, { - agent, - headers: { - Authorization: `Basic ${token}`, - }, - }); - if (res.status == 200) { - console.log("bigip virtual appliance is ready") - ready = true; - } - - } catch (err) { - console.log(`caught exception: ${err}`) +const virtualapplicanceAddress = pulumi + .all([virtualappliance.f5Address, virtualappliance.f5Password]) + .apply(async ([address, password]) => { + let ready = false; + const agent = new https.Agent({ + rejectUnauthorized: false, + }); + const token = Buffer.from(`admin:${password}`).toString("base64"); + while (!ready) { + try { + const res = await fetch(`${address}/mgmt/tm/ltm`, { + agent, + headers: { + Authorization: `Basic ${token}`, + }, + }); + if (res.status == 200) { + console.log("bigip virtual appliance is ready"); + ready = true; + } + } catch (err) { + console.log(`caught exception: ${err}`); + } + // Keep trying + console.log("waiting for bigip virtual appliance address to be ready"); + sleep(10000); } - // Keep trying - console.log("waiting for bigip virtual appliance address to be ready") - sleep(10000); - } - return address; -}); + return address; + }); const f5bigipProvider = new f5bigip.Provider("bigipProvider", { address: virtualapplicanceAddress, @@ -46,42 +46,60 @@ const f5bigipProvider = new f5bigip.Provider("bigipProvider", { username: "admin", }); -const monitor = new f5bigip.ltm.Monitor("backend", { - name: "/Common/backend", - parent: "/Common/http", - send: "GET /\r\n", - timeout: 5, - interval: 10, -}, { provider: f5bigipProvider }); +const monitor = new f5bigip.ltm.Monitor( + "backend", + { + name: "/Common/backend", + parent: "/Common/http", + send: "GET /\r\n", + timeout: 5, + interval: 10, + }, + { provider: f5bigipProvider }, +); -const pool = new f5bigip.ltm.Pool("backend", { - name: "/Common/backend", - monitors: [monitor.name], - allowNat: "yes", - allowSnat: "yes", -}, { provider: f5bigipProvider }); +const pool = new f5bigip.ltm.Pool( + "backend", + { + name: "/Common/backend", + monitors: [monitor.name], + allowNat: "yes", + allowSnat: "yes", + }, + { provider: f5bigipProvider }, +); backendinstances.instancePublicIps.map((backendAddress, i) => { + const node = new f5bigip.ltm.Node( + `backend-${i}`, + { + name: `/Common/node-${i}`, + address: backendAddress.apply((x) => x.toString()), + }, + { provider: f5bigipProvider }, + ); - const node = new f5bigip.ltm.Node(`backend-${i}`, { - name: `/Common/node-${i}`, - address: backendAddress.apply(x=>x.toString()), - }, { provider: f5bigipProvider }) - - const applicationPoolAttachment = new f5bigip.ltm.PoolAttachment(`backend-${i}`, { - pool: pool.name, - node: node.name.apply( x => x + ":80"), - }, { provider: f5bigipProvider }); - + new f5bigip.ltm.PoolAttachment( + `backend-${i}`, + { + pool: pool.name, + node: node.name.apply((x: string) => x + ":80"), + }, + { provider: f5bigipProvider }, + ); }); -const virtualServer = new f5bigip.ltm.VirtualServer("backend", { - pool: pool.name, - name: "/Common/backend", - destination: virtualappliance.f5PrivateIp, - port: 80, - sourceAddressTranslation: "automap", -}, { provider: f5bigipProvider, dependsOn: [pool] }); +new f5bigip.ltm.VirtualServer( + "backend", + { + pool: pool.name, + name: "/Common/backend", + destination: virtualappliance.f5PrivateIp, + port: 80, + sourceAddressTranslation: "automap", + }, + { provider: f5bigipProvider, dependsOn: [pool] }, +); export let instanceIp = virtualappliance.f5Address; export let password = virtualappliance.f5Password; diff --git a/examples/virtualappliance/loadbalancedinstances.ts b/examples/virtualappliance/loadbalancedinstances.ts index e2ca3647..d7d7fe35 100644 --- a/examples/virtualappliance/loadbalancedinstances.ts +++ b/examples/virtualappliance/loadbalancedinstances.ts @@ -5,7 +5,7 @@ const baseTags = { project: `${pulumi.getProject()}-${pulumi.getStack()}`, }; -const ubuntuAmiId = aws.getAmi({ +const ubuntuAmiId = aws.ec2.getAmi({ mostRecent: true, nameRegex: "ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-*", owners: ["099720109477"], diff --git a/examples/virtualappliance/package.json b/examples/virtualappliance/package.json index 306a38f0..0c6c601c 100644 --- a/examples/virtualappliance/package.json +++ b/examples/virtualappliance/package.json @@ -1,13 +1,13 @@ { "name": "virtualappliance", "devDependencies": { - "@types/node": "latest" + "@types/node": "^20.11.0", + "@types/node-fetch": "2.6.11" }, "dependencies": { - "@pulumi/aws": "^4.0.0-alpha.0", - "@pulumi/pulumi": "^3.0.0-alpha.0", - "@pulumi/random": "^4.0.0-alpha.0", - "@types/node-fetch": "^2.1.4", - "node-fetch": "^2.3.0" + "@pulumi/aws": "^6.0.0", + "@pulumi/pulumi": "^3.0.0", + "@pulumi/random": "^4.0.0", + "node-fetch": "2.6.11" } } diff --git a/examples/virtualappliance/virtualappliance.ts b/examples/virtualappliance/virtualappliance.ts index 564a5dfe..309bf16c 100644 --- a/examples/virtualappliance/virtualappliance.ts +++ b/examples/virtualappliance/virtualappliance.ts @@ -37,7 +37,7 @@ const firewall = new aws.ec2.SecurityGroup("bigIp", { * If the subscription is missing, the test will fail with a helpful error message and a * link to subscribe. */ -const bigIpAmiId = aws.getAmi({ +const bigIpAmiId = aws.ec2.getAmi({ mostRecent: true, owners: ["679593333241"], filters: [