From 93be35f6720b2262af99f2ec84336c6efe19ee95 Mon Sep 17 00:00:00 2001 From: Christian Nunciato Date: Tue, 28 Nov 2023 19:57:10 -0800 Subject: [PATCH] Revert #3650 (#3673) * Revert "Update the AWS Guides index page" This reverts commit ee20305203e095dad29c78226ac672cdae0b62f0. * Revert "Rename to programs, clean a few things up" This reverts commit 3d40c4e905632762fe854cf370792a1469682918. * Revert "Add ECS page examples" This reverts commit 245c66eb10d85ce684c2609e3b540d30490491fa. * Revert "Update aws/guides/ecr" This reverts commit cffcc6d85f9177f30025924ccdc252212ec5fe65. --- .github/workflows/scheduled-programs.yml | 77 -- .prettierignore | 1 - Makefile | 3 - scripts/clean.sh | 2 - scripts/test-programs.sh | 63 - .../content/docs/clouds/aws/guides/_index.md | 256 ++--- .../content/docs/clouds/aws/guides/ecr.md | 1010 ++++++++++++++++- .../content/docs/clouds/aws/guides/ecs.md | 839 +++++++++++++- .../shortcodes/example-program-snippet.html | 44 - themes/default/static/programs/.gitignore | 370 ------ .../Program.cs | 121 -- .../Pulumi.yaml | 2 - .../app/Dockerfile | 1 - ...x-ecr-eks-deployment-service-csharp.csproj | 17 - .../Pulumi.yaml | 2 - .../awsx-ecr-eks-deployment-service-go/go.mod | 97 -- .../main.go | 114 -- .../Pulumi.yaml | 2 - .../app/Dockerfile | 1 - .../pom.xml | 107 -- .../src/main/java/myproject/App.java | 103 -- .../Pulumi.yaml | 5 - .../index.js | 81 -- .../package.json | 13 - .../Pulumi.yaml | 5 - .../__main__.py | 87 -- .../app/Dockerfile | 1 - .../requirements.txt | 3 - .../Pulumi.yaml | 2 - .../index.ts | 80 -- .../package.json | 13 - .../tsconfig.json | 18 - .../Pulumi.yaml | 69 -- .../app/Dockerfile | 1 - .../programs/awsx-ecr-image-csharp/Program.cs | 23 - .../awsx-ecr-image-csharp/Pulumi.yaml | 2 - .../awsx-ecr-image-csharp/app/Dockerfile | 1 - .../awsx-ecr-image-csharp.csproj | 15 - .../programs/awsx-ecr-image-go/Pulumi.yaml | 2 - .../programs/awsx-ecr-image-go/app/Dockerfile | 1 - .../static/programs/awsx-ecr-image-go/go.mod | 89 -- .../static/programs/awsx-ecr-image-go/main.go | 29 - .../programs/awsx-ecr-image-java/Pulumi.yaml | 2 - .../awsx-ecr-image-java/app/Dockerfile | 1 - .../programs/awsx-ecr-image-java/pom.xml | 97 -- .../src/main/java/myproject/App.java | 28 - .../awsx-ecr-image-javascript/Pulumi.yaml | 5 - .../awsx-ecr-image-javascript/app/Dockerfile | 1 - .../awsx-ecr-image-javascript/index.js | 15 - .../awsx-ecr-image-javascript/package.json | 9 - .../awsx-ecr-image-python/Pulumi.yaml | 5 - .../awsx-ecr-image-python/__main__.py | 14 - .../awsx-ecr-image-python/app/Dockerfile | 1 - .../awsx-ecr-image-python/requirements.txt | 3 - .../awsx-ecr-image-typescript/Pulumi.yaml | 2 - .../awsx-ecr-image-typescript/app/Dockerfile | 1 - .../awsx-ecr-image-typescript/index.ts | 14 - .../awsx-ecr-image-typescript/package.json | 12 - .../awsx-ecr-image-typescript/tsconfig.json | 18 - .../programs/awsx-ecr-image-yaml/Pulumi.yaml | 18 - .../awsx-ecr-image-yaml/app/Dockerfile | 1 - .../Program.cs | 53 - .../Pulumi.yaml | 2 - ...sx-load-balanced-fargate-ecr-csharp.csproj | 15 - .../Pulumi.yaml | 2 - .../awsx-load-balanced-fargate-ecr-go/go.mod | 95 -- .../awsx-load-balanced-fargate-ecr-go/main.go | 65 -- .../Pulumi.yaml | 2 - .../pom.xml | 97 -- .../src/main/java/myproject/App.java | 58 - .../Pulumi.yaml | 5 - .../index.js | 38 - .../package.json | 12 - .../Pulumi.yaml | 2 - .../__main__.py | 45 - .../requirements.txt | 3 - .../Pulumi.yaml | 2 - .../index.ts | 37 - .../package.json | 12 - .../tsconfig.json | 18 - .../Pulumi.yaml | 40 - .../Program.cs | 40 - .../Pulumi.yaml | 2 - ...-load-balanced-fargate-nginx-csharp.csproj | 15 - .../Pulumi.yaml | 2 - .../go.mod | 95 -- .../main.go | 49 - .../Pulumi.yaml | 2 - .../pom.xml | 97 -- .../src/main/java/myproject/App.java | 45 - .../Pulumi.yaml | 5 - .../index.js | 28 - .../package.json | 12 - .../Pulumi.yaml | 2 - .../__main__.py | 26 - .../requirements.txt | 3 - .../Pulumi.yaml | 2 - .../index.ts | 27 - .../package.json | 12 - .../tsconfig.json | 18 - .../Pulumi.yaml | 24 - .../Program.cs | 59 - .../Pulumi.yaml | 2 - .../awsx-vpc-fargate-service-csharp.csproj | 15 - .../awsx-vpc-fargate-service-go/Pulumi.yaml | 2 - .../awsx-vpc-fargate-service-go/go.mod | 95 -- .../awsx-vpc-fargate-service-go/main.go | 69 -- .../awsx-vpc-fargate-service-java/Pulumi.yaml | 2 - .../awsx-vpc-fargate-service-java/pom.xml | 97 -- .../src/main/java/myproject/App.java | 46 - .../Pulumi.yaml | 5 - .../index.js | 37 - .../package.json | 12 - .../Pulumi.yaml | 2 - .../__main__.py | 39 - .../requirements.txt | 3 - .../Pulumi.yaml | 2 - .../index.ts | 36 - .../package.json | 12 - .../tsconfig.json | 18 - .../awsx-vpc-fargate-service-yaml/Pulumi.yaml | 35 - 121 files changed, 1905 insertions(+), 3811 deletions(-) delete mode 100644 .github/workflows/scheduled-programs.yml delete mode 100755 scripts/test-programs.sh delete mode 100644 themes/default/layouts/shortcodes/example-program-snippet.html delete mode 100644 themes/default/static/programs/.gitignore delete mode 100644 themes/default/static/programs/awsx-ecr-eks-deployment-service-csharp/Program.cs delete mode 100644 themes/default/static/programs/awsx-ecr-eks-deployment-service-csharp/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-ecr-eks-deployment-service-csharp/app/Dockerfile delete mode 100644 themes/default/static/programs/awsx-ecr-eks-deployment-service-csharp/awsx-ecr-eks-deployment-service-csharp.csproj delete mode 100644 themes/default/static/programs/awsx-ecr-eks-deployment-service-go/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-ecr-eks-deployment-service-go/go.mod delete mode 100644 themes/default/static/programs/awsx-ecr-eks-deployment-service-go/main.go delete mode 100644 themes/default/static/programs/awsx-ecr-eks-deployment-service-java/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-ecr-eks-deployment-service-java/app/Dockerfile delete mode 100644 themes/default/static/programs/awsx-ecr-eks-deployment-service-java/pom.xml delete mode 100644 themes/default/static/programs/awsx-ecr-eks-deployment-service-java/src/main/java/myproject/App.java delete mode 100644 themes/default/static/programs/awsx-ecr-eks-deployment-service-javascript/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-ecr-eks-deployment-service-javascript/index.js delete mode 100644 themes/default/static/programs/awsx-ecr-eks-deployment-service-javascript/package.json delete mode 100644 themes/default/static/programs/awsx-ecr-eks-deployment-service-python/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-ecr-eks-deployment-service-python/__main__.py delete mode 100644 themes/default/static/programs/awsx-ecr-eks-deployment-service-python/app/Dockerfile delete mode 100644 themes/default/static/programs/awsx-ecr-eks-deployment-service-python/requirements.txt delete mode 100644 themes/default/static/programs/awsx-ecr-eks-deployment-service-typescript/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-ecr-eks-deployment-service-typescript/index.ts delete mode 100644 themes/default/static/programs/awsx-ecr-eks-deployment-service-typescript/package.json delete mode 100644 themes/default/static/programs/awsx-ecr-eks-deployment-service-typescript/tsconfig.json delete mode 100644 themes/default/static/programs/awsx-ecr-eks-deployment-service-yaml/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-ecr-eks-deployment-service-yaml/app/Dockerfile delete mode 100644 themes/default/static/programs/awsx-ecr-image-csharp/Program.cs delete mode 100644 themes/default/static/programs/awsx-ecr-image-csharp/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-ecr-image-csharp/app/Dockerfile delete mode 100644 themes/default/static/programs/awsx-ecr-image-csharp/awsx-ecr-image-csharp.csproj delete mode 100644 themes/default/static/programs/awsx-ecr-image-go/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-ecr-image-go/app/Dockerfile delete mode 100644 themes/default/static/programs/awsx-ecr-image-go/go.mod delete mode 100644 themes/default/static/programs/awsx-ecr-image-go/main.go delete mode 100644 themes/default/static/programs/awsx-ecr-image-java/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-ecr-image-java/app/Dockerfile delete mode 100644 themes/default/static/programs/awsx-ecr-image-java/pom.xml delete mode 100644 themes/default/static/programs/awsx-ecr-image-java/src/main/java/myproject/App.java delete mode 100644 themes/default/static/programs/awsx-ecr-image-javascript/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-ecr-image-javascript/app/Dockerfile delete mode 100644 themes/default/static/programs/awsx-ecr-image-javascript/index.js delete mode 100644 themes/default/static/programs/awsx-ecr-image-javascript/package.json delete mode 100644 themes/default/static/programs/awsx-ecr-image-python/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-ecr-image-python/__main__.py delete mode 100644 themes/default/static/programs/awsx-ecr-image-python/app/Dockerfile delete mode 100644 themes/default/static/programs/awsx-ecr-image-python/requirements.txt delete mode 100644 themes/default/static/programs/awsx-ecr-image-typescript/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-ecr-image-typescript/app/Dockerfile delete mode 100644 themes/default/static/programs/awsx-ecr-image-typescript/index.ts delete mode 100644 themes/default/static/programs/awsx-ecr-image-typescript/package.json delete mode 100644 themes/default/static/programs/awsx-ecr-image-typescript/tsconfig.json delete mode 100644 themes/default/static/programs/awsx-ecr-image-yaml/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-ecr-image-yaml/app/Dockerfile delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-ecr-csharp/Program.cs delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-ecr-csharp/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-ecr-csharp/awsx-load-balanced-fargate-ecr-csharp.csproj delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-ecr-go/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-ecr-go/go.mod delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-ecr-go/main.go delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-ecr-java/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-ecr-java/pom.xml delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-ecr-java/src/main/java/myproject/App.java delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-ecr-javascript/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-ecr-javascript/index.js delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-ecr-javascript/package.json delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-ecr-python/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-ecr-python/__main__.py delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-ecr-python/requirements.txt delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-ecr-typescript/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-ecr-typescript/index.ts delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-ecr-typescript/package.json delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-ecr-typescript/tsconfig.json delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-ecr-yaml/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-nginx-csharp/Program.cs delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-nginx-csharp/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-nginx-csharp/awsx-load-balanced-fargate-nginx-csharp.csproj delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-nginx-go/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-nginx-go/go.mod delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-nginx-go/main.go delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-nginx-java/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-nginx-java/pom.xml delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-nginx-java/src/main/java/myproject/App.java delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-nginx-javascript/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-nginx-javascript/index.js delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-nginx-javascript/package.json delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-nginx-python/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-nginx-python/__main__.py delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-nginx-python/requirements.txt delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-nginx-typescript/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-nginx-typescript/index.ts delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-nginx-typescript/package.json delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-nginx-typescript/tsconfig.json delete mode 100644 themes/default/static/programs/awsx-load-balanced-fargate-nginx-yaml/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-vpc-fargate-service-csharp/Program.cs delete mode 100644 themes/default/static/programs/awsx-vpc-fargate-service-csharp/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-vpc-fargate-service-csharp/awsx-vpc-fargate-service-csharp.csproj delete mode 100644 themes/default/static/programs/awsx-vpc-fargate-service-go/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-vpc-fargate-service-go/go.mod delete mode 100644 themes/default/static/programs/awsx-vpc-fargate-service-go/main.go delete mode 100644 themes/default/static/programs/awsx-vpc-fargate-service-java/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-vpc-fargate-service-java/pom.xml delete mode 100644 themes/default/static/programs/awsx-vpc-fargate-service-java/src/main/java/myproject/App.java delete mode 100644 themes/default/static/programs/awsx-vpc-fargate-service-javascript/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-vpc-fargate-service-javascript/index.js delete mode 100644 themes/default/static/programs/awsx-vpc-fargate-service-javascript/package.json delete mode 100644 themes/default/static/programs/awsx-vpc-fargate-service-python/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-vpc-fargate-service-python/__main__.py delete mode 100644 themes/default/static/programs/awsx-vpc-fargate-service-python/requirements.txt delete mode 100644 themes/default/static/programs/awsx-vpc-fargate-service-typescript/Pulumi.yaml delete mode 100644 themes/default/static/programs/awsx-vpc-fargate-service-typescript/index.ts delete mode 100644 themes/default/static/programs/awsx-vpc-fargate-service-typescript/package.json delete mode 100644 themes/default/static/programs/awsx-vpc-fargate-service-typescript/tsconfig.json delete mode 100644 themes/default/static/programs/awsx-vpc-fargate-service-yaml/Pulumi.yaml diff --git a/.github/workflows/scheduled-programs.yml b/.github/workflows/scheduled-programs.yml deleted file mode 100644 index aa65b7e1c9a..00000000000 --- a/.github/workflows/scheduled-programs.yml +++ /dev/null @@ -1,77 +0,0 @@ -name: Run example programs -on: - schedule: - - cron: "0 8 * * *" - pull_request: - branches: - - main - workflow_dispatch: {} - -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PULUMI_TEST_OWNER: "moolumi" - PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} - AWS_REGION: "us-west-2" - PULUMI_API: https://api.pulumi-staging.io - -jobs: - test: - runs-on: ${{ matrix.platform }} - strategy: - matrix: - platform: - - ubuntu-latest - go-version: - - 1.18.x - node-version: - - 16.x - python-version: - - 3.7 - dotnet: - - 6.0.x - - steps: - - name: Install Java - uses: actions/setup-java@v3 - with: - distribution: temurin - java-version: 11 - - - name: Install DotNet - uses: actions/setup-dotnet@v3 - with: - dotnet-version: ${{ matrix.dotnet }} - - - name: Install Node.js - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - - name: Install Go - uses: actions/setup-go@v3 - with: - go-version: ${{ matrix.go-version }} - - - name: Install Pulumi - uses: pulumi/actions@v4 - - - name: Install Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - name: Check out the code - uses: actions/checkout@v3 - - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-region: ${{ env.AWS_REGION }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - role-duration-seconds: 14400 # 4 hours - role-session-name: pulumi-hugo-examples@githubActions - role-to-assume: ${{ secrets.AWS_CI_ROLE_ARN }} - - - name: Run the tests - run: make test-programs diff --git a/.prettierignore b/.prettierignore index e6f1333ed0c..5e39abbb810 100644 --- a/.prettierignore +++ b/.prettierignore @@ -15,4 +15,3 @@ yarn-error.log themes/default/theme themes/default/assets themes/default/layouts -themes/default/static/programs diff --git a/Makefile b/Makefile index a3ccb0a7c75..e53065a3a59 100644 --- a/Makefile +++ b/Makefile @@ -79,6 +79,3 @@ new-learn-topic: .PHONY: new-template new-template: ./scripts/content/new-template.sh - -test-programs: - ./scripts/test-programs.sh preview diff --git a/scripts/clean.sh b/scripts/clean.sh index 458eb95fb9e..f31fbb05ed2 100755 --- a/scripts/clean.sh +++ b/scripts/clean.sh @@ -2,8 +2,6 @@ set -o errexit -o pipefail -git clean -fdX - yarn cache clean hugo mod clean diff --git a/scripts/test-programs.sh b/scripts/test-programs.sh deleted file mode 100755 index 457ecffa97b..00000000000 --- a/scripts/test-programs.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash - -set -euo pipefail - -pulumi whoami -v - -# Delete build/test artifacts. -git clean -fdX themes/default/static/programs - -pushd themes/default/static/programs - for dir in */; do - project="$(basename $dir)" - - - echo "***" - echo "* $project" - echo "***" - - org="$(pulumi whoami -v --json | jq -r .user)" - stack="dev" - fqsn="${org}/${project}/${stack}" - - # Install dependencies. - pulumi -C "$project" install - - # Skip certain programs known not to work. - - # Java examples of FargateService erroneously complain about missing container declarations. - # https://github.com/pulumi/pulumi-awsx/issues/820 - if [[ "$project" == "awsx-vpc-fargate-service-java" ]]; then - continue - elif [[ "$project" == "awsx-load-balanced-fargate-ecr-java" ]]; then - continue - elif [[ "$project" == "awsx-load-balanced-fargate-nginx-java" ]]; then - continue - fi - - # Destroy any existing stacks. - pulumi -C "$project" cancel --stack $fqsn --yes || true - pulumi -C "$project" destroy --stack $fqsn --yes --refresh --remove || true - - # Delete any existing Docker images. - # docker rmi -f "$(docker images -aq)" || true - - # Create a new stack. - pulumi -C "$project" stack select $fqsn || pulumi -C "$project" stack init $fqsn - pulumi -C "$project" config set aws:region us-west-2 || true - - # Preview or deploy. - if [[ "$1" == "update" ]]; then - pulumi -C "$project" up --yes - else - pulumi -C "$project" preview - fi - - # Destroy and remove. - pulumi -C "$project" destroy --yes --remove - - done -popd - -# Delete build/test artifacts. -git clean -fdX themes/default/static/examples diff --git a/themes/default/content/docs/clouds/aws/guides/_index.md b/themes/default/content/docs/clouds/aws/guides/_index.md index c2d456a95af..32ae6abba43 100644 --- a/themes/default/content/docs/clouds/aws/guides/_index.md +++ b/themes/default/content/docs/clouds/aws/guides/_index.md @@ -39,93 +39,38 @@ For example, this program builds and publishes a Dockerized application to a pri ecr), spins up an ECS Fargate cluster, and runs a scalable, load balanced service, all in response to a single `pulumi up` command line invocation: -{{< chooser language "javascript,typescript,python,go,csharp,java,yaml" / >}} +{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} -{{% choosable language "javascript" %}} - -```javascript -"use strict"; -const pulumi = require("@pulumi/pulumi"); -const aws = require("@pulumi/aws"); -const awsx = require("@pulumi/awsx"); - -const repo = new awsx.ecr.Repository("repo", { - forceDelete: true, -}); - -const image = new awsx.ecr.Image("image", { - repositoryUrl: repo.url, - context: "./app", - platform: "linux/amd64", -}); - -const cluster = new aws.ecs.Cluster("cluster"); - -const lb = new awsx.lb.ApplicationLoadBalancer("lb"); - -const service = new awsx.ecs.FargateService("service", { - cluster: cluster.arn, - assignPublicIp: true, - taskDefinitionArgs: { - container: { - name: "my-service", - image: image.imageUri, - cpu: 128, - memory: 512, - essential: true, - portMappings: [{ - containerPort: 80, - targetGroup: lb.defaultTargetGroup, - }], - }, - }, -}); - -exports.url = pulumi.interpolate`http://${lb.loadBalancer.dnsName}`; -``` - -{{% /choosable %}} - -{{% choosable language typescript %}} +{{% choosable language "javascript,typescript" %}} ```typescript import * as pulumi from "@pulumi/pulumi"; import * as aws from "@pulumi/aws"; import * as awsx from "@pulumi/awsx"; -const repo = new awsx.ecr.Repository("repo", { - forceDelete: true, -}); - +const repository = new awsx.ecr.Repository("repository", {}); const image = new awsx.ecr.Image("image", { - repositoryUrl: repo.url, - context: "./app", - platform: "linux/amd64", + repositoryUrl: repository.url, + path: "./app", }); - -const cluster = new aws.ecs.Cluster("cluster"); - -const lb = new awsx.lb.ApplicationLoadBalancer("lb"); - +const cluster = new aws.ecs.Cluster("cluster", {}); +const lb = new awsx.lb.ApplicationLoadBalancer("lb", {}); const service = new awsx.ecs.FargateService("service", { cluster: cluster.arn, assignPublicIp: true, taskDefinitionArgs: { container: { - name: "my-service", image: image.imageUri, - cpu: 128, - memory: 512, + cpu: 512, + memory: 128, essential: true, portMappings: [{ - containerPort: 80, targetGroup: lb.defaultTargetGroup, }], }, }, }); - -export const url = pulumi.interpolate`http://${lb.loadBalancer.dnsName}`; +export const url = lb.loadBalancer.dnsName; ``` {{% /choosable %}} @@ -137,47 +82,27 @@ import pulumi import pulumi_aws as aws import pulumi_awsx as awsx -repository = awsx.ecr.Repository( - "repository", - awsx.ecr.RepositoryArgs( - force_delete=True - ), -) - -image = awsx.ecr.Image( - "image", - awsx.ecr.ImageArgs( - repository_url=repository.url, context="./app", platform="linux/amd64" - ), -) - +repository = awsx.ecr.Repository("repository") +image = awsx.ecr.Image("image", + repository_url=repository.url, + path="./app") cluster = aws.ecs.Cluster("cluster") lb = awsx.lb.ApplicationLoadBalancer("lb") - -service = awsx.ecs.FargateService( - "service", - awsx.ecs.FargateServiceArgs( - cluster=cluster.arn, - assign_public_ip=True, - task_definition_args=awsx.ecs.FargateServiceTaskDefinitionArgs( - container=awsx.ecs.TaskDefinitionContainerDefinitionArgs( - name="my-service", - image=image.image_uri, - cpu=128, - memory=512, - essential=True, - port_mappings=[ - awsx.ecs.TaskDefinitionPortMappingArgs( - container_port=80, - target_group=lb.default_target_group, - ) - ], - ), +service = awsx.ecs.FargateService("service", + cluster=cluster.arn, + assign_public_ip=True, + task_definition_args=awsx.ecs.FargateServiceTaskDefinitionArgs( + container=awsx.ecs.TaskDefinitionContainerDefinitionArgs( + image=image.image_uri, + cpu=512, + memory=128, + essential=True, + port_mappings=[awsx.ecs.TaskDefinitionPortMappingArgs( + target_group=lb.default_target_group, + )], ), - ), -) - -pulumi.export("url", pulumi.Output.concat("http://", lb.load_balancer.dns_name)) + )) +pulumi.export("url", lb.load_balancer.dns_name) ``` {{% /choosable %}} @@ -188,55 +113,47 @@ pulumi.export("url", pulumi.Output.concat("http://", lb.load_balancer.dns_name)) package main import ( - "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs" - "github.com/pulumi/pulumi-awsx/sdk/v2/go/awsx/ecr" - ecsx "github.com/pulumi/pulumi-awsx/sdk/v2/go/awsx/ecs" - "github.com/pulumi/pulumi-awsx/sdk/v2/go/awsx/lb" + "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ecs" + "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/lb" + "github.com/pulumi/pulumi-awsx/sdk/go/awsx/ecr" + "github.com/pulumi/pulumi-awsx/sdk/go/awsx/ecs" + "github.com/pulumi/pulumi-awsx/sdk/go/awsx/lb" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - repository, err := ecr.NewRepository(ctx, "repository", &ecr.RepositoryArgs{ - ForceDelete: pulumi.Bool(true), - }) + repository, err := ecr.NewRepository(ctx, "repository", nil) if err != nil { return err } - image, err := ecr.NewImage(ctx, "image", &ecr.ImageArgs{ RepositoryUrl: repository.Url, - Context: pulumi.String("./app"), - Platform: pulumi.StringPtr("linux/amd64"), + Path: pulumi.String("./app"), }) if err != nil { return err } - cluster, err := ecs.NewCluster(ctx, "cluster", nil) if err != nil { return err } - lb, err := lb.NewApplicationLoadBalancer(ctx, "lb", nil) if err != nil { return err } - - _, err = ecsx.NewFargateService(ctx, "service", &ecsx.FargateServiceArgs{ + _, err = ecs.NewFargateService(ctx, "service", &ecs.FargateServiceArgs{ Cluster: cluster.Arn, AssignPublicIp: pulumi.Bool(true), - TaskDefinitionArgs: &ecsx.FargateServiceTaskDefinitionArgs{ - Container: &ecsx.TaskDefinitionContainerDefinitionArgs{ - Name: pulumi.String("app"), + TaskDefinitionArgs: &ecs.FargateServiceTaskDefinitionArgs{ + Container: &ecs.TaskDefinitionContainerDefinitionArgs{ Image: image.ImageUri, - Cpu: pulumi.Int(128), - Memory: pulumi.Int(512), + Cpu: pulumi.Int(512), + Memory: pulumi.Int(128), Essential: pulumi.Bool(true), - PortMappings: ecsx.TaskDefinitionPortMappingArray{ - &ecsx.TaskDefinitionPortMappingArgs{ - ContainerPort: pulumi.Int(80), - TargetGroup: lb.DefaultTargetGroup, + PortMappings: []ecs.TaskDefinitionPortMappingArgs{ + &ecs.TaskDefinitionPortMappingArgs{ + TargetGroup: lb.DefaultTargetGroup, }, }, }, @@ -245,8 +162,9 @@ func main() { if err != nil { return err } - - ctx.Export("url", pulumi.Sprintf("http://%s", lb.LoadBalancer.DnsName())) + ctx.Export("url", lb.LoadBalancer.ApplyT(func(loadBalancer *lb.LoadBalancer) (string, error) { + return loadBalancer.DnsName, nil + }).(pulumi.StringOutput)) return nil }) } @@ -264,23 +182,19 @@ using Awsx = Pulumi.Awsx; return await Deployment.RunAsync(() => { - var cluster = new Aws.Ecs.Cluster("cluster"); - - var repo = new Awsx.Ecr.Repository("repo", new() - { - ForceDelete = true, - }); + var repository = new Awsx.Ecr.Repository("repository"); var image = new Awsx.Ecr.Image("image", new() { - RepositoryUrl = repo.Url, - Context = "./app", - Platform = "linux/amd64", + RepositoryUrl = repository.Url, + Path = "./app", }); + var cluster = new Aws.Ecs.Cluster("cluster"); + var lb = new Awsx.Lb.ApplicationLoadBalancer("lb"); - var service = new Awsx.Ecs.FargateService("service", new Awsx.Ecs.FargateServiceArgs + var service = new Awsx.Ecs.FargateService("service", new() { Cluster = cluster.Arn, AssignPublicIp = true, @@ -288,16 +202,14 @@ return await Deployment.RunAsync(() => { Container = new Awsx.Ecs.Inputs.TaskDefinitionContainerDefinitionArgs { - Name = "my-service", Image = image.ImageUri, - Cpu = 128, - Memory = 512, + Cpu = 512, + Memory = 128, Essential = true, PortMappings = new[] { new Awsx.Ecs.Inputs.TaskDefinitionPortMappingArgs { - ContainerPort = 80, TargetGroup = lb.DefaultTargetGroup, }, }, @@ -307,9 +219,10 @@ return await Deployment.RunAsync(() => return new Dictionary { - ["url"] = lb.LoadBalancer.Apply(loadBalancer => Output.Format($"http://{loadBalancer.DnsName}")), + ["url"] = lb.LoadBalancer.Apply(loadBalancer => loadBalancer.DnsName), }; }); + ``` {{% /choosable %}} @@ -317,13 +230,12 @@ return await Deployment.RunAsync(() => {{% choosable language java %}} ```java -package myproject; +package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.awsx.ecr.Repository; -import com.pulumi.awsx.ecr.RepositoryArgs; import com.pulumi.awsx.ecr.Image; import com.pulumi.awsx.ecr.ImageArgs; import com.pulumi.aws.ecs.Cluster; @@ -332,7 +244,12 @@ import com.pulumi.awsx.ecs.FargateService; import com.pulumi.awsx.ecs.FargateServiceArgs; import com.pulumi.awsx.ecs.inputs.FargateServiceTaskDefinitionArgs; import com.pulumi.awsx.ecs.inputs.TaskDefinitionContainerDefinitionArgs; -import com.pulumi.awsx.ecs.inputs.TaskDefinitionPortMappingArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; public class App { public static void main(String[] args) { @@ -340,14 +257,11 @@ public class App { } public static void stack(Context ctx) { - var repository = new Repository("repository", RepositoryArgs.builder() - .forceDelete(true) - .build()); + var repository = new Repository("repository"); var image = new Image("image", ImageArgs.builder() .repositoryUrl(repository.url()) - .context("./app") - .platform("linux/amd64") + .path("./app") .build()); var cluster = new Cluster("cluster"); @@ -359,20 +273,18 @@ public class App { .assignPublicIp(true) .taskDefinitionArgs(FargateServiceTaskDefinitionArgs.builder() .container(TaskDefinitionContainerDefinitionArgs.builder() - .name("my-service") .image(image.imageUri()) - .cpu(128) - .memory(512) + .cpu(512) + .memory(128) .essential(true) .portMappings(TaskDefinitionPortMappingArgs.builder() - .containerPort(80) .targetGroup(lb.defaultTargetGroup()) .build()) .build()) .build()) .build()); - ctx.export("url", Output.format("http://%s", lb.loadBalancer().applyValue(loadBalancer -> loadBalancer.dnsName()))); + ctx.export("url", lb.loadBalancer().applyValue(loadBalancer -> loadBalancer.dnsName())); } } ``` @@ -382,28 +294,21 @@ public class App { {{% choosable language yaml %}} ```yaml -name: my-project +name: scratch-yaml +description: A Pulumi YAML program to deploy a serverless application on AWS runtime: yaml - resources: - repo: + repository: type: awsx:ecr:Repository - properties: - forceDelete: true - - lb: - type: awsx:lb:ApplicationLoadBalancer - image: type: awsx:ecr:Image properties: - repositoryUrl: ${repo.url} - context: ./app - platform: linux/amd64 - + repositoryUrl: ${repository.url} + path: "./app" cluster: type: aws:ecs:Cluster - + lb: + type: awsx:lb:ApplicationLoadBalancer service: type: awsx:ecs:FargateService properties: @@ -411,17 +316,14 @@ resources: assignPublicIp: true taskDefinitionArgs: container: - name: my-service image: ${image.imageUri} - cpu: 128 - memory: 512 + cpu: 512 + memory: 128 essential: true portMappings: - - containerPort: 80 - targetGroup: ${lb.defaultTargetGroup} - + - targetGroup: ${lb.defaultTargetGroup} outputs: - url: http://${lb.loadBalancer.dnsName} + url: ${lb.loadBalancer.dnsName} ``` {{% /choosable %}} diff --git a/themes/default/content/docs/clouds/aws/guides/ecr.md b/themes/default/content/docs/clouds/aws/guides/ecr.md index 94c7b4e3ec4..2752aff7ca7 100644 --- a/themes/default/content/docs/clouds/aws/guides/ecr.md +++ b/themes/default/content/docs/clouds/aws/guides/ecr.md @@ -40,27 +40,16 @@ https://docs.aws.amazon.com/AmazonECR/latest/userguide/Repositories.html) to act To create a new ECR repository, allocate an instance of the `awsx.ecr.Repository` class: -{{< chooser language "javascript,typescript,python,go,csharp,java,yaml" / >}} +{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} -{{% choosable language "javascript" %}} - -```javascript -"use strict"; -const awsx = require("@pulumi/awsx"); - -const repo = new awsx.ecr.Repository("repo"); -exports.url = repo.url; -``` - -{{% /choosable %}} - -{{% choosable language "typescript" %}} +{{% choosable language "javascript,typescript" %}} ```typescript +import * as pulumi from "@pulumi/pulumi"; import * as awsx from "@pulumi/awsx"; -const repo = new awsx.ecr.Repository("repo"); -export const url = repo.url; +const repository = new awsx.ecr.Repository("repository", {}); +export const url = repository.url; ``` {{% /choosable %}} @@ -93,7 +82,6 @@ func main() { if err != nil { return err } - ctx.Export("url", repository.Url) return nil }) @@ -263,7 +251,150 @@ entirely from code. This lets you version and deploy container changes easily al In the following example, creating an `Image` resource will build an image from the "./app" directory (relative to our project and containing Dockerfile), and publish it to our ECR repository provisioned above. -{{< example-program path="awsx-ecr-image" >}} +{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} + +{{% choosable language "javascript,typescript" %}} + +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as awsx from "@pulumi/awsx"; + +const repository = new awsx.ecr.Repository("repository", {}); +const image = new awsx.ecr.Image("image", { + repositoryUrl: repository.url, + path: "./app", +}); +export const url = repository.url; +``` + +{{% /choosable %}} + +{{% choosable language python %}} + +```python +import pulumi +import pulumi_awsx as awsx + +repository = awsx.ecr.Repository("repository") +image = awsx.ecr.Image("image", + repository_url=repository.url, + path="./app") +pulumi.export("url", repository.url) +``` + +{{% /choosable %}} + +{{% choosable language go %}} + +```go +package main + +import ( + "github.com/pulumi/pulumi-awsx/sdk/go/awsx/ecr" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + repository, err := ecr.NewRepository(ctx, "repository", nil) + if err != nil { + return err + } + _, err = ecr.NewImage(ctx, "image", &ecr.ImageArgs{ + RepositoryUrl: repository.Url, + Path: pulumi.String("./app"), + }) + if err != nil { + return err + } + ctx.Export("url", repository.Url) + return nil + }) +} +``` + +{{% /choosable %}} + +{{% choosable language csharp %}} + +```csharp +using System.Collections.Generic; +using Pulumi; +using Awsx = Pulumi.Awsx; + +return await Deployment.RunAsync(() => +{ + var repository = new Awsx.Ecr.Repository("repository"); + + var image = new Awsx.Ecr.Image("image", new() + { + RepositoryUrl = repository.Url, + Path = "./app", + }); + + return new Dictionary + { + ["url"] = repository.Url, + }; +}); +``` + +{{% /choosable %}} + +{{% choosable language java %}} + +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.awsx.ecr.Repository; +import com.pulumi.awsx.ecr.Image; +import com.pulumi.awsx.ecr.ImageArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var repository = new Repository("repository"); + + var image = new Image("image", ImageArgs.builder() + .repositoryUrl(repository.url()) + .path("./app") + .build()); + + ctx.export("url", repository.url()); + } +} +``` + +{{% /choosable %}} + +{{% choosable language yaml %}} + +```yaml +resources: + repository: + type: awsx:ecr:Repository + image: + type: awsx:ecr:Image + properties: + repositoryUrl: ${repository.url} + path: "./app" +outputs: + url: ${repository.url} +``` + +{{% /choosable %}} As we run `pulumi up`, we will see Docker build output in the Pulumi CLI display. If there is an error, it'll be printed in the diagnostics section, but otherwise the resulting image name is printed: @@ -312,7 +443,294 @@ defaults to `latest`). The container instances require IAM permissions which are To use your private repository from an ECS task definition, reference it like so: -{{< example-program path="awsx-load-balanced-fargate-ecr" >}} +{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} + +{{% choosable language "javascript,typescript" %}} + +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as aws from "@pulumi/aws"; +import * as awsx from "@pulumi/awsx"; + +const repository = new awsx.ecr.Repository("repository", {}); +const image = new awsx.ecr.Image("image", { + repositoryUrl: repository.url, + path: "./app", +}); +const cluster = new aws.ecs.Cluster("cluster", {}); +const lb = new awsx.lb.ApplicationLoadBalancer("lb", {}); +const service = new awsx.ecs.FargateService("service", { + cluster: cluster.arn, + assignPublicIp: true, + taskDefinitionArgs: { + container: { + image: image.imageUri, + cpu: 512, + memory: 128, + essential: true, + portMappings: [{ + targetGroup: lb.defaultTargetGroup, + }], + }, + }, +}); +export const url = lb.loadBalancer.dnsName; +``` + +{{% /choosable %}} + +{{% choosable language python %}} + +```python +import pulumi +import pulumi_aws as aws +import pulumi_awsx as awsx + +repository = awsx.ecr.Repository("repository") +image = awsx.ecr.Image("image", + repository_url=repository.url, + path="./app") +cluster = aws.ecs.Cluster("cluster") +lb = awsx.lb.ApplicationLoadBalancer("lb") +service = awsx.ecs.FargateService("service", + cluster=cluster.arn, + assign_public_ip=True, + task_definition_args=awsx.ecs.FargateServiceTaskDefinitionArgs( + container=awsx.ecs.TaskDefinitionContainerDefinitionArgs( + image=image.image_uri, + cpu=512, + memory=128, + essential=True, + port_mappings=[awsx.ecs.TaskDefinitionPortMappingArgs( + target_group=lb.default_target_group, + )], + ), + )) +pulumi.export("url", lb.load_balancer.dns_name) +``` + +{{% /choosable %}} + +{{% choosable language go %}} + +```go +package main + +import ( + "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ecs" + "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/lb" + "github.com/pulumi/pulumi-awsx/sdk/go/awsx/ecr" + "github.com/pulumi/pulumi-awsx/sdk/go/awsx/ecs" + "github.com/pulumi/pulumi-awsx/sdk/go/awsx/lb" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + repository, err := ecr.NewRepository(ctx, "repository", nil) + if err != nil { + return err + } + image, err := ecr.NewImage(ctx, "image", &ecr.ImageArgs{ + RepositoryUrl: repository.Url, + Path: pulumi.String("./app"), + }) + if err != nil { + return err + } + cluster, err := ecs.NewCluster(ctx, "cluster", nil) + if err != nil { + return err + } + lb, err := lb.NewApplicationLoadBalancer(ctx, "lb", nil) + if err != nil { + return err + } + _, err = ecs.NewFargateService(ctx, "service", &ecs.FargateServiceArgs{ + Cluster: cluster.Arn, + AssignPublicIp: pulumi.Bool(true), + TaskDefinitionArgs: &ecs.FargateServiceTaskDefinitionArgs{ + Container: &ecs.TaskDefinitionContainerDefinitionArgs{ + Image: image.ImageUri, + Cpu: pulumi.Int(512), + Memory: pulumi.Int(128), + Essential: pulumi.Bool(true), + PortMappings: []ecs.TaskDefinitionPortMappingArgs{ + &ecs.TaskDefinitionPortMappingArgs{ + TargetGroup: lb.DefaultTargetGroup, + }, + }, + }, + }, + }) + if err != nil { + return err + } + ctx.Export("url", lb.LoadBalancer.ApplyT(func(loadBalancer *lb.LoadBalancer) (string, error) { + return loadBalancer.DnsName, nil + }).(pulumi.StringOutput)) + return nil + }) +} +``` + +{{% /choosable %}} + +{{% choosable language csharp %}} + +```csharp +using System.Collections.Generic; +using Pulumi; +using Aws = Pulumi.Aws; +using Awsx = Pulumi.Awsx; + +return await Deployment.RunAsync(() => +{ + var repository = new Awsx.Ecr.Repository("repository"); + + var image = new Awsx.Ecr.Image("image", new() + { + RepositoryUrl = repository.Url, + Path = "./app", + }); + + var cluster = new Aws.Ecs.Cluster("cluster"); + + var lb = new Awsx.Lb.ApplicationLoadBalancer("lb"); + + var service = new Awsx.Ecs.FargateService("service", new() + { + Cluster = cluster.Arn, + AssignPublicIp = true, + TaskDefinitionArgs = new Awsx.Ecs.Inputs.FargateServiceTaskDefinitionArgs + { + Container = new Awsx.Ecs.Inputs.TaskDefinitionContainerDefinitionArgs + { + Image = image.ImageUri, + Cpu = 512, + Memory = 128, + Essential = true, + PortMappings = new[] + { + new Awsx.Ecs.Inputs.TaskDefinitionPortMappingArgs + { + TargetGroup = lb.DefaultTargetGroup, + }, + }, + }, + }, + }); + + return new Dictionary + { + ["url"] = lb.LoadBalancer.Apply(loadBalancer => loadBalancer.DnsName), + }; +}); + +``` + +{{% /choosable %}} + +{{% choosable language java %}} + +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.awsx.ecr.Repository; +import com.pulumi.awsx.ecr.Image; +import com.pulumi.awsx.ecr.ImageArgs; +import com.pulumi.aws.ecs.Cluster; +import com.pulumi.awsx.lb.ApplicationLoadBalancer; +import com.pulumi.awsx.ecs.FargateService; +import com.pulumi.awsx.ecs.FargateServiceArgs; +import com.pulumi.awsx.ecs.inputs.FargateServiceTaskDefinitionArgs; +import com.pulumi.awsx.ecs.inputs.TaskDefinitionContainerDefinitionArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var repository = new Repository("repository"); + + var image = new Image("image", ImageArgs.builder() + .repositoryUrl(repository.url()) + .path("./app") + .build()); + + var cluster = new Cluster("cluster"); + + var lb = new ApplicationLoadBalancer("lb"); + + var service = new FargateService("service", FargateServiceArgs.builder() + .cluster(cluster.arn()) + .assignPublicIp(true) + .taskDefinitionArgs(FargateServiceTaskDefinitionArgs.builder() + .container(TaskDefinitionContainerDefinitionArgs.builder() + .image(image.imageUri()) + .cpu(512) + .memory(128) + .essential(true) + .portMappings(TaskDefinitionPortMappingArgs.builder() + .targetGroup(lb.defaultTargetGroup()) + .build()) + .build()) + .build()) + .build()); + + ctx.export("url", lb.loadBalancer().applyValue(loadBalancer -> loadBalancer.dnsName())); + } +} +``` + +{{% /choosable %}} + +{{% choosable language yaml %}} + +```yaml +name: scratch-yaml +description: A Pulumi YAML program to deploy a serverless application on AWS +runtime: yaml +resources: + repository: + type: awsx:ecr:Repository + image: + type: awsx:ecr:Image + properties: + repositoryUrl: ${repository.url} + path: "./app" + cluster: + type: aws:ecs:Cluster + lb: + type: awsx:lb:ApplicationLoadBalancer + service: + type: awsx:ecs:FargateService + properties: + cluster: ${cluster.arn} + assignPublicIp: true + taskDefinitionArgs: + container: + image: ${image.imageUri} + cpu: 512 + memory: 128 + essential: true + portMappings: + - targetGroup: ${lb.defaultTargetGroup} +outputs: + url: ${lb.loadBalancer.dnsName} +``` + +{{% /choosable %}} For information about ECS, refer to the [Pulumi Crosswalk for AWS ECS documentation](/docs/clouds/aws/guides/ecs/). For information about consuming ECR images from ECS services specifically, see @@ -322,7 +740,559 @@ information about consuming ECR images from ECS services specifically, see To use your private repository from a Kubernetes service, such as one using EKS, reference it like so: -{{< example-program path="awsx-ecr-eks-deployment-service" >}} +{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} + +{{% choosable language "javascript,typescript" %}} + +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as awsx from "@pulumi/awsx"; +import * as eks from "@pulumi/eks"; +import * as kubernetes from "@pulumi/kubernetes"; + +const appName = "my-app"; +const repository = new awsx.ecr.Repository("repository", {}); +const image = new awsx.ecr.Image("image", { + repositoryUrl: repository.url, + path: "./app", +}); +const cluster = new eks.Cluster("cluster", {}); +const clusterProvider = new kubernetes.Provider("clusterProvider", { + kubeconfig: cluster.kubeconfig, + enableServerSideApply: true, +}); +const deployment = new kubernetes.apps.v1.Deployment("deployment", { + metadata: { + labels: { + appClass: appName, + }, + }, + spec: { + replicas: 2, + selector: { + matchLabels: { + appClass: appName, + }, + }, + template: { + metadata: { + labels: { + appClass: appName, + }, + }, + spec: { + containers: [{ + name: appName, + image: image.imageUri, + ports: [{ + name: "http", + containerPort: 80, + }], + }], + }, + }, + }, +}, { + provider: clusterProvider, +}); +const service = new kubernetes.core.v1.Service("service", { + metadata: { + labels: { + appClass: appName, + }, + }, + spec: { + type: "LoadBalancer", + selector: { + appClass: appName, + }, + ports: [{ + port: 80, + targetPort: "http", + }], + }, +}, { + provider: clusterProvider, +}); +export const url = service.status.apply(status => status?.loadBalancer?.ingress?.[0]?.hostname); +``` + +{{% /choosable %}} + +{{% choosable language python %}} + +```python +import pulumi +import pulumi_awsx as awsx +import pulumi_eks as eks +import pulumi_kubernetes as kubernetes + +app_name = "my-app" +repository = awsx.ecr.Repository("repository") +image = awsx.ecr.Image("image", + repository_url=repository.url, + path="./app") +cluster = eks.Cluster("cluster") +cluster_provider = kubernetes.Provider("clusterProvider", + kubeconfig=cluster.kubeconfig, + enable_server_side_apply=True) +deployment = kubernetes.apps.v1.Deployment("deployment", + metadata=kubernetes.meta.v1.ObjectMetaArgs( + labels={ + "appClass": app_name, + }, + ), + spec=kubernetes.apps.v1.DeploymentSpecArgs( + replicas=2, + selector=kubernetes.meta.v1.LabelSelectorArgs( + match_labels={ + "appClass": app_name, + }, + ), + template=kubernetes.core.v1.PodTemplateSpecArgs( + metadata=kubernetes.meta.v1.ObjectMetaArgs( + labels={ + "appClass": app_name, + }, + ), + spec=kubernetes.core.v1.PodSpecArgs( + containers=[kubernetes.core.v1.ContainerArgs( + name=app_name, + image=image.image_uri, + ports=[kubernetes.core.v1.ContainerPortArgs( + name="http", + container_port=80, + )], + )], + ), + ), + ), + opts=pulumi.ResourceOptions(provider=cluster_provider)) +service = kubernetes.core.v1.Service("service", + metadata=kubernetes.meta.v1.ObjectMetaArgs( + labels={ + "appClass": app_name, + }, + ), + spec=kubernetes.core.v1.ServiceSpecArgs( + type="LoadBalancer", + selector={ + "appClass": app_name, + }, + ports=[kubernetes.core.v1.ServicePortArgs( + port=80, + target_port="http", + )], + ), + opts=pulumi.ResourceOptions(provider=cluster_provider)) +pulumi.export("url", service.status.load_balancer.ingress[0].hostname) +``` + +{{% /choosable %}} + +{{% choosable language go %}} + +```go +package main + +import ( + "github.com/pulumi/pulumi-awsx/sdk/go/awsx/ecr" + "github.com/pulumi/pulumi-eks/sdk/go/eks" + "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes" + appsv1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/apps/v1" + corev1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/core/v1" + metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v3/go/kubernetes/meta/v1" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + appName := "my-app" + repository, err := ecr.NewRepository(ctx, "repository", nil) + if err != nil { + return err + } + image, err := ecr.NewImage(ctx, "image", &ecr.ImageArgs{ + RepositoryUrl: repository.Url, + Path: pulumi.String("./app"), + }) + if err != nil { + return err + } + cluster, err := eks.NewCluster(ctx, "cluster", nil) + if err != nil { + return err + } + clusterProvider, err := kubernetes.NewProvider(ctx, "clusterProvider", &kubernetes.ProviderArgs{ + Kubeconfig: cluster.Kubeconfig.AsStringPtrOutput(), + EnableServerSideApply: pulumi.Bool(true), + }) + if err != nil { + return err + } + _, err = appsv1.NewDeployment(ctx, "deployment", &appsv1.DeploymentArgs{ + Metadata: &metav1.ObjectMetaArgs{ + Labels: pulumi.StringMap{ + "appClass": pulumi.String(appName), + }, + }, + Spec: &appsv1.DeploymentSpecArgs{ + Replicas: pulumi.Int(2), + Selector: &metav1.LabelSelectorArgs{ + MatchLabels: pulumi.StringMap{ + "appClass": pulumi.String(appName), + }, + }, + Template: &corev1.PodTemplateSpecArgs{ + Metadata: &metav1.ObjectMetaArgs{ + Labels: pulumi.StringMap{ + "appClass": pulumi.String(appName), + }, + }, + Spec: &corev1.PodSpecArgs{ + Containers: corev1.ContainerArray{ + &corev1.ContainerArgs{ + Name: pulumi.String(appName), + Image: image.ImageUri, + Ports: corev1.ContainerPortArray{ + &corev1.ContainerPortArgs{ + Name: pulumi.String("http"), + ContainerPort: pulumi.Int(80), + }, + }, + }, + }, + }, + }, + }, + }, pulumi.Provider(clusterProvider)) + if err != nil { + return err + } + service, err := corev1.NewService(ctx, "service", &corev1.ServiceArgs{ + Metadata: &metav1.ObjectMetaArgs{ + Labels: pulumi.StringMap{ + "appClass": pulumi.String(appName), + }, + }, + Spec: &corev1.ServiceSpecArgs{ + Type: pulumi.String("LoadBalancer"), + Selector: pulumi.StringMap{ + "appClass": pulumi.String(appName), + }, + Ports: corev1.ServicePortArray{ + &corev1.ServicePortArgs{ + Port: pulumi.Int(80), + TargetPort: pulumi.Any("http"), + }, + }, + }, + }, pulumi.Provider(clusterProvider)) + if err != nil { + return err + } + ctx.Export("url", service.Status.ApplyT(func(status corev1.ServiceStatus) (*string, error) { + return status.LoadBalancer.Ingress[0].Hostname, nil + }).(pulumi.StringPtrOutput)) + return nil + }) +} +``` + +{{% /choosable %}} + +{{% choosable language csharp %}} + +```csharp +using System.Collections.Generic; +using Pulumi; +using Awsx = Pulumi.Awsx; +using Eks = Pulumi.Eks; +using Kubernetes = Pulumi.Kubernetes; + +return await Deployment.RunAsync(() => +{ + var appName = "my-app"; + + var repository = new Awsx.Ecr.Repository("repository"); + + var image = new Awsx.Ecr.Image("image", new() + { + RepositoryUrl = repository.Url, + Path = "./app", + }); + + var cluster = new Eks.Cluster("cluster"); + + var clusterProvider = new Kubernetes.Provider("clusterProvider", new() + { + KubeConfig = cluster.Kubeconfig, + EnableServerSideApply = true, + }); + + var deployment = new Kubernetes.Apps.V1.Deployment("deployment", new() + { + Metadata = new Kubernetes.Types.Inputs.Meta.V1.ObjectMetaArgs + { + Labels = + { + { "appClass", appName }, + }, + }, + Spec = new Kubernetes.Types.Inputs.Apps.V1.DeploymentSpecArgs + { + Replicas = 2, + Selector = new Kubernetes.Types.Inputs.Meta.V1.LabelSelectorArgs + { + MatchLabels = + { + { "appClass", appName }, + }, + }, + Template = new Kubernetes.Types.Inputs.Core.V1.PodTemplateSpecArgs + { + Metadata = new Kubernetes.Types.Inputs.Meta.V1.ObjectMetaArgs + { + Labels = + { + { "appClass", appName }, + }, + }, + Spec = new Kubernetes.Types.Inputs.Core.V1.PodSpecArgs + { + Containers = new[] + { + new Kubernetes.Types.Inputs.Core.V1.ContainerArgs + { + Name = appName, + Image = image.ImageUri, + Ports = new[] + { + new Kubernetes.Types.Inputs.Core.V1.ContainerPortArgs + { + Name = "http", + ContainerPortValue = 80, + }, + }, + }, + }, + }, + }, + }, + }, new CustomResourceOptions + { + Provider = clusterProvider, + }); + + var service = new Kubernetes.Core.V1.Service("service", new() + { + Metadata = new Kubernetes.Types.Inputs.Meta.V1.ObjectMetaArgs + { + Labels = + { + { "appClass", appName }, + }, + }, + Spec = new Kubernetes.Types.Inputs.Core.V1.ServiceSpecArgs + { + Type = "LoadBalancer", + Selector = + { + { "appClass", appName }, + }, + Ports = new[] + { + new Kubernetes.Types.Inputs.Core.V1.ServicePortArgs + { + Port = 80, + TargetPort = "http", + }, + }, + }, + }, new CustomResourceOptions + { + Provider = clusterProvider, + }); + + return new Dictionary + { + ["url"] = service.Status.Apply(status => status?.LoadBalancer?.Ingress[0]?.Hostname), + }; +}); +``` + +{{% /choosable %}} + +{{% choosable language java %}} + +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.awsx.ecr.Repository; +import com.pulumi.awsx.ecr.Image; +import com.pulumi.awsx.ecr.ImageArgs; +import com.pulumi.eks.Cluster; +import com.pulumi.kubernetes.Provider; +import com.pulumi.kubernetes.ProviderArgs; +import com.pulumi.kubernetes.apps_v1.Deployment; +import com.pulumi.kubernetes.apps_v1.DeploymentArgs; +import com.pulumi.kubernetes.meta_v1.inputs.ObjectMetaArgs; +import com.pulumi.kubernetes.apps_v1.inputs.DeploymentSpecArgs; +import com.pulumi.kubernetes.meta_v1.inputs.LabelSelectorArgs; +import com.pulumi.kubernetes.core_v1.inputs.PodTemplateSpecArgs; +import com.pulumi.kubernetes.core_v1.inputs.PodSpecArgs; +import com.pulumi.kubernetes.core_v1.Service; +import com.pulumi.kubernetes.core_v1.ServiceArgs; +import com.pulumi.kubernetes.core_v1.inputs.ServiceSpecArgs; +import com.pulumi.resources.CustomResourceOptions; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + final var appName = "my-app"; + + var repository = new Repository("repository"); + + var image = new Image("image", ImageArgs.builder() + .repositoryUrl(repository.url()) + .path("./app") + .build()); + + var cluster = new Cluster("cluster"); + + var clusterProvider = new Provider("clusterProvider", ProviderArgs.builder() + .kubeconfig(cluster.kubeconfig()) + .enableServerSideApply(true) + .build()); + + var deployment = new Deployment("deployment", DeploymentArgs.builder() + .metadata(ObjectMetaArgs.builder() + .labels(Map.of("appClass", appName)) + .build()) + .spec(DeploymentSpecArgs.builder() + .replicas(2) + .selector(LabelSelectorArgs.builder() + .matchLabels(Map.of("appClass", appName)) + .build()) + .template(PodTemplateSpecArgs.builder() + .metadata(ObjectMetaArgs.builder() + .labels(Map.of("appClass", appName)) + .build()) + .spec(PodSpecArgs.builder() + .containers(ContainerArgs.builder() + .name(appName) + .image(image.imageUri()) + .ports(ContainerPortArgs.builder() + .name("http") + .containerPort(80) + .build()) + .build()) + .build()) + .build()) + .build()) + .build(), CustomResourceOptions.builder() + .provider(clusterProvider) + .build()); + + var service = new Service("service", ServiceArgs.builder() + .metadata(ObjectMetaArgs.builder() + .labels(Map.of("appClass", appName)) + .build()) + .spec(ServiceSpecArgs.builder() + .type("LoadBalancer") + .selector(Map.of("appClass", appName)) + .ports(ServicePortArgs.builder() + .port(80) + .targetPort("http") + .build()) + .build()) + .build(), CustomResourceOptions.builder() + .provider(clusterProvider) + .build()); + + ctx.export("url", service.status().applyValue(status -> status.loadBalancer().ingress()[0].hostname())); + } +} +``` + +{{% /choosable %}} + +{{% choosable language yaml %}} + +```yaml +variables: + appName: my-app +resources: + repository: + type: awsx:ecr:Repository + image: + type: awsx:ecr:Image + properties: + repositoryUrl: ${repository.url} + path: "./app" + cluster: + type: eks:Cluster + clusterProvider: + type: pulumi:providers:kubernetes + properties: + kubeconfig: ${cluster.kubeconfig} + enableServerSideApply: true + deployment: + type: kubernetes:apps/v1:Deployment + properties: + metadata: + labels: + appClass: ${appName} + spec: + replicas: 2 + selector: + matchLabels: + appClass: ${appName} + template: + metadata: + labels: + appClass: ${appName} + spec: + containers: + - name: ${appName} + image: ${image.imageUri} + ports: + - name: http + containerPort: 80 + options: + provider: ${clusterProvider} + service: + type: kubernetes:core/v1:Service + properties: + metadata: + labels: + appClass: ${appName} + spec: + type: LoadBalancer + selector: + appClass: ${appName} + ports: + - port: 80 + targetPort: http + options: + provider: ${clusterProvider} +outputs: + url: ${service.status.loadBalancer.ingress[0].hostname} +``` + +{{% /choosable %}} For information about EKS, refer to the [Pulumi Crosswalk for AWS EKS documentation](/docs/clouds/aws/guides/eks/). diff --git a/themes/default/content/docs/clouds/aws/guides/ecs.md b/themes/default/content/docs/clouds/aws/guides/ecs.md index 0759c3ef6eb..6ce8ddbe124 100644 --- a/themes/default/content/docs/clouds/aws/guides/ecs.md +++ b/themes/default/content/docs/clouds/aws/guides/ecs.md @@ -44,7 +44,251 @@ providing full control over the underlying EC2 machine resources that power your To run a Docker container in ECS using default network and cluster settings, use the `awsx.ecs.FargateService` class. Since we need to access this container over port 80 using a stable address, we will use a load balancer. -{{< example-program path="awsx-load-balanced-fargate-nginx" >}} +{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} + +{{% choosable language "javascript,typescript" %}} + +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as aws from "@pulumi/aws"; +import * as awsx from "@pulumi/awsx"; + +const cluster = new aws.ecs.Cluster("cluster", {}); +const lb = new awsx.lb.ApplicationLoadBalancer("lb", {}); +const service = new awsx.ecs.FargateService("service", { + cluster: cluster.arn, + assignPublicIp: true, + desiredCount: 2, + taskDefinitionArgs: { + container: { + image: "nginx:latest", + cpu: 512, + memory: 128, + essential: true, + portMappings: [{ + targetGroup: lb.defaultTargetGroup, + }], + }, + }, +}); +export const url = lb.loadBalancer.dnsName; +``` + +{{% /choosable %}} + +{{% choosable language python %}} + +```python +import pulumi +import pulumi_aws as aws +import pulumi_awsx as awsx + +cluster = aws.ecs.Cluster("cluster") +lb = awsx.lb.ApplicationLoadBalancer("lb") +service = awsx.ecs.FargateService("service", + cluster=cluster.arn, + assign_public_ip=True, + desired_count=2, + task_definition_args=awsx.ecs.FargateServiceTaskDefinitionArgs( + container=awsx.ecs.TaskDefinitionContainerDefinitionArgs( + image="nginx:latest", + cpu=512, + memory=128, + essential=True, + port_mappings=[awsx.ecs.TaskDefinitionPortMappingArgs( + target_group=lb.default_target_group, + )], + ), + )) +pulumi.export("url", lb.load_balancer.dns_name) +``` + +{{% /choosable %}} + +{{% choosable language go %}} + +```go +package main + +import ( + "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs" + xecs "github.com/pulumi/pulumi-awsx/sdk/go/awsx/ecs" + "github.com/pulumi/pulumi-awsx/sdk/go/awsx/lb" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + cluster, err := ecs.NewCluster(ctx, "cluster", nil) + if err != nil { + return err + } + lb, err := lb.NewApplicationLoadBalancer(ctx, "lb", nil) + if err != nil { + return err + } + + tdpma := xecs.TaskDefinitionPortMappingArray{ + xecs.TaskDefinitionPortMappingArgs{ + TargetGroup: lb.DefaultTargetGroup, + }, + } + + _, err = xecs.NewFargateService(ctx, "service", &xecs.FargateServiceArgs{ + Cluster: cluster.Arn, + AssignPublicIp: pulumi.Bool(true), + DesiredCount: pulumi.Int(2), + TaskDefinitionArgs: &xecs.FargateServiceTaskDefinitionArgs{ + Container: &xecs.TaskDefinitionContainerDefinitionArgs{ + Image: pulumi.String("nginx:latest"), + Cpu: pulumi.Int(512), + Memory: pulumi.Int(128), + Essential: pulumi.Bool(true), + PortMappings: tdpma, + }, + }, + }) + + if err != nil { + return err + } + ctx.Export("url", lb.LoadBalancer.DnsName()) + return nil + }) +} +``` + +{{% /choosable %}} + +{{% choosable language csharp %}} + +```csharp +using System.Collections.Generic; +using Pulumi; +using Aws = Pulumi.Aws; +using Awsx = Pulumi.Awsx; + +return await Deployment.RunAsync(() => +{ + var cluster = new Aws.Ecs.Cluster("cluster"); + + var lb = new Awsx.Lb.ApplicationLoadBalancer("lb"); + + var service = new Awsx.Ecs.FargateService("service", new() + { + Cluster = cluster.Arn, + AssignPublicIp = true, + DesiredCount = 2, + TaskDefinitionArgs = new Awsx.Ecs.Inputs.FargateServiceTaskDefinitionArgs + { + Container = new Awsx.Ecs.Inputs.TaskDefinitionContainerDefinitionArgs + { + Image = "nginx:latest", + Cpu = 512, + Memory = 128, + Essential = true, + PortMappings = new[] + { + new Awsx.Ecs.Inputs.TaskDefinitionPortMappingArgs + { + TargetGroup = lb.DefaultTargetGroup, + }, + }, + }, + }, + }); + + return new Dictionary + { + ["url"] = lb.LoadBalancer.Apply(loadBalancer => loadBalancer.DnsName), + }; +}); +``` + +{{% /choosable %}} + +{{% choosable language java %}} + +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.aws.ecs.Cluster; +import com.pulumi.awsx.lb.ApplicationLoadBalancer; +import com.pulumi.awsx.ecs.FargateService; +import com.pulumi.awsx.ecs.FargateServiceArgs; +import com.pulumi.awsx.ecs.inputs.FargateServiceTaskDefinitionArgs; +import com.pulumi.awsx.ecs.inputs.TaskDefinitionContainerDefinitionArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var cluster = new Cluster("cluster"); + + var lb = new ApplicationLoadBalancer("lb"); + + var service = new FargateService("service", FargateServiceArgs.builder() + .cluster(cluster.arn()) + .assignPublicIp(true) + .desiredCount(2) + .taskDefinitionArgs(FargateServiceTaskDefinitionArgs.builder() + .container(TaskDefinitionContainerDefinitionArgs.builder() + .image("nginx:latest") + .cpu(512) + .memory(128) + .essential(true) + .portMappings(TaskDefinitionPortMappingArgs.builder() + .targetGroup(lb.defaultTargetGroup()) + .build()) + .build()) + .build()) + .build()); + + ctx.export("url", lb.loadBalancer().applyValue(loadBalancer -> loadBalancer.dnsName())); + } +} +``` + +{{% /choosable %}} + +{{% choosable language yaml %}} + +```yaml +resources: + cluster: + type: aws:ecs:Cluster + lb: + type: awsx:lb:ApplicationLoadBalancer + service: + type: awsx:ecs:FargateService + properties: + cluster: ${cluster.arn} + assignPublicIp: true + desiredCount: 2 + taskDefinitionArgs: + container: + image: nginx:latest + cpu: 512 + memory: 128 + essential: true + portMappings: + - targetGroup: ${lb.defaultTargetGroup} +outputs: + url: ${lb.loadBalancer.dnsName} +``` + +{{% /choosable %}} After deploying this program, `pulumi stack output url` can be used to access the Url output property. We can then access our NGINX web server behind our load balancer via curl: @@ -83,7 +327,312 @@ To create an ECS service inside of a VPC, we will first create or use an existin described in [Pulumi Crosswalk for AWS VPC](/docs/clouds/aws/guides/vpc/). Then we pass the subnets from that VPC into the network configuration argument for our cluster: -{{< example-program path="awsx-vpc-fargate-service" >}} +{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} + +{{% choosable language "javascript,typescript" %}} + +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as aws from "@pulumi/aws"; +import * as awsx from "@pulumi/awsx"; + +const vpc = new awsx.ec2.Vpc("vpc", {}); +const securityGroup = new aws.ec2.SecurityGroup("securityGroup", { + vpcId: vpc.vpcId, + egress: [{ + fromPort: 0, + toPort: 0, + protocol: "-1", + cidrBlocks: ["0.0.0.0/0"], + ipv6CidrBlocks: ["::/0"], + }], +}); +const cluster = new aws.ecs.Cluster("cluster", {}); +const service = new awsx.ecs.FargateService("service", { + cluster: cluster.arn, + networkConfiguration: { + subnets: vpc.privateSubnetIds, + securityGroups: [securityGroup.id], + }, + desiredCount: 2, + taskDefinitionArgs: { + container: { + image: "nginx:latest", + cpu: 512, + memory: 128, + essential: true, + }, + }, +}); +``` + +{{% /choosable %}} + +{{% choosable language python %}} + +```python +import pulumi +import pulumi_aws as aws +import pulumi_awsx as awsx + +vpc = awsx.ec2.Vpc("vpc") +security_group = aws.ec2.SecurityGroup("securityGroup", + vpc_id=vpc.vpc_id, + egress=[aws.ec2.SecurityGroupEgressArgs( + from_port=0, + to_port=0, + protocol="-1", + cidr_blocks=["0.0.0.0/0"], + ipv6_cidr_blocks=["::/0"], + )]) +cluster = aws.ecs.Cluster("cluster") +service = awsx.ecs.FargateService("service", + cluster=cluster.arn, + network_configuration=aws.ecs.ServiceNetworkConfigurationArgs( + subnets=vpc.private_subnet_ids, + security_groups=[security_group.id] + ), + desired_count=2, + task_definition_args=awsx.ecs.FargateServiceTaskDefinitionArgs( + container=awsx.ecs.TaskDefinitionContainerDefinitionArgs( + image="nginx:latest", + cpu=512, + memory=128, + essential=True, + ), + )) +``` + +{{% /choosable %}} + +{{% choosable language go %}} + +```go +package main + +import ( + "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2" + "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ecs" + xec2 "github.com/pulumi/pulumi-awsx/sdk/go/awsx/ec2" + xecs "github.com/pulumi/pulumi-awsx/sdk/go/awsx/ecs" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + vpc, err := xec2.NewVpc(ctx, "vpc", nil) + if err != nil { + return err + } + securityGroup, err := ec2.NewSecurityGroup(ctx, "securityGroup", &ec2.SecurityGroupArgs{ + VpcId: vpc.VpcId, + Egress: ec2.SecurityGroupEgressArray{ + &ec2.SecurityGroupEgressArgs{ + FromPort: pulumi.Int(0), + ToPort: pulumi.Int(0), + Protocol: pulumi.String("-1"), + CidrBlocks: pulumi.StringArray{ + pulumi.String("0.0.0.0/0"), + }, + Ipv6CidrBlocks: pulumi.StringArray{ + pulumi.String("::/0"), + }, + }, + }, + }) + if err != nil { + return err + } + cluster, err := ecs.NewCluster(ctx, "cluster", nil) + if err != nil { + return err + } + _, err = xecs.NewFargateService(ctx, "service", &xecs.FargateServiceArgs{ + Cluster: cluster.Arn, + NetworkConfiguration: &ecs.ServiceNetworkConfigurationArgs{ + Subnets: vpc.PrivateSubnetIds, + SecurityGroups: pulumi.StringArray{ + securityGroup.ID(), + }, + }, + DesiredCount: pulumi.Int(2), + TaskDefinitionArgs: &xecs.FargateServiceTaskDefinitionArgs{ + Container: &xecs.TaskDefinitionContainerDefinitionArgs{ + Image: pulumi.String("nginx:latest"), + Cpu: pulumi.Int(512), + Memory: pulumi.Int(128), + Essential: pulumi.Bool(true), + }, + }, + }) + if err != nil { + return err + } + return nil + }) +} +``` + +{{% /choosable %}} + +{{% choosable language csharp %}} + +```csharp +using System.Collections.Generic; +using Pulumi; +using Aws = Pulumi.Aws; +using Awsx = Pulumi.Awsx; + +return await Deployment.RunAsync(() => +{ + var vpc = new Awsx.Ec2.Vpc("vpc"); + + var securityGroup = new Aws.Ec2.SecurityGroup("securityGroup", new() + { + VpcId = vpc.VpcId, + Egress = new[] + { + new Aws.Ec2.Inputs.SecurityGroupEgressArgs + { + FromPort = 0, + ToPort = 0, + Protocol = "-1", + CidrBlocks = new[] + { + "0.0.0.0/0", + }, + Ipv6CidrBlocks = new[] + { + "::/0", + }, + }, + }, + }); + + var cluster = new Aws.Ecs.Cluster("cluster"); + + var service = new Awsx.Ecs.FargateService("service", new() + { + Cluster = cluster.Arn, + NetworkConfiguration = new Aws.Ecs.Inputs.ServiceNetworkConfigurationArgs + { + Subnets = vpc.PrivateSubnetIds, + SecurityGroups = new[] + { + securityGroup.Id, + }, + }, + DesiredCount = 2, + TaskDefinitionArgs = new Awsx.Ecs.Inputs.FargateServiceTaskDefinitionArgs + { + Container = new Awsx.Ecs.Inputs.TaskDefinitionContainerDefinitionArgs + { + Image = "nginx:latest", + Cpu = 512, + Memory = 128, + Essential = true, + }, + }, + }); + +}); +``` + +{{% /choosable %}} + +{{% choosable language java %}} + +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.aws.ecs.Cluster; +import com.pulumi.awsx.lb.ApplicationLoadBalancer; +import com.pulumi.awsx.ecs.FargateService; +import com.pulumi.awsx.ecs.FargateServiceArgs; +import com.pulumi.awsx.ecs.inputs.FargateServiceTaskDefinitionArgs; +import com.pulumi.awsx.ecs.inputs.TaskDefinitionContainerDefinitionArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var cluster = new Cluster("cluster"); + + var lb = new ApplicationLoadBalancer("lb"); + + var service = new FargateService("service", FargateServiceArgs.builder() + .cluster(cluster.arn()) + .assignPublicIp(true) + .desiredCount(2) + .taskDefinitionArgs(FargateServiceTaskDefinitionArgs.builder() + .container(TaskDefinitionContainerDefinitionArgs.builder() + .image("nginx:latest") + .cpu(512) + .memory(128) + .essential(true) + .portMappings(TaskDefinitionPortMappingArgs.builder() + .targetGroup(lb.defaultTargetGroup()) + .build()) + .build()) + .build()) + .build()); + + ctx.export("url", lb.loadBalancer().applyValue(loadBalancer -> loadBalancer.dnsName())); + } +} +``` + +{{% /choosable %}} + +{{% choosable language yaml %}} + +```yaml +resources: + vpc: + type: awsx:ec2:Vpc + securityGroup: + type: aws:ec2:SecurityGroup + properties: + vpcId: ${vpc.vpcId} + egress: + - fromPort: 0 + toPort: 0 + protocol: -1 + cidrBlocks: + - 0.0.0.0/0 + ipv6CidrBlocks: + - "::/0" + cluster: + type: aws:ecs:Cluster + service: + type: awsx:ecs:FargateService + properties: + cluster: ${cluster.arn} + networkConfiguration: + subnets: ${vpc.privateSubnetIds} + securityGroups: + - ${securityGroup.id} + desiredCount: 2 + taskDefinitionArgs: + container: + image: nginx:latest + cpu: 512 + memory: 128 + essential: true +``` + +{{% /choosable %}} When using a custom VPC, you will also need to specify your own security groups if you need to allow ingress or egress. @@ -114,8 +663,292 @@ it separately ahead of time. This makes it very easy to use private registration For example, specifying a `path` will run a `docker build` in that path, push the result up to the ECR repository that specified in the first argument, and then pass the private ECR repository path to the container: +{{< chooser language "typescript,python,go,csharp,java,yaml" / >}} + +{{% choosable language "javascript,typescript" %}} + +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as aws from "@pulumi/aws"; +import * as awsx from "@pulumi/awsx"; + +const repository = new awsx.ecr.Repository("repository", {}); +const image = new awsx.ecr.Image("image", { + repositoryUrl: repository.url, + path: "./app", +}); +const cluster = new aws.ecs.Cluster("cluster", {}); +const lb = new awsx.lb.ApplicationLoadBalancer("lb", {}); +const service = new awsx.ecs.FargateService("service", { + cluster: cluster.arn, + assignPublicIp: true, + taskDefinitionArgs: { + container: { + image: image.imageUri, + cpu: 512, + memory: 128, + essential: true, + portMappings: [{ + targetGroup: lb.defaultTargetGroup, + }], + }, + }, +}); +export const url = lb.loadBalancer.dnsName; +``` + +{{% /choosable %}} + +{{% choosable language python %}} + +```python +import pulumi +import pulumi_aws as aws +import pulumi_awsx as awsx + +repository = awsx.ecr.Repository("repository") +image = awsx.ecr.Image("image", + repository_url=repository.url, + path="./app") +cluster = aws.ecs.Cluster("cluster") +lb = awsx.lb.ApplicationLoadBalancer("lb") +service = awsx.ecs.FargateService("service", + cluster=cluster.arn, + assign_public_ip=True, + task_definition_args=awsx.ecs.FargateServiceTaskDefinitionArgs( + container=awsx.ecs.TaskDefinitionContainerDefinitionArgs( + image=image.image_uri, + cpu=512, + memory=128, + essential=True, + port_mappings=[awsx.ecs.TaskDefinitionPortMappingArgs( + target_group=lb.default_target_group, + )], + ), + )) +pulumi.export("url", lb.load_balancer.dns_name) +``` + +{{% /choosable %}} + +{{% choosable language go %}} + +```go +package main + +import ( + "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ecs" + "github.com/pulumi/pulumi-awsx/sdk/go/awsx/ecr" + xecs "github.com/pulumi/pulumi-awsx/sdk/go/awsx/ecs" + "github.com/pulumi/pulumi-awsx/sdk/go/awsx/lb" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + repository, err := ecr.NewRepository(ctx, "repository", nil) + if err != nil { + return err + } + + image, err := ecr.NewImage(ctx, "image", &ecr.ImageArgs{ + RepositoryUrl: repository.Url, + }) + if err != nil { + return err + } + + cluster, err := ecs.NewCluster(ctx, "cluster", nil) + if err != nil { + return err + } + + lb, err := lb.NewApplicationLoadBalancer(ctx, "lb", nil) + if err != nil { + return err + } + + tdpma := xecs.TaskDefinitionPortMappingArray{ + xecs.TaskDefinitionPortMappingArgs{ + TargetGroup: lb.DefaultTargetGroup, + }, + } + _, err = xecs.NewFargateService(ctx, "service", &xecs.FargateServiceArgs{ + Cluster: cluster.Arn, + AssignPublicIp: pulumi.Bool(true), + TaskDefinitionArgs: &xecs.FargateServiceTaskDefinitionArgs{ + Container: &xecs.TaskDefinitionContainerDefinitionArgs{ + Image: image.ImageUri, + Cpu: pulumi.Int(512), + Memory: pulumi.Int(128), + Essential: pulumi.Bool(true), + PortMappings: tdpma, + }, + }, + }) + if err != nil { + return err + } + + ctx.Export("url", lb.LoadBalancer.DnsName()) + return nil + }) +} +``` + +{{% /choosable %}} + +{{% choosable language csharp %}} + +```csharp +using System.Collections.Generic; +using Pulumi; +using Aws = Pulumi.Aws; +using Awsx = Pulumi.Awsx; + +return await Deployment.RunAsync(() => +{ + var repository = new Awsx.Ecr.Repository("repository"); + + var image = new Awsx.Ecr.Image("image", new() + { + RepositoryUrl = repository.Url, + Path = "./app", + }); + + var cluster = new Aws.Ecs.Cluster("cluster"); + + var lb = new Awsx.Lb.ApplicationLoadBalancer("lb"); + + var service = new Awsx.Ecs.FargateService("service", new() + { + Cluster = cluster.Arn, + AssignPublicIp = true, + TaskDefinitionArgs = new Awsx.Ecs.Inputs.FargateServiceTaskDefinitionArgs + { + Container = new Awsx.Ecs.Inputs.TaskDefinitionContainerDefinitionArgs + { + Image = image.ImageUri, + Cpu = 512, + Memory = 128, + Essential = true, + PortMappings = new[] + { + new Awsx.Ecs.Inputs.TaskDefinitionPortMappingArgs + { + TargetGroup = lb.DefaultTargetGroup, + }, + }, + }, + }, + }); + + return new Dictionary + { + ["url"] = lb.LoadBalancer.Apply(loadBalancer => loadBalancer.DnsName), + }; +}); +``` + +{{% /choosable %}} + +{{% choosable language java %}} + +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.awsx.ecr.Repository; +import com.pulumi.awsx.ecr.Image; +import com.pulumi.awsx.ecr.ImageArgs; +import com.pulumi.aws.ecs.Cluster; +import com.pulumi.awsx.lb.ApplicationLoadBalancer; +import com.pulumi.awsx.ecs.FargateService; +import com.pulumi.awsx.ecs.FargateServiceArgs; +import com.pulumi.awsx.ecs.inputs.FargateServiceTaskDefinitionArgs; +import com.pulumi.awsx.ecs.inputs.TaskDefinitionContainerDefinitionArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var repository = new Repository("repository"); + + var image = new Image("image", ImageArgs.builder() + .repositoryUrl(repository.url()) + .path("./app") + .build()); + + var cluster = new Cluster("cluster"); + + var lb = new ApplicationLoadBalancer("lb"); + + var service = new FargateService("service", FargateServiceArgs.builder() + .cluster(cluster.arn()) + .assignPublicIp(true) + .taskDefinitionArgs(FargateServiceTaskDefinitionArgs.builder() + .container(TaskDefinitionContainerDefinitionArgs.builder() + .image(image.imageUri()) + .cpu(512) + .memory(128) + .essential(true) + .portMappings(TaskDefinitionPortMappingArgs.builder() + .targetGroup(lb.defaultTargetGroup()) + .build()) + .build()) + .build()) + .build()); + + ctx.export("url", lb.loadBalancer().applyValue(loadBalancer -> loadBalancer.dnsName())); + } +} +``` + +{{% /choosable %}} + +{{% choosable language yaml %}} + +```yaml +resources: + repository: + type: awsx:ecr:Repository + image: + type: awsx:ecr:Image + properties: + repositoryUrl: ${repository.url} + path: "./app" + cluster: + type: aws:ecs:Cluster + lb: + type: awsx:lb:ApplicationLoadBalancer + service: + type: awsx:ecs:FargateService + properties: + cluster: ${cluster.arn} + assignPublicIp: true + taskDefinitionArgs: + container: + image: ${image.imageUri} + cpu: 512 + memory: 128 + essential: true + portMappings: + - targetGroup: ${lb.defaultTargetGroup} +outputs: + url: ${lb.loadBalancer.dnsName} +``` -{{< example-program path="awsx-load-balanced-fargate-ecr" >}} +{{% /choosable %}} For more information about using ECR, refer to [Pulumi Crosswalk for AWS ECR](/docs/clouds/aws/guides/ecr/). diff --git a/themes/default/layouts/shortcodes/example-program-snippet.html b/themes/default/layouts/shortcodes/example-program-snippet.html deleted file mode 100644 index cf61bb04823..00000000000 --- a/themes/default/layouts/shortcodes/example-program-snippet.html +++ /dev/null @@ -1,44 +0,0 @@ -{{- $path := .Get "path" -}} -{{- $language := .Get "language" -}} -{{- $from := .Get "from" -}} -{{- $to := .Get "to" -}} -{{- $program := "" -}} -{{- $depfile := "" -}} -{{- $deplang := "" -}} -{{- if eq $language "javascript" -}} - {{- $program = "index.js" -}} - {{- $depfile = "package.json" -}} - {{- $deplang = "json" -}} -{{- else if eq $language "typescript" -}} - {{- $program = "index.ts" -}} - {{- $depfile = "package.json" -}} - {{- $deplang = "json" -}} -{{- else if eq $language "python" -}} - {{- $program = "__main__.py" -}} - {{- $depfile = "requirements.txt" -}} - {{- $deplang = "plain" -}} -{{- else if eq $language "go" -}} - {{- $program = "main.go" -}} - {{- $depfile = "go.mod" -}} - {{- $deplang = "bash" -}} -{{- else if eq $language "csharp" -}} - {{- $program = "Program.cs" -}} - {{- $depfile = printf "%s.csproj" (printf "%s-%s" $path $language) -}} - {{- $deplang = "xml" -}} -{{- else if eq $language "java" -}} - {{- $program = "src/main/java/myproject/App.java" -}} - {{- $depfile = "pom.xml" -}} - {{- $deplang = "xml" -}} -{{- else if eq $language "yaml" -}} - {{- $program = "Pulumi.yaml" -}} -{{- end -}} -{{- $file := readFile (path.Join "static" "programs" (printf "%s-%s" $path $language) $program) -}} -{{- if and (ne $from "") (ne $to "") -}} - {{- $lines := split $file "\n" -}} - {{- $toEnd := after (sub (int $from) 1) $lines -}} - {{- $lineCount := add (sub (int $to) (int $from)) 1 -}} - {{- $toTo := first $lineCount $toEnd -}} - {{- delimit $toTo "\n" -}} -{{- else -}} - {{- $file -}} -{{- end -}} diff --git a/themes/default/static/programs/.gitignore b/themes/default/static/programs/.gitignore deleted file mode 100644 index 25a0ccf643d..00000000000 --- a/themes/default/static/programs/.gitignore +++ /dev/null @@ -1,370 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding add-in -.JustCode - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc -venv/ - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Java artifacts. -maven-status -target/ - -# Nested .gitignores. -/**/.gitignore -!.gitignore - -# Lockfiles. -go.sum -package-lock.json -yarn.lock - -# Stack config files. -Pulumi.*.yaml diff --git a/themes/default/static/programs/awsx-ecr-eks-deployment-service-csharp/Program.cs b/themes/default/static/programs/awsx-ecr-eks-deployment-service-csharp/Program.cs deleted file mode 100644 index a91750d9665..00000000000 --- a/themes/default/static/programs/awsx-ecr-eks-deployment-service-csharp/Program.cs +++ /dev/null @@ -1,121 +0,0 @@ -using System.Collections.Generic; -using Pulumi; -using Awsx = Pulumi.Awsx; -using Eks = Pulumi.Eks; -using Kubernetes = Pulumi.Kubernetes; - -return await Deployment.RunAsync(() => -{ - var appName = "my-app"; - - var repository = new Awsx.Ecr.Repository("repository", new() - { - ForceDelete = true, - }); - - var image = new Awsx.Ecr.Image("image", new() - { - RepositoryUrl = repository.Url, - Context = "./app", - Platform = "linux/amd64", - }); - - var cluster = new Eks.Cluster("cluster"); - - var clusterProvider = new Kubernetes.Provider("clusterProvider", new() - { - KubeConfig = cluster.KubeconfigJson, - EnableServerSideApply = true, - }); - - var deployment = new Kubernetes.Apps.V1.Deployment("deployment", new() - { - Metadata = new Kubernetes.Types.Inputs.Meta.V1.ObjectMetaArgs - { - Labels = - { - { "appClass", appName }, - }, - }, - Spec = new Kubernetes.Types.Inputs.Apps.V1.DeploymentSpecArgs - { - Replicas = 2, - Selector = new Kubernetes.Types.Inputs.Meta.V1.LabelSelectorArgs - { - MatchLabels = - { - { "appClass", appName }, - }, - }, - Template = new Kubernetes.Types.Inputs.Core.V1.PodTemplateSpecArgs - { - Metadata = new Kubernetes.Types.Inputs.Meta.V1.ObjectMetaArgs - { - Labels = - { - { "appClass", appName }, - }, - }, - Spec = new Kubernetes.Types.Inputs.Core.V1.PodSpecArgs - { - Containers = new[] - { - new Kubernetes.Types.Inputs.Core.V1.ContainerArgs - { - Name = appName, - Image = image.ImageUri, - Ports = new[] - { - new Kubernetes.Types.Inputs.Core.V1.ContainerPortArgs - { - Name = "http", - ContainerPortValue = 80, - }, - }, - }, - }, - }, - }, - }, - }, new CustomResourceOptions - { - Provider = clusterProvider, - }); - - var service = new Kubernetes.Core.V1.Service("service", new() - { - Metadata = new Kubernetes.Types.Inputs.Meta.V1.ObjectMetaArgs - { - Labels = - { - { "appClass", appName }, - }, - }, - Spec = new Kubernetes.Types.Inputs.Core.V1.ServiceSpecArgs - { - Type = "LoadBalancer", - Selector = - { - { "appClass", appName }, - }, - Ports = new[] - { - new Kubernetes.Types.Inputs.Core.V1.ServicePortArgs - { - Port = 80, - TargetPort = "http", - }, - }, - }, - }, new CustomResourceOptions - { - Provider = clusterProvider, - }); - - var hostname = service.Status.Apply(status => status.LoadBalancer.Ingress[0].Hostname); - - return new Dictionary - { - ["url"] = Output.Format($"http://{hostname}"), - }; -}); diff --git a/themes/default/static/programs/awsx-ecr-eks-deployment-service-csharp/Pulumi.yaml b/themes/default/static/programs/awsx-ecr-eks-deployment-service-csharp/Pulumi.yaml deleted file mode 100644 index 1a3e4a785e8..00000000000 --- a/themes/default/static/programs/awsx-ecr-eks-deployment-service-csharp/Pulumi.yaml +++ /dev/null @@ -1,2 +0,0 @@ -name: awsx-ecr-eks-deployment-service-csharp -runtime: dotnet diff --git a/themes/default/static/programs/awsx-ecr-eks-deployment-service-csharp/app/Dockerfile b/themes/default/static/programs/awsx-ecr-eks-deployment-service-csharp/app/Dockerfile deleted file mode 100644 index 007148685f1..00000000000 --- a/themes/default/static/programs/awsx-ecr-eks-deployment-service-csharp/app/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM nginx \ No newline at end of file diff --git a/themes/default/static/programs/awsx-ecr-eks-deployment-service-csharp/awsx-ecr-eks-deployment-service-csharp.csproj b/themes/default/static/programs/awsx-ecr-eks-deployment-service-csharp/awsx-ecr-eks-deployment-service-csharp.csproj deleted file mode 100644 index c240a9cdf55..00000000000 --- a/themes/default/static/programs/awsx-ecr-eks-deployment-service-csharp/awsx-ecr-eks-deployment-service-csharp.csproj +++ /dev/null @@ -1,17 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - - - - diff --git a/themes/default/static/programs/awsx-ecr-eks-deployment-service-go/Pulumi.yaml b/themes/default/static/programs/awsx-ecr-eks-deployment-service-go/Pulumi.yaml deleted file mode 100644 index 787a3e6b0bf..00000000000 --- a/themes/default/static/programs/awsx-ecr-eks-deployment-service-go/Pulumi.yaml +++ /dev/null @@ -1,2 +0,0 @@ -name: awsx-ecr-eks-deployment-service-go -runtime: go diff --git a/themes/default/static/programs/awsx-ecr-eks-deployment-service-go/go.mod b/themes/default/static/programs/awsx-ecr-eks-deployment-service-go/go.mod deleted file mode 100644 index 8c1f065a814..00000000000 --- a/themes/default/static/programs/awsx-ecr-eks-deployment-service-go/go.mod +++ /dev/null @@ -1,97 +0,0 @@ -module awsx-ecr-eks-deployment-service-yaml - -go 1.21 - -toolchain go1.21.0 - -require ( - github.com/pulumi/pulumi-awsx/sdk/v2 v2.2.0 - github.com/pulumi/pulumi-eks/sdk/v2 v2.0.0 - github.com/pulumi/pulumi-kubernetes/sdk/v4 v4.5.4 - github.com/pulumi/pulumi/sdk/v3 v3.92.0 -) - -require ( - dario.cat/mergo v1.0.0 // indirect - github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect - github.com/acomagu/bufpipe v1.0.4 // indirect - github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect - github.com/agext/levenshtein v1.2.3 // indirect - github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect - github.com/atotto/clipboard v0.1.4 // indirect - github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect - github.com/blang/semver v3.5.1+incompatible // indirect - github.com/charmbracelet/bubbles v0.16.1 // indirect - github.com/charmbracelet/bubbletea v0.24.2 // indirect - github.com/charmbracelet/lipgloss v0.7.1 // indirect - github.com/cheggaaa/pb v1.0.29 // indirect - github.com/cloudflare/circl v1.3.3 // indirect - github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect - github.com/cyphar/filepath-securejoin v0.2.4 // indirect - github.com/djherbis/times v1.5.0 // indirect - github.com/emirpasic/gods v1.18.1 // indirect - github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect - github.com/go-git/go-billy/v5 v5.5.0 // indirect - github.com/go-git/go-git/v5 v5.9.0 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.1.0 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/hcl/v2 v2.17.0 // indirect - github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/lucasb-eyer/go-colorful v1.2.0 // indirect - github.com/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-localereader v0.0.1 // indirect - github.com/mattn/go-runewidth v0.0.14 // indirect - github.com/mitchellh/go-ps v1.0.0 // indirect - github.com/mitchellh/go-wordwrap v1.0.1 // indirect - github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b // indirect - github.com/muesli/cancelreader v0.2.2 // indirect - github.com/muesli/reflow v0.3.0 // indirect - github.com/muesli/termenv v0.15.1 // indirect - github.com/opentracing/basictracer-go v1.1.0 // indirect - github.com/opentracing/opentracing-go v1.2.0 // indirect - github.com/pjbgf/sha1cd v0.3.0 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/pkg/term v1.1.0 // indirect - github.com/pulumi/esc v0.5.6 // indirect - github.com/pulumi/pulumi-aws/sdk/v6 v6.7.0 // indirect - github.com/pulumi/pulumi-docker/sdk/v4 v4.4.3 // indirect - github.com/rivo/uniseg v0.4.4 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect - github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect - github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 // indirect - github.com/sergi/go-diff v1.3.1 // indirect - github.com/skeema/knownhosts v1.2.0 // indirect - github.com/spf13/cobra v1.7.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/texttheater/golang-levenshtein v1.0.1 // indirect - github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect - github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect - github.com/uber/jaeger-lib v2.4.1+incompatible // indirect - github.com/xanzy/ssh-agent v0.3.3 // indirect - github.com/zclconf/go-cty v1.13.2 // indirect - go.uber.org/atomic v1.9.0 // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect - golang.org/x/mod v0.13.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/sync v0.4.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect - golang.org/x/tools v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d // indirect - google.golang.org/grpc v1.57.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/warnings.v0 v0.1.2 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect - lukechampine.com/frand v1.4.2 // indirect - sourcegraph.com/sourcegraph/appdash v0.0.0-20211028080628-e2786a622600 // indirect -) diff --git a/themes/default/static/programs/awsx-ecr-eks-deployment-service-go/main.go b/themes/default/static/programs/awsx-ecr-eks-deployment-service-go/main.go deleted file mode 100644 index 9d462ae84a3..00000000000 --- a/themes/default/static/programs/awsx-ecr-eks-deployment-service-go/main.go +++ /dev/null @@ -1,114 +0,0 @@ -package main - -import ( - "github.com/pulumi/pulumi-awsx/sdk/v2/go/awsx/ecr" - "github.com/pulumi/pulumi-eks/sdk/v2/go/eks" - "github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes" - appsv1 "github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/apps/v1" - corev1 "github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/core/v1" - metav1 "github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/meta/v1" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - appName := "my-app" - - repository, err := ecr.NewRepository(ctx, "repository", &ecr.RepositoryArgs{ - ForceDelete: pulumi.Bool(true), - }) - if err != nil { - return err - } - - image, err := ecr.NewImage(ctx, "image", &ecr.ImageArgs{ - RepositoryUrl: repository.Url, - Context: pulumi.String("./app"), - Platform: pulumi.String("linux/amd64"), - }) - if err != nil { - return err - } - - cluster, err := eks.NewCluster(ctx, "cluster", nil) - if err != nil { - return err - } - - clusterProvider, err := kubernetes.NewProvider(ctx, "clusterProvider", &kubernetes.ProviderArgs{ - Kubeconfig: cluster.KubeconfigJson, - EnableServerSideApply: pulumi.Bool(true), - }) - if err != nil { - return err - } - - _, err = appsv1.NewDeployment(ctx, "deployment", &appsv1.DeploymentArgs{ - Metadata: &metav1.ObjectMetaArgs{ - Labels: pulumi.StringMap{ - "appClass": pulumi.String(appName), - }, - }, - Spec: &appsv1.DeploymentSpecArgs{ - Replicas: pulumi.Int(2), - Selector: &metav1.LabelSelectorArgs{ - MatchLabels: pulumi.StringMap{ - "appClass": pulumi.String(appName), - }, - }, - Template: &corev1.PodTemplateSpecArgs{ - Metadata: &metav1.ObjectMetaArgs{ - Labels: pulumi.StringMap{ - "appClass": pulumi.String(appName), - }, - }, - Spec: &corev1.PodSpecArgs{ - Containers: corev1.ContainerArray{ - &corev1.ContainerArgs{ - Name: pulumi.String(appName), - Image: image.ImageUri, - Ports: corev1.ContainerPortArray{ - &corev1.ContainerPortArgs{ - Name: pulumi.String("http"), - ContainerPort: pulumi.Int(80), - }, - }, - }, - }, - }, - }, - }, - }, pulumi.Provider(clusterProvider)) - if err != nil { - return err - } - - service, err := corev1.NewService(ctx, "service", &corev1.ServiceArgs{ - Metadata: &metav1.ObjectMetaArgs{ - Labels: pulumi.StringMap{ - "appClass": pulumi.String(appName), - }, - }, - Spec: &corev1.ServiceSpecArgs{ - Type: pulumi.String("LoadBalancer"), - Selector: pulumi.StringMap{ - "appClass": pulumi.String(appName), - }, - Ports: corev1.ServicePortArray{ - &corev1.ServicePortArgs{ - Port: pulumi.Int(80), - TargetPort: pulumi.Any("http"), - }, - }, - }, - }, pulumi.Provider(clusterProvider)) - if err != nil { - return err - } - - hostname := service.Status.LoadBalancer().Ingress().Index(pulumi.Int(0)).Hostname().Elem() - ctx.Export("url", pulumi.Sprintf("http://%s", hostname)) - - return nil - }) -} diff --git a/themes/default/static/programs/awsx-ecr-eks-deployment-service-java/Pulumi.yaml b/themes/default/static/programs/awsx-ecr-eks-deployment-service-java/Pulumi.yaml deleted file mode 100644 index 25e7df35300..00000000000 --- a/themes/default/static/programs/awsx-ecr-eks-deployment-service-java/Pulumi.yaml +++ /dev/null @@ -1,2 +0,0 @@ -name: awsx-ecr-eks-deployment-service-java -runtime: java diff --git a/themes/default/static/programs/awsx-ecr-eks-deployment-service-java/app/Dockerfile b/themes/default/static/programs/awsx-ecr-eks-deployment-service-java/app/Dockerfile deleted file mode 100644 index 007148685f1..00000000000 --- a/themes/default/static/programs/awsx-ecr-eks-deployment-service-java/app/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM nginx \ No newline at end of file diff --git a/themes/default/static/programs/awsx-ecr-eks-deployment-service-java/pom.xml b/themes/default/static/programs/awsx-ecr-eks-deployment-service-java/pom.xml deleted file mode 100644 index a75a8e78bcb..00000000000 --- a/themes/default/static/programs/awsx-ecr-eks-deployment-service-java/pom.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - 4.0.0 - - com.pulumi - awsx-ecr-eks-deployment-service-java - 1.0-SNAPSHOT - - - UTF-8 - 11 - 11 - 11 - myproject.App - - - - - - com.pulumi - pulumi - (,1.0] - - - com.pulumi - aws - (6.0.2,6.99] - - - com.pulumi - awsx - (2.0.0,2.99] - - - com.pulumi - eks - (2.0.0,2.99] - - - com.pulumi - kubernetes - (4.0.0,4.99] - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.2 - - - - true - ${mainClass} - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.3.0 - - - - true - ${mainClass} - - - - jar-with-dependencies - - - - - make-my-jar-with-dependencies - package - - single - - - - - - org.codehaus.mojo - exec-maven-plugin - 3.0.0 - - ${mainClass} - ${mainArgs} - - - - org.apache.maven.plugins - maven-wrapper-plugin - 3.1.0 - - 3.8.5 - - - - - diff --git a/themes/default/static/programs/awsx-ecr-eks-deployment-service-java/src/main/java/myproject/App.java b/themes/default/static/programs/awsx-ecr-eks-deployment-service-java/src/main/java/myproject/App.java deleted file mode 100644 index 844cf7dfb67..00000000000 --- a/themes/default/static/programs/awsx-ecr-eks-deployment-service-java/src/main/java/myproject/App.java +++ /dev/null @@ -1,103 +0,0 @@ -package myproject; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.pulumi.awsx.ecr.Repository; -import com.pulumi.awsx.ecr.RepositoryArgs; -import com.pulumi.awsx.ecr.Image; -import com.pulumi.awsx.ecr.ImageArgs; -import com.pulumi.eks.Cluster; -import com.pulumi.kubernetes.Provider; -import com.pulumi.kubernetes.ProviderArgs; -import com.pulumi.kubernetes.apps.v1.Deployment; -import com.pulumi.kubernetes.apps.v1.DeploymentArgs; -import com.pulumi.kubernetes.meta.v1.inputs.ObjectMetaArgs; -import com.pulumi.kubernetes.apps.v1.inputs.DeploymentSpecArgs; -import com.pulumi.kubernetes.meta.v1.inputs.LabelSelectorArgs; -import com.pulumi.kubernetes.core.v1.inputs.PodTemplateSpecArgs; -import com.pulumi.kubernetes.core.v1.inputs.ServicePortArgs; -import com.pulumi.kubernetes.core.v1.inputs.ContainerArgs; -import com.pulumi.kubernetes.core.v1.inputs.ContainerPortArgs; -import com.pulumi.kubernetes.core.v1.inputs.PodSpecArgs; -import com.pulumi.kubernetes.core.v1.Service; -import com.pulumi.kubernetes.core.v1.ServiceArgs; -import com.pulumi.kubernetes.core.v1.inputs.ServiceSpecArgs; -import com.pulumi.resources.CustomResourceOptions; -import java.util.Map; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - final var appName = "my-app"; - - var repository = new Repository("repository", RepositoryArgs.builder() - .forceDelete(true) - .build()); - - var image = new Image("image", ImageArgs.builder() - .repositoryUrl(repository.url()) - .context("./app") - .platform("linux/amd64") - .build()); - - var cluster = new Cluster("cluster"); - - var clusterProvider = new Provider("clusterProvider", ProviderArgs.builder() - .kubeconfig(cluster.kubeconfigJson()) - .enableServerSideApply(true) - .build()); - - var deployment = new Deployment("deployment", DeploymentArgs.builder() - .metadata(ObjectMetaArgs.builder() - .labels(Map.of("appClass", appName)) - .build()) - .spec(DeploymentSpecArgs.builder() - .replicas(2) - .selector(LabelSelectorArgs.builder() - .matchLabels(Map.of("appClass", appName)) - .build()) - .template(PodTemplateSpecArgs.builder() - .metadata(ObjectMetaArgs.builder() - .labels(Map.of("appClass", appName)) - .build()) - .spec(PodSpecArgs.builder() - .containers(ContainerArgs.builder() - .name(appName) - .image(image.imageUri()) - .ports(ContainerPortArgs.builder() - .name("http") - .containerPort(80) - .build()) - .build()) - .build()) - .build()) - .build()) - .build(), CustomResourceOptions.builder() - .provider(clusterProvider) - .build()); - - var service = new Service("service", ServiceArgs.builder() - .metadata(ObjectMetaArgs.builder() - .labels(Map.of("appClass", appName)) - .build()) - .spec(ServiceSpecArgs.builder() - .type("LoadBalancer") - .selector(Map.of("appClass", appName)) - .ports(ServicePortArgs.builder() - .port(80) - .targetPort("http") - .build()) - .build()) - .build(), CustomResourceOptions.builder() - .provider(clusterProvider) - .build()); - - ctx.export("url", Output.format("http://%s", service.status().applyValue(status -> { - return status.get().loadBalancer().get().ingress().get(0).hostname().get(); - }))); - } -} diff --git a/themes/default/static/programs/awsx-ecr-eks-deployment-service-javascript/Pulumi.yaml b/themes/default/static/programs/awsx-ecr-eks-deployment-service-javascript/Pulumi.yaml deleted file mode 100644 index 8eb1f8d881a..00000000000 --- a/themes/default/static/programs/awsx-ecr-eks-deployment-service-javascript/Pulumi.yaml +++ /dev/null @@ -1,5 +0,0 @@ -name: awsx-ecr-eks-deployment-service-javascript -runtime: - name: nodejs - options: - typescript: false diff --git a/themes/default/static/programs/awsx-ecr-eks-deployment-service-javascript/index.js b/themes/default/static/programs/awsx-ecr-eks-deployment-service-javascript/index.js deleted file mode 100644 index c3867aa778c..00000000000 --- a/themes/default/static/programs/awsx-ecr-eks-deployment-service-javascript/index.js +++ /dev/null @@ -1,81 +0,0 @@ -"use strict"; -const pulumi = require("@pulumi/pulumi"); -const awsx = require("@pulumi/awsx"); -const eks = require("@pulumi/eks"); -const kubernetes = require("@pulumi/kubernetes"); - -const appName = "my-app"; - -const repository = new awsx.ecr.Repository("repository", { - forceDelete: true, -}); - -const image = new awsx.ecr.Image("image", { - repositoryUrl: repository.url, - context: "./app", - platform: "linux/amd64", -}); - -const cluster = new eks.Cluster("cluster"); - -const clusterProvider = new kubernetes.Provider("clusterProvider", { - kubeconfig: cluster.kubeconfig, - enableServerSideApply: true, -}); - -const deployment = new kubernetes.apps.v1.Deployment("deployment", { - metadata: { - labels: { - appClass: appName, - }, - }, - spec: { - replicas: 2, - selector: { - matchLabels: { - appClass: appName, - }, - }, - template: { - metadata: { - labels: { - appClass: appName, - }, - }, - spec: { - containers: [{ - name: appName, - image: image.imageUri, - ports: [{ - name: "http", - containerPort: 80, - }], - }], - }, - }, - }, -}, { - provider: clusterProvider, -}); - -const service = new kubernetes.core.v1.Service("service", { - metadata: { - labels: { - appClass: appName, - }, - }, - spec: { - type: "LoadBalancer", - selector: { - appClass: appName, - }, - ports: [{ - port: 80, - targetPort: "http", - }], - }, -}, { - provider: clusterProvider, -}); - -exports.url = service.status.apply(status => status?.loadBalancer?.ingress?.[0]?.hostname); diff --git a/themes/default/static/programs/awsx-ecr-eks-deployment-service-javascript/package.json b/themes/default/static/programs/awsx-ecr-eks-deployment-service-javascript/package.json deleted file mode 100644 index e05af511ac7..00000000000 --- a/themes/default/static/programs/awsx-ecr-eks-deployment-service-javascript/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "awsx-ecr-eks-deployment-service-javascript", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@pulumi/awsx": "^2.0.0", - "@pulumi/eks": "^2.0.0", - "@pulumi/kubernetes": "^4.0.0" - } -} diff --git a/themes/default/static/programs/awsx-ecr-eks-deployment-service-python/Pulumi.yaml b/themes/default/static/programs/awsx-ecr-eks-deployment-service-python/Pulumi.yaml deleted file mode 100644 index 1610fdbf79a..00000000000 --- a/themes/default/static/programs/awsx-ecr-eks-deployment-service-python/Pulumi.yaml +++ /dev/null @@ -1,5 +0,0 @@ -name: awsx-ecr-eks-deployment-service-python -runtime: - name: python - options: - virtualenv: venv diff --git a/themes/default/static/programs/awsx-ecr-eks-deployment-service-python/__main__.py b/themes/default/static/programs/awsx-ecr-eks-deployment-service-python/__main__.py deleted file mode 100644 index feb4a43c090..00000000000 --- a/themes/default/static/programs/awsx-ecr-eks-deployment-service-python/__main__.py +++ /dev/null @@ -1,87 +0,0 @@ -import pulumi -import pulumi_awsx as awsx -import pulumi_eks as eks -import pulumi_kubernetes as kubernetes - -app_name = "my-app" - -repository = awsx.ecr.Repository( - "repository", - awsx.ecr.RepositoryArgs(force_delete=True), -) - -image = awsx.ecr.Image( - "image", - awsx.ecr.ImageArgs( - repository_url=repository.url, context="./app", platform="linux/amd64" - ), -) - -cluster = eks.Cluster("cluster") - -cluster_provider = kubernetes.Provider( - "clusterProvider", kubeconfig=cluster.kubeconfig, enable_server_side_apply=True -) - -deployment = kubernetes.apps.v1.Deployment( - "deployment", - metadata=kubernetes.meta.v1.ObjectMetaArgs( - labels={ - "appClass": app_name, - }, - ), - spec=kubernetes.apps.v1.DeploymentSpecArgs( - replicas=2, - selector=kubernetes.meta.v1.LabelSelectorArgs( - match_labels={ - "appClass": app_name, - }, - ), - template=kubernetes.core.v1.PodTemplateSpecArgs( - metadata=kubernetes.meta.v1.ObjectMetaArgs( - labels={ - "appClass": app_name, - }, - ), - spec=kubernetes.core.v1.PodSpecArgs( - containers=[ - kubernetes.core.v1.ContainerArgs( - name=app_name, - image=image.image_uri, - ports=[ - kubernetes.core.v1.ContainerPortArgs( - name="http", - container_port=80, - ) - ], - ), - ], - ), - ), - ), - opts=pulumi.ResourceOptions(provider=cluster_provider), -) - -service = kubernetes.core.v1.Service( - "service", - metadata=kubernetes.meta.v1.ObjectMetaArgs( - labels={ - "appClass": app_name, - }, - ), - spec=kubernetes.core.v1.ServiceSpecArgs( - type="LoadBalancer", - selector={ - "appClass": app_name, - }, - ports=[ - kubernetes.core.v1.ServicePortArgs( - port=80, - target_port="http", - ) - ], - ), - opts=pulumi.ResourceOptions(provider=cluster_provider), -) - -pulumi.export("url", service.status.load_balancer.ingress[0].hostname) diff --git a/themes/default/static/programs/awsx-ecr-eks-deployment-service-python/app/Dockerfile b/themes/default/static/programs/awsx-ecr-eks-deployment-service-python/app/Dockerfile deleted file mode 100644 index 007148685f1..00000000000 --- a/themes/default/static/programs/awsx-ecr-eks-deployment-service-python/app/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM nginx \ No newline at end of file diff --git a/themes/default/static/programs/awsx-ecr-eks-deployment-service-python/requirements.txt b/themes/default/static/programs/awsx-ecr-eks-deployment-service-python/requirements.txt deleted file mode 100644 index e2cdbc80eb6..00000000000 --- a/themes/default/static/programs/awsx-ecr-eks-deployment-service-python/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pulumi>=3.0.0,<4.0.0 -pulumi-awsx>=2.0.0,<3.0.0 -pulumi-eks>=2.0.0,<3.0.0 diff --git a/themes/default/static/programs/awsx-ecr-eks-deployment-service-typescript/Pulumi.yaml b/themes/default/static/programs/awsx-ecr-eks-deployment-service-typescript/Pulumi.yaml deleted file mode 100644 index 705d13bb168..00000000000 --- a/themes/default/static/programs/awsx-ecr-eks-deployment-service-typescript/Pulumi.yaml +++ /dev/null @@ -1,2 +0,0 @@ -name: awsx-ecr-eks-deployment-service-typescript -runtime: nodejs diff --git a/themes/default/static/programs/awsx-ecr-eks-deployment-service-typescript/index.ts b/themes/default/static/programs/awsx-ecr-eks-deployment-service-typescript/index.ts deleted file mode 100644 index 1b154f2d57d..00000000000 --- a/themes/default/static/programs/awsx-ecr-eks-deployment-service-typescript/index.ts +++ /dev/null @@ -1,80 +0,0 @@ -import * as pulumi from "@pulumi/pulumi"; -import * as awsx from "@pulumi/awsx"; -import * as eks from "@pulumi/eks"; -import * as kubernetes from "@pulumi/kubernetes"; - -const appName = "my-app"; - -const repository = new awsx.ecr.Repository("repository", { - forceDelete: true, -}); - -const image = new awsx.ecr.Image("image", { - repositoryUrl: repository.url, - context: "./app", - platform: "linux/amd64", -}); - -const cluster = new eks.Cluster("cluster"); - -const clusterProvider = new kubernetes.Provider("clusterProvider", { - kubeconfig: cluster.kubeconfig, - enableServerSideApply: true, -}); - -const deployment = new kubernetes.apps.v1.Deployment("deployment", { - metadata: { - labels: { - appClass: appName, - }, - }, - spec: { - replicas: 2, - selector: { - matchLabels: { - appClass: appName, - }, - }, - template: { - metadata: { - labels: { - appClass: appName, - }, - }, - spec: { - containers: [{ - name: appName, - image: image.imageUri, - ports: [{ - name: "http", - containerPort: 80, - }], - }], - }, - }, - }, -}, { - provider: clusterProvider, -}); - -const service = new kubernetes.core.v1.Service("service", { - metadata: { - labels: { - appClass: appName, - }, - }, - spec: { - type: "LoadBalancer", - selector: { - appClass: appName, - }, - ports: [{ - port: 80, - targetPort: "http", - }], - }, -}, { - provider: clusterProvider, -}); - -export const url = service.status.apply(status => status?.loadBalancer?.ingress?.[0]?.hostname); diff --git a/themes/default/static/programs/awsx-ecr-eks-deployment-service-typescript/package.json b/themes/default/static/programs/awsx-ecr-eks-deployment-service-typescript/package.json deleted file mode 100644 index 8c4c905596d..00000000000 --- a/themes/default/static/programs/awsx-ecr-eks-deployment-service-typescript/package.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "awsx-ecr-eks-deployment-service-typescript", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@pulumi/awsx": "^2.0.0", - "@pulumi/eks": "^2.0.0", - "@pulumi/kubernetes": "^4.0.0" - } -} diff --git a/themes/default/static/programs/awsx-ecr-eks-deployment-service-typescript/tsconfig.json b/themes/default/static/programs/awsx-ecr-eks-deployment-service-typescript/tsconfig.json deleted file mode 100644 index 11fc69af240..00000000000 --- a/themes/default/static/programs/awsx-ecr-eks-deployment-service-typescript/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", - ] -} \ No newline at end of file diff --git a/themes/default/static/programs/awsx-ecr-eks-deployment-service-yaml/Pulumi.yaml b/themes/default/static/programs/awsx-ecr-eks-deployment-service-yaml/Pulumi.yaml deleted file mode 100644 index 403c1b5460e..00000000000 --- a/themes/default/static/programs/awsx-ecr-eks-deployment-service-yaml/Pulumi.yaml +++ /dev/null @@ -1,69 +0,0 @@ -name: awsx-ecr-eks-deployment-service-yaml -runtime: yaml - -variables: - appName: my-app - -resources: - repository: - type: awsx:ecr:Repository - - image: - type: awsx:ecr:Image - properties: - repositoryUrl: ${repository.url} - context: "./app" - platform: "linux/amd64" - - cluster: - type: eks:Cluster - - clusterProvider: - type: pulumi:providers:kubernetes - properties: - kubeconfig: ${cluster.kubeconfigJson} - enableServerSideApply: true - - deployment: - type: kubernetes:apps/v1:Deployment - properties: - metadata: - labels: - appClass: ${appName} - spec: - replicas: 2 - selector: - matchLabels: - appClass: ${appName} - template: - metadata: - labels: - appClass: ${appName} - spec: - containers: - - name: ${appName} - image: ${image.imageUri} - ports: - - name: http - containerPort: 80 - options: - provider: ${clusterProvider} - - service: - type: kubernetes:core/v1:Service - properties: - metadata: - labels: - appClass: ${appName} - spec: - type: LoadBalancer - selector: - appClass: ${appName} - ports: - - port: 80 - targetPort: http - options: - provider: ${clusterProvider} - -outputs: - url: http://${service.status.loadBalancer.ingress[0].hostname} diff --git a/themes/default/static/programs/awsx-ecr-eks-deployment-service-yaml/app/Dockerfile b/themes/default/static/programs/awsx-ecr-eks-deployment-service-yaml/app/Dockerfile deleted file mode 100644 index 007148685f1..00000000000 --- a/themes/default/static/programs/awsx-ecr-eks-deployment-service-yaml/app/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM nginx \ No newline at end of file diff --git a/themes/default/static/programs/awsx-ecr-image-csharp/Program.cs b/themes/default/static/programs/awsx-ecr-image-csharp/Program.cs deleted file mode 100644 index b341a8cd540..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-csharp/Program.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Collections.Generic; -using Pulumi; -using Awsx = Pulumi.Awsx; - -return await Deployment.RunAsync(() => -{ - var repository = new Awsx.Ecr.Repository("repository", new() - { - ForceDelete = true, - }); - - var image = new Awsx.Ecr.Image("image", new() - { - RepositoryUrl = repository.Url, - Context = "./app", - Platform = "linux/amd64", - }); - - return new Dictionary - { - ["url"] = repository.Url, - }; -}); diff --git a/themes/default/static/programs/awsx-ecr-image-csharp/Pulumi.yaml b/themes/default/static/programs/awsx-ecr-image-csharp/Pulumi.yaml deleted file mode 100644 index 1c5557c5434..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-csharp/Pulumi.yaml +++ /dev/null @@ -1,2 +0,0 @@ -name: awsx-ecr-image-csharp -runtime: dotnet diff --git a/themes/default/static/programs/awsx-ecr-image-csharp/app/Dockerfile b/themes/default/static/programs/awsx-ecr-image-csharp/app/Dockerfile deleted file mode 100644 index 007148685f1..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-csharp/app/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM nginx \ No newline at end of file diff --git a/themes/default/static/programs/awsx-ecr-image-csharp/awsx-ecr-image-csharp.csproj b/themes/default/static/programs/awsx-ecr-image-csharp/awsx-ecr-image-csharp.csproj deleted file mode 100644 index ac10d4fba32..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-csharp/awsx-ecr-image-csharp.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - - diff --git a/themes/default/static/programs/awsx-ecr-image-go/Pulumi.yaml b/themes/default/static/programs/awsx-ecr-image-go/Pulumi.yaml deleted file mode 100644 index 59864e0ee3a..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-go/Pulumi.yaml +++ /dev/null @@ -1,2 +0,0 @@ -name: awsx-ecr-image-go -runtime: go diff --git a/themes/default/static/programs/awsx-ecr-image-go/app/Dockerfile b/themes/default/static/programs/awsx-ecr-image-go/app/Dockerfile deleted file mode 100644 index 007148685f1..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-go/app/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM nginx \ No newline at end of file diff --git a/themes/default/static/programs/awsx-ecr-image-go/go.mod b/themes/default/static/programs/awsx-ecr-image-go/go.mod deleted file mode 100644 index 49627583596..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-go/go.mod +++ /dev/null @@ -1,89 +0,0 @@ -module repo-go - -go 1.21 - -require ( - github.com/pulumi/pulumi-awsx/sdk/v2 v2.2.0 - github.com/pulumi/pulumi/sdk/v3 v3.91.1 -) - -require ( - github.com/Microsoft/go-winio v0.5.2 // indirect - github.com/ProtonMail/go-crypto v0.0.0-20221026131551-cf6655e29de4 // indirect - github.com/acomagu/bufpipe v1.0.3 // indirect - github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect - github.com/agext/levenshtein v1.2.3 // indirect - github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect - github.com/atotto/clipboard v0.1.4 // indirect - github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect - github.com/blang/semver v3.5.1+incompatible // indirect - github.com/charmbracelet/bubbles v0.16.1 // indirect - github.com/charmbracelet/bubbletea v0.24.2 // indirect - github.com/charmbracelet/lipgloss v0.7.1 // indirect - github.com/cheggaaa/pb v1.0.29 // indirect - github.com/cloudflare/circl v1.3.3 // indirect - github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect - github.com/djherbis/times v1.5.0 // indirect - github.com/emirpasic/gods v1.18.1 // indirect - github.com/go-git/gcfg v1.5.0 // indirect - github.com/go-git/go-billy/v5 v5.4.0 // indirect - github.com/go-git/go-git/v5 v5.6.0 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.1.0 // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/hcl/v2 v2.17.0 // indirect - github.com/imdario/mergo v0.3.13 // indirect - github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/lucasb-eyer/go-colorful v1.2.0 // indirect - github.com/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-localereader v0.0.1 // indirect - github.com/mattn/go-runewidth v0.0.14 // indirect - github.com/mitchellh/go-ps v1.0.0 // indirect - github.com/mitchellh/go-wordwrap v1.0.1 // indirect - github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b // indirect - github.com/muesli/cancelreader v0.2.2 // indirect - github.com/muesli/reflow v0.3.0 // indirect - github.com/muesli/termenv v0.15.1 // indirect - github.com/opentracing/basictracer-go v1.1.0 // indirect - github.com/opentracing/opentracing-go v1.2.0 // indirect - github.com/pjbgf/sha1cd v0.3.0 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/pkg/term v1.1.0 // indirect - github.com/pulumi/esc v0.5.6 // indirect - github.com/pulumi/pulumi-aws/sdk/v6 v6.7.0 // indirect - github.com/pulumi/pulumi-docker/sdk/v4 v4.4.3 // indirect - github.com/rivo/uniseg v0.4.4 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect - github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect - github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 // indirect - github.com/sergi/go-diff v1.3.1 // indirect - github.com/skeema/knownhosts v1.1.0 // indirect - github.com/spf13/cobra v1.7.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/texttheater/golang-levenshtein v1.0.1 // indirect - github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect - github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect - github.com/uber/jaeger-lib v2.4.1+incompatible // indirect - github.com/xanzy/ssh-agent v0.3.3 // indirect - github.com/zclconf/go-cty v1.13.2 // indirect - go.uber.org/atomic v1.9.0 // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/sync v0.2.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d // indirect - google.golang.org/grpc v1.57.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/warnings.v0 v0.1.2 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect - lukechampine.com/frand v1.4.2 // indirect - sourcegraph.com/sourcegraph/appdash v0.0.0-20211028080628-e2786a622600 // indirect -) diff --git a/themes/default/static/programs/awsx-ecr-image-go/main.go b/themes/default/static/programs/awsx-ecr-image-go/main.go deleted file mode 100644 index 180644a397e..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-go/main.go +++ /dev/null @@ -1,29 +0,0 @@ -package main - -import ( - "github.com/pulumi/pulumi-awsx/sdk/v2/go/awsx/ecr" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - repository, err := ecr.NewRepository(ctx, "repository", &ecr.RepositoryArgs{ - ForceDelete: pulumi.Bool(true), - }) - if err != nil { - return err - } - - _, err = ecr.NewImage(ctx, "image", &ecr.ImageArgs{ - RepositoryUrl: repository.Url, - Context: pulumi.String("./app"), - Platform: pulumi.String("linux/amd64"), - }) - if err != nil { - return err - } - - ctx.Export("url", repository.Url) - return nil - }) -} diff --git a/themes/default/static/programs/awsx-ecr-image-java/Pulumi.yaml b/themes/default/static/programs/awsx-ecr-image-java/Pulumi.yaml deleted file mode 100644 index 412ab73e107..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-java/Pulumi.yaml +++ /dev/null @@ -1,2 +0,0 @@ -name: awsx-ecr-image-java -runtime: java diff --git a/themes/default/static/programs/awsx-ecr-image-java/app/Dockerfile b/themes/default/static/programs/awsx-ecr-image-java/app/Dockerfile deleted file mode 100644 index 007148685f1..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-java/app/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM nginx \ No newline at end of file diff --git a/themes/default/static/programs/awsx-ecr-image-java/pom.xml b/themes/default/static/programs/awsx-ecr-image-java/pom.xml deleted file mode 100644 index e55f2b3f12f..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-java/pom.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - 4.0.0 - - com.pulumi - awsx-ecr-image-java - 1.0-SNAPSHOT - - - UTF-8 - 11 - 11 - 11 - myproject.App - - - - - - com.pulumi - pulumi - (,1.0] - - - com.pulumi - aws - (6.0.2,6.99] - - - com.pulumi - awsx - (2.0.2,2.99] - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.2 - - - - true - ${mainClass} - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.3.0 - - - - true - ${mainClass} - - - - jar-with-dependencies - - - - - make-my-jar-with-dependencies - package - - single - - - - - - org.codehaus.mojo - exec-maven-plugin - 3.0.0 - - ${mainClass} - ${mainArgs} - - - - org.apache.maven.plugins - maven-wrapper-plugin - 3.1.0 - - 3.8.5 - - - - - diff --git a/themes/default/static/programs/awsx-ecr-image-java/src/main/java/myproject/App.java b/themes/default/static/programs/awsx-ecr-image-java/src/main/java/myproject/App.java deleted file mode 100644 index 05dbafa8db3..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-java/src/main/java/myproject/App.java +++ /dev/null @@ -1,28 +0,0 @@ -package myproject; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.awsx.ecr.Repository; -import com.pulumi.awsx.ecr.RepositoryArgs; -import com.pulumi.awsx.ecr.Image; -import com.pulumi.awsx.ecr.ImageArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - var repository = new Repository("repository", RepositoryArgs.builder() - .forceDelete(true) - .build()); - - var image = new Image("image", ImageArgs.builder() - .repositoryUrl(repository.url()) - .context("./app") - .platform("linux/amd64") - .build()); - - ctx.export("url", repository.url()); - } -} diff --git a/themes/default/static/programs/awsx-ecr-image-javascript/Pulumi.yaml b/themes/default/static/programs/awsx-ecr-image-javascript/Pulumi.yaml deleted file mode 100644 index 58342d5761d..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-javascript/Pulumi.yaml +++ /dev/null @@ -1,5 +0,0 @@ -name: awsx-ecr-image-javascript -runtime: - name: nodejs - options: - typescript: false diff --git a/themes/default/static/programs/awsx-ecr-image-javascript/app/Dockerfile b/themes/default/static/programs/awsx-ecr-image-javascript/app/Dockerfile deleted file mode 100644 index 007148685f1..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-javascript/app/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM nginx \ No newline at end of file diff --git a/themes/default/static/programs/awsx-ecr-image-javascript/index.js b/themes/default/static/programs/awsx-ecr-image-javascript/index.js deleted file mode 100644 index f8923e92a16..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-javascript/index.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; -const pulumi = require("@pulumi/pulumi"); -const awsx = require("@pulumi/awsx"); - -const repository = new awsx.ecr.Repository("repository", { - forceDelete: true, -}); - -const image = new awsx.ecr.Image("image", { - repositoryUrl: repository.url, - context: "./app", - platform: "linux/amd64", -}); - -exports.url = repository.url; diff --git a/themes/default/static/programs/awsx-ecr-image-javascript/package.json b/themes/default/static/programs/awsx-ecr-image-javascript/package.json deleted file mode 100644 index f1751a5ba3d..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-javascript/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "awsx-ecr-image-javascript", - "main": "index.js", - "dependencies": { - "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^6.0.0", - "@pulumi/awsx": "^2.0.0" - } -} diff --git a/themes/default/static/programs/awsx-ecr-image-python/Pulumi.yaml b/themes/default/static/programs/awsx-ecr-image-python/Pulumi.yaml deleted file mode 100644 index 4abe67ee372..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-python/Pulumi.yaml +++ /dev/null @@ -1,5 +0,0 @@ -name: awsx-ecr-image-python -runtime: - name: python - options: - virtualenv: venv diff --git a/themes/default/static/programs/awsx-ecr-image-python/__main__.py b/themes/default/static/programs/awsx-ecr-image-python/__main__.py deleted file mode 100644 index a418834a6b5..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-python/__main__.py +++ /dev/null @@ -1,14 +0,0 @@ -import pulumi -import pulumi_awsx as awsx - -repository = awsx.ecr.Repository("repository", awsx.ecr.RepositoryArgs( - force_delete=True, -)) - -image = awsx.ecr.Image("image", awsx.ecr.ImageArgs( - repository_url=repository.url, - context="./app", - platform="linux/amd64", -)) - -pulumi.export("url", repository.url) diff --git a/themes/default/static/programs/awsx-ecr-image-python/app/Dockerfile b/themes/default/static/programs/awsx-ecr-image-python/app/Dockerfile deleted file mode 100644 index 007148685f1..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-python/app/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM nginx \ No newline at end of file diff --git a/themes/default/static/programs/awsx-ecr-image-python/requirements.txt b/themes/default/static/programs/awsx-ecr-image-python/requirements.txt deleted file mode 100644 index c8097039a51..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-python/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pulumi>=3.0.0,<4.0.0 -pulumi-aws>=6.0.2,<7.0.0 -pulumi-awsx>=2.0.0,<3.0.0 diff --git a/themes/default/static/programs/awsx-ecr-image-typescript/Pulumi.yaml b/themes/default/static/programs/awsx-ecr-image-typescript/Pulumi.yaml deleted file mode 100644 index a954da14903..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-typescript/Pulumi.yaml +++ /dev/null @@ -1,2 +0,0 @@ -name: awsx-ecr-image-typescript -runtime: nodejs diff --git a/themes/default/static/programs/awsx-ecr-image-typescript/app/Dockerfile b/themes/default/static/programs/awsx-ecr-image-typescript/app/Dockerfile deleted file mode 100644 index 007148685f1..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-typescript/app/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM nginx \ No newline at end of file diff --git a/themes/default/static/programs/awsx-ecr-image-typescript/index.ts b/themes/default/static/programs/awsx-ecr-image-typescript/index.ts deleted file mode 100644 index 0952dd7ee81..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-typescript/index.ts +++ /dev/null @@ -1,14 +0,0 @@ -import * as pulumi from "@pulumi/pulumi"; -import * as awsx from "@pulumi/awsx"; - -const repository = new awsx.ecr.Repository("repository", { - forceDelete: true, -}); - -const image = new awsx.ecr.Image("image", { - repositoryUrl: repository.url, - context: "./app", - platform: "linux/amd64", -}); - -export const url = repository.url; diff --git a/themes/default/static/programs/awsx-ecr-image-typescript/package.json b/themes/default/static/programs/awsx-ecr-image-typescript/package.json deleted file mode 100644 index c0eba2ff6f3..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-typescript/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "repo-typescript", - "main": "index.ts", - "devDependencies": { - "@types/node": "^18" - }, - "dependencies": { - "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^6.0.0", - "@pulumi/awsx": "^2.0.0" - } -} diff --git a/themes/default/static/programs/awsx-ecr-image-typescript/tsconfig.json b/themes/default/static/programs/awsx-ecr-image-typescript/tsconfig.json deleted file mode 100644 index ab65afa6135..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-typescript/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/themes/default/static/programs/awsx-ecr-image-yaml/Pulumi.yaml b/themes/default/static/programs/awsx-ecr-image-yaml/Pulumi.yaml deleted file mode 100644 index b88b11e7ae2..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-yaml/Pulumi.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: awsx-ecr-image-yaml -runtime: yaml - -resources: - repository: - type: awsx:ecr:Repository - properties: - forceDelete: true - -image: - type: awsx:ecr:Image - properties: - repositoryUrl: ${repository.url} - context: "./app" - platform: "linux/amd64" - -outputs: - url: ${repository.url} diff --git a/themes/default/static/programs/awsx-ecr-image-yaml/app/Dockerfile b/themes/default/static/programs/awsx-ecr-image-yaml/app/Dockerfile deleted file mode 100644 index 007148685f1..00000000000 --- a/themes/default/static/programs/awsx-ecr-image-yaml/app/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM nginx \ No newline at end of file diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-csharp/Program.cs b/themes/default/static/programs/awsx-load-balanced-fargate-ecr-csharp/Program.cs deleted file mode 100644 index a37e3b45933..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-csharp/Program.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System.Collections.Generic; -using Pulumi; -using Aws = Pulumi.Aws; -using Awsx = Pulumi.Awsx; - -return await Deployment.RunAsync(() => -{ - var repo = new Awsx.Ecr.Repository("repo", new() - { - ForceDelete = true, - }); - - var image = new Awsx.Ecr.Image("image", new() - { - RepositoryUrl = repo.Url, - Context = "./app", - Platform = "linux/amd64", - }); - - var cluster = new Aws.Ecs.Cluster("cluster"); - - var lb = new Awsx.Lb.ApplicationLoadBalancer("lb"); - - var service = new Awsx.Ecs.FargateService("service", new Awsx.Ecs.FargateServiceArgs - { - Cluster = cluster.Arn, - AssignPublicIp = true, - TaskDefinitionArgs = new Awsx.Ecs.Inputs.FargateServiceTaskDefinitionArgs - { - Container = new Awsx.Ecs.Inputs.TaskDefinitionContainerDefinitionArgs - { - Name = "my-service", - Image = image.ImageUri, - Cpu = 128, - Memory = 512, - Essential = true, - PortMappings = new[] - { - new Awsx.Ecs.Inputs.TaskDefinitionPortMappingArgs - { - ContainerPort = 80, - TargetGroup = lb.DefaultTargetGroup, - }, - }, - }, - }, - }); - - return new Dictionary - { - ["url"] = lb.LoadBalancer.Apply(loadBalancer => Output.Format($"http://{loadBalancer.DnsName}")), - }; -}); diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-csharp/Pulumi.yaml b/themes/default/static/programs/awsx-load-balanced-fargate-ecr-csharp/Pulumi.yaml deleted file mode 100644 index a7ef3c977db..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-csharp/Pulumi.yaml +++ /dev/null @@ -1,2 +0,0 @@ -name: awsx-load-balanced-fargate-ecr-csharp -runtime: dotnet diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-csharp/awsx-load-balanced-fargate-ecr-csharp.csproj b/themes/default/static/programs/awsx-load-balanced-fargate-ecr-csharp/awsx-load-balanced-fargate-ecr-csharp.csproj deleted file mode 100644 index 57ad013e16d..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-csharp/awsx-load-balanced-fargate-ecr-csharp.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - - diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-go/Pulumi.yaml b/themes/default/static/programs/awsx-load-balanced-fargate-ecr-go/Pulumi.yaml deleted file mode 100644 index 245130132d3..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-go/Pulumi.yaml +++ /dev/null @@ -1,2 +0,0 @@ -name: awsx-load-balanced-fargate-ecr-go -runtime: go diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-go/go.mod b/themes/default/static/programs/awsx-load-balanced-fargate-ecr-go/go.mod deleted file mode 100644 index 4b2afb26bd9..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-go/go.mod +++ /dev/null @@ -1,95 +0,0 @@ -module awsx-load-balanced-fargate-nginx-go - -go 1.21 - -toolchain go1.21.0 - -require ( - github.com/pulumi/pulumi-aws/sdk/v6 v6.10.0 - github.com/pulumi/pulumi-awsx/sdk/v2 v2.2.0 - github.com/pulumi/pulumi/sdk/v3 v3.93.0 -) - -require ( - dario.cat/mergo v1.0.0 // indirect - github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect - github.com/acomagu/bufpipe v1.0.4 // indirect - github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect - github.com/agext/levenshtein v1.2.3 // indirect - github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect - github.com/atotto/clipboard v0.1.4 // indirect - github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect - github.com/blang/semver v3.5.1+incompatible // indirect - github.com/charmbracelet/bubbles v0.16.1 // indirect - github.com/charmbracelet/bubbletea v0.24.2 // indirect - github.com/charmbracelet/lipgloss v0.7.1 // indirect - github.com/cheggaaa/pb v1.0.29 // indirect - github.com/cloudflare/circl v1.3.3 // indirect - github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect - github.com/cyphar/filepath-securejoin v0.2.4 // indirect - github.com/djherbis/times v1.5.0 // indirect - github.com/emirpasic/gods v1.18.1 // indirect - github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect - github.com/go-git/go-billy/v5 v5.5.0 // indirect - github.com/go-git/go-git/v5 v5.9.0 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.1.0 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/hcl/v2 v2.17.0 // indirect - github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/lucasb-eyer/go-colorful v1.2.0 // indirect - github.com/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-localereader v0.0.1 // indirect - github.com/mattn/go-runewidth v0.0.14 // indirect - github.com/mitchellh/go-ps v1.0.0 // indirect - github.com/mitchellh/go-wordwrap v1.0.1 // indirect - github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b // indirect - github.com/muesli/cancelreader v0.2.2 // indirect - github.com/muesli/reflow v0.3.0 // indirect - github.com/muesli/termenv v0.15.1 // indirect - github.com/opentracing/basictracer-go v1.1.0 // indirect - github.com/opentracing/opentracing-go v1.2.0 // indirect - github.com/pjbgf/sha1cd v0.3.0 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/pkg/term v1.1.0 // indirect - github.com/pulumi/esc v0.5.6 // indirect - github.com/pulumi/pulumi-docker/sdk/v4 v4.4.3 // indirect - github.com/rivo/uniseg v0.4.4 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect - github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect - github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 // indirect - github.com/sergi/go-diff v1.3.1 // indirect - github.com/skeema/knownhosts v1.2.0 // indirect - github.com/spf13/cobra v1.7.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/texttheater/golang-levenshtein v1.0.1 // indirect - github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect - github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect - github.com/uber/jaeger-lib v2.4.1+incompatible // indirect - github.com/xanzy/ssh-agent v0.3.3 // indirect - github.com/zclconf/go-cty v1.13.2 // indirect - go.uber.org/atomic v1.9.0 // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect - golang.org/x/mod v0.13.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/sync v0.4.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect - golang.org/x/tools v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d // indirect - google.golang.org/grpc v1.57.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/warnings.v0 v0.1.2 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect - lukechampine.com/frand v1.4.2 // indirect - sourcegraph.com/sourcegraph/appdash v0.0.0-20211028080628-e2786a622600 // indirect -) diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-go/main.go b/themes/default/static/programs/awsx-load-balanced-fargate-ecr-go/main.go deleted file mode 100644 index 759e1f872d7..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-go/main.go +++ /dev/null @@ -1,65 +0,0 @@ -package main - -import ( - "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs" - "github.com/pulumi/pulumi-awsx/sdk/v2/go/awsx/ecr" - ecsx "github.com/pulumi/pulumi-awsx/sdk/v2/go/awsx/ecs" - "github.com/pulumi/pulumi-awsx/sdk/v2/go/awsx/lb" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - repository, err := ecr.NewRepository(ctx, "repository", &ecr.RepositoryArgs{ - ForceDelete: pulumi.Bool(true), - }) - if err != nil { - return err - } - - image, err := ecr.NewImage(ctx, "image", &ecr.ImageArgs{ - RepositoryUrl: repository.Url, - Context: pulumi.String("./app"), - Platform: pulumi.StringPtr("linux/amd64"), - }) - if err != nil { - return err - } - - cluster, err := ecs.NewCluster(ctx, "cluster", nil) - if err != nil { - return err - } - - lb, err := lb.NewApplicationLoadBalancer(ctx, "lb", nil) - if err != nil { - return err - } - - _, err = ecsx.NewFargateService(ctx, "service", &ecsx.FargateServiceArgs{ - Cluster: cluster.Arn, - AssignPublicIp: pulumi.Bool(true), - TaskDefinitionArgs: &ecsx.FargateServiceTaskDefinitionArgs{ - Container: &ecsx.TaskDefinitionContainerDefinitionArgs{ - Name: pulumi.String("app"), - Image: image.ImageUri, - Cpu: pulumi.Int(512), - Memory: pulumi.Int(128), - Essential: pulumi.Bool(true), - PortMappings: ecsx.TaskDefinitionPortMappingArray{ - &ecsx.TaskDefinitionPortMappingArgs{ - ContainerPort: pulumi.Int(80), - TargetGroup: lb.DefaultTargetGroup, - }, - }, - }, - }, - }) - if err != nil { - return err - } - - ctx.Export("url", pulumi.Sprintf("http://%s", lb.LoadBalancer.DnsName())) - return nil - }) -} diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-java/Pulumi.yaml b/themes/default/static/programs/awsx-load-balanced-fargate-ecr-java/Pulumi.yaml deleted file mode 100644 index 1200a566098..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-java/Pulumi.yaml +++ /dev/null @@ -1,2 +0,0 @@ -name: awsx-load-balanced-fargate-ecr-java -runtime: java diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-java/pom.xml b/themes/default/static/programs/awsx-load-balanced-fargate-ecr-java/pom.xml deleted file mode 100644 index 31696537179..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-java/pom.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - 4.0.0 - - com.pulumi - awsx-load-balanced-fargate-ecr-java - 1.0-SNAPSHOT - - - UTF-8 - 11 - 11 - 11 - myproject.App - - - - - - com.pulumi - pulumi - (,1.0] - - - com.pulumi - aws - (6.0.0,6.99] - - - com.pulumi - awsx - (2.0.0,2.99] - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.2 - - - - true - ${mainClass} - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.4.2 - - - - true - ${mainClass} - - - - jar-with-dependencies - - - - - make-my-jar-with-dependencies - package - - single - - - - - - org.codehaus.mojo - exec-maven-plugin - 3.1.0 - - ${mainClass} - ${mainArgs} - - - - org.apache.maven.plugins - maven-wrapper-plugin - 3.1.1 - - 3.8.5 - - - - - diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-java/src/main/java/myproject/App.java b/themes/default/static/programs/awsx-load-balanced-fargate-ecr-java/src/main/java/myproject/App.java deleted file mode 100644 index 7c6007b2ed7..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-java/src/main/java/myproject/App.java +++ /dev/null @@ -1,58 +0,0 @@ -package myproject; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.pulumi.awsx.ecr.Repository; -import com.pulumi.awsx.ecr.RepositoryArgs; -import com.pulumi.awsx.ecr.Image; -import com.pulumi.awsx.ecr.ImageArgs; -import com.pulumi.aws.ecs.Cluster; -import com.pulumi.awsx.lb.ApplicationLoadBalancer; -import com.pulumi.awsx.ecs.FargateService; -import com.pulumi.awsx.ecs.FargateServiceArgs; -import com.pulumi.awsx.ecs.inputs.FargateServiceTaskDefinitionArgs; -import com.pulumi.awsx.ecs.inputs.TaskDefinitionContainerDefinitionArgs; -import com.pulumi.awsx.ecs.inputs.TaskDefinitionPortMappingArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - var repository = new Repository("repository", RepositoryArgs.builder() - .forceDelete(true) - .build()); - - var image = new Image("image", ImageArgs.builder() - .repositoryUrl(repository.url()) - .context("./app") - .platform("linux/amd64") - .build()); - - var cluster = new Cluster("cluster"); - - var lb = new ApplicationLoadBalancer("lb"); - - var service = new FargateService("service", FargateServiceArgs.builder() - .cluster(cluster.arn()) - .assignPublicIp(true) - .taskDefinitionArgs(FargateServiceTaskDefinitionArgs.builder() - .container(TaskDefinitionContainerDefinitionArgs.builder() - .name("my-service") - .image(image.imageUri()) - .cpu(128) - .memory(512) - .essential(true) - .portMappings(TaskDefinitionPortMappingArgs.builder() - .containerPort(80) - .targetGroup(lb.defaultTargetGroup()) - .build()) - .build()) - .build()) - .build()); - - ctx.export("url", Output.format("http://%s", lb.loadBalancer().applyValue(loadBalancer -> loadBalancer.dnsName()))); - } -} diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-javascript/Pulumi.yaml b/themes/default/static/programs/awsx-load-balanced-fargate-ecr-javascript/Pulumi.yaml deleted file mode 100644 index 3100dacecf4..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-javascript/Pulumi.yaml +++ /dev/null @@ -1,5 +0,0 @@ -name: awsx-load-balanced-fargate-ecr-javascript -runtime: - name: nodejs - options: - typescript: false diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-javascript/index.js b/themes/default/static/programs/awsx-load-balanced-fargate-ecr-javascript/index.js deleted file mode 100644 index 6b97d55962a..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-javascript/index.js +++ /dev/null @@ -1,38 +0,0 @@ -"use strict"; -const pulumi = require("@pulumi/pulumi"); -const aws = require("@pulumi/aws"); -const awsx = require("@pulumi/awsx"); - -const repo = new awsx.ecr.Repository("repo", { - forceDelete: true, -}); - -const image = new awsx.ecr.Image("image", { - repositoryUrl: repo.url, - context: "./app", - platform: "linux/amd64", -}); - -const cluster = new aws.ecs.Cluster("cluster"); - -const lb = new awsx.lb.ApplicationLoadBalancer("lb"); - -const service = new awsx.ecs.FargateService("service", { - cluster: cluster.arn, - assignPublicIp: true, - taskDefinitionArgs: { - container: { - name: "my-service", - image: image.imageUri, - cpu: 128, - memory: 512, - essential: true, - portMappings: [{ - containerPort: 80, - targetGroup: lb.defaultTargetGroup, - }], - }, - }, -}); - -exports.url = pulumi.interpolate`http://${lb.loadBalancer.dnsName}`; diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-javascript/package.json b/themes/default/static/programs/awsx-load-balanced-fargate-ecr-javascript/package.json deleted file mode 100644 index 8fd05e7d9ca..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-javascript/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "awsx-load-balanced-fargate-ecr-javascript", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^6.0.0", - "@pulumi/awsx": "^2.0.0" - } -} diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-python/Pulumi.yaml b/themes/default/static/programs/awsx-load-balanced-fargate-ecr-python/Pulumi.yaml deleted file mode 100644 index 0a0296b0875..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-python/Pulumi.yaml +++ /dev/null @@ -1,2 +0,0 @@ -name: awsx-load-balanced-fargate-ecr-python -runtime: python diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-python/__main__.py b/themes/default/static/programs/awsx-load-balanced-fargate-ecr-python/__main__.py deleted file mode 100644 index 1d887b457ad..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-python/__main__.py +++ /dev/null @@ -1,45 +0,0 @@ -import pulumi -import pulumi_aws as aws -import pulumi_awsx as awsx - -repository = awsx.ecr.Repository( - "repository", - awsx.ecr.RepositoryArgs( - force_delete=True - ), -) - -image = awsx.ecr.Image( - "image", - awsx.ecr.ImageArgs( - repository_url=repository.url, context="./app", platform="linux/amd64" - ), -) - -cluster = aws.ecs.Cluster("cluster") -lb = awsx.lb.ApplicationLoadBalancer("lb") - -service = awsx.ecs.FargateService( - "service", - awsx.ecs.FargateServiceArgs( - cluster=cluster.arn, - assign_public_ip=True, - task_definition_args=awsx.ecs.FargateServiceTaskDefinitionArgs( - container=awsx.ecs.TaskDefinitionContainerDefinitionArgs( - name="my-service", - image=image.image_uri, - cpu=512, - memory=128, - essential=True, - port_mappings=[ - awsx.ecs.TaskDefinitionPortMappingArgs( - container_port=80, - target_group=lb.default_target_group, - ) - ], - ), - ), - ), -) - -pulumi.export("url", pulumi.Output.concat("http://", lb.load_balancer.dns_name)) diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-python/requirements.txt b/themes/default/static/programs/awsx-load-balanced-fargate-ecr-python/requirements.txt deleted file mode 100644 index 961f30bc6eb..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-python/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pulumi>=3.0.0,<4.0.0 -pulumi-aws>=6.0.0,<7.0.0 -pulumi-awsx>=2.0.0,<3.0.0 diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-typescript/Pulumi.yaml b/themes/default/static/programs/awsx-load-balanced-fargate-ecr-typescript/Pulumi.yaml deleted file mode 100644 index 1c51cd5d8e3..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-typescript/Pulumi.yaml +++ /dev/null @@ -1,2 +0,0 @@ -name: awsx-load-balanced-fargate-ecr-typescript -runtime: nodejs diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-typescript/index.ts b/themes/default/static/programs/awsx-load-balanced-fargate-ecr-typescript/index.ts deleted file mode 100644 index 042b399d76b..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-typescript/index.ts +++ /dev/null @@ -1,37 +0,0 @@ -import * as pulumi from "@pulumi/pulumi"; -import * as aws from "@pulumi/aws"; -import * as awsx from "@pulumi/awsx"; - -const repo = new awsx.ecr.Repository("repo", { - forceDelete: true, -}); - -const image = new awsx.ecr.Image("image", { - repositoryUrl: repo.url, - context: "./app", - platform: "linux/amd64", -}); - -const cluster = new aws.ecs.Cluster("cluster"); - -const lb = new awsx.lb.ApplicationLoadBalancer("lb"); - -const service = new awsx.ecs.FargateService("service", { - cluster: cluster.arn, - assignPublicIp: true, - taskDefinitionArgs: { - container: { - name: "my-service", - image: image.imageUri, - cpu: 128, - memory: 512, - essential: true, - portMappings: [{ - containerPort: 80, - targetGroup: lb.defaultTargetGroup, - }], - }, - }, -}); - -export const url = pulumi.interpolate`http://${lb.loadBalancer.dnsName}`; diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-typescript/package.json b/themes/default/static/programs/awsx-load-balanced-fargate-ecr-typescript/package.json deleted file mode 100644 index 1bf609c6755..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-typescript/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "awsx-load-balanced-fargate-ecr-typescript", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^6.0.0", - "@pulumi/awsx": "^2.0.0" - } -} diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-typescript/tsconfig.json b/themes/default/static/programs/awsx-load-balanced-fargate-ecr-typescript/tsconfig.json deleted file mode 100644 index 11fc69af240..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-typescript/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", - ] -} \ No newline at end of file diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-yaml/Pulumi.yaml b/themes/default/static/programs/awsx-load-balanced-fargate-ecr-yaml/Pulumi.yaml deleted file mode 100644 index bb2e4d1e716..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-ecr-yaml/Pulumi.yaml +++ /dev/null @@ -1,40 +0,0 @@ -name: awsx-load-balanced-fargate-ecr-yaml -runtime: yaml - -resources: - repo: - type: awsx:ecr:Repository - properties: - forceDelete: true - - image: - type: awsx:ecr:Image - properties: - repositoryUrl: ${repo.url} - context: ./app - platform: linux/amd64 - - cluster: - type: aws:ecs:Cluster - - lb: - type: awsx:lb:ApplicationLoadBalancer - - service: - type: awsx:ecs:FargateService - properties: - cluster: ${cluster.arn} - assignPublicIp: true - taskDefinitionArgs: - container: - name: my-service - image: ${image.imageUri} - cpu: 128 - memory: 512 - essential: true - portMappings: - - containerPort: 80 - targetGroup: ${lb.defaultTargetGroup} - -outputs: - url: http://${lb.loadBalancer.dnsName} diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-csharp/Program.cs b/themes/default/static/programs/awsx-load-balanced-fargate-nginx-csharp/Program.cs deleted file mode 100644 index 875fa0b8ccd..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-csharp/Program.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System.Collections.Generic; -using Pulumi; -using Aws = Pulumi.Aws; -using Awsx = Pulumi.Awsx; - -return await Deployment.RunAsync(() => -{ - var lb = new Awsx.Lb.ApplicationLoadBalancer("lb"); - var cluster = new Aws.Ecs.Cluster("cluster"); - - var service = new Awsx.Ecs.FargateService("service", new() - { - Cluster = cluster.Arn, - AssignPublicIp = true, - TaskDefinitionArgs = new Awsx.Ecs.Inputs.FargateServiceTaskDefinitionArgs - { - Container = new Awsx.Ecs.Inputs.TaskDefinitionContainerDefinitionArgs - { - Name = "my-service", - Image = "nginx:latest", - Cpu = 128, - Memory = 512, - Essential = true, - PortMappings = new() - { - new Awsx.Ecs.Inputs.TaskDefinitionPortMappingArgs - { - ContainerPort = 80, - TargetGroup = lb.DefaultTargetGroup, - }, - }, - }, - }, - }); - - return new Dictionary - { - ["url"] = lb.LoadBalancer.Apply(loadBalancer => Output.Format($"http://{loadBalancer.DnsName}")), - }; -}); diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-csharp/Pulumi.yaml b/themes/default/static/programs/awsx-load-balanced-fargate-nginx-csharp/Pulumi.yaml deleted file mode 100644 index 4d27aa7e835..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-csharp/Pulumi.yaml +++ /dev/null @@ -1,2 +0,0 @@ -name: awsx-load-balanced-fargate-nginx-csharp -runtime: dotnet diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-csharp/awsx-load-balanced-fargate-nginx-csharp.csproj b/themes/default/static/programs/awsx-load-balanced-fargate-nginx-csharp/awsx-load-balanced-fargate-nginx-csharp.csproj deleted file mode 100644 index 57ad013e16d..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-csharp/awsx-load-balanced-fargate-nginx-csharp.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - - diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-go/Pulumi.yaml b/themes/default/static/programs/awsx-load-balanced-fargate-nginx-go/Pulumi.yaml deleted file mode 100644 index eb00b2d8116..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-go/Pulumi.yaml +++ /dev/null @@ -1,2 +0,0 @@ -name: awsx-load-balanced-fargate-nginx-go -runtime: go diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-go/go.mod b/themes/default/static/programs/awsx-load-balanced-fargate-nginx-go/go.mod deleted file mode 100644 index 4b2afb26bd9..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-go/go.mod +++ /dev/null @@ -1,95 +0,0 @@ -module awsx-load-balanced-fargate-nginx-go - -go 1.21 - -toolchain go1.21.0 - -require ( - github.com/pulumi/pulumi-aws/sdk/v6 v6.10.0 - github.com/pulumi/pulumi-awsx/sdk/v2 v2.2.0 - github.com/pulumi/pulumi/sdk/v3 v3.93.0 -) - -require ( - dario.cat/mergo v1.0.0 // indirect - github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect - github.com/acomagu/bufpipe v1.0.4 // indirect - github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect - github.com/agext/levenshtein v1.2.3 // indirect - github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect - github.com/atotto/clipboard v0.1.4 // indirect - github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect - github.com/blang/semver v3.5.1+incompatible // indirect - github.com/charmbracelet/bubbles v0.16.1 // indirect - github.com/charmbracelet/bubbletea v0.24.2 // indirect - github.com/charmbracelet/lipgloss v0.7.1 // indirect - github.com/cheggaaa/pb v1.0.29 // indirect - github.com/cloudflare/circl v1.3.3 // indirect - github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect - github.com/cyphar/filepath-securejoin v0.2.4 // indirect - github.com/djherbis/times v1.5.0 // indirect - github.com/emirpasic/gods v1.18.1 // indirect - github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect - github.com/go-git/go-billy/v5 v5.5.0 // indirect - github.com/go-git/go-git/v5 v5.9.0 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.1.0 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/hcl/v2 v2.17.0 // indirect - github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/lucasb-eyer/go-colorful v1.2.0 // indirect - github.com/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-localereader v0.0.1 // indirect - github.com/mattn/go-runewidth v0.0.14 // indirect - github.com/mitchellh/go-ps v1.0.0 // indirect - github.com/mitchellh/go-wordwrap v1.0.1 // indirect - github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b // indirect - github.com/muesli/cancelreader v0.2.2 // indirect - github.com/muesli/reflow v0.3.0 // indirect - github.com/muesli/termenv v0.15.1 // indirect - github.com/opentracing/basictracer-go v1.1.0 // indirect - github.com/opentracing/opentracing-go v1.2.0 // indirect - github.com/pjbgf/sha1cd v0.3.0 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/pkg/term v1.1.0 // indirect - github.com/pulumi/esc v0.5.6 // indirect - github.com/pulumi/pulumi-docker/sdk/v4 v4.4.3 // indirect - github.com/rivo/uniseg v0.4.4 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect - github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect - github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 // indirect - github.com/sergi/go-diff v1.3.1 // indirect - github.com/skeema/knownhosts v1.2.0 // indirect - github.com/spf13/cobra v1.7.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/texttheater/golang-levenshtein v1.0.1 // indirect - github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect - github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect - github.com/uber/jaeger-lib v2.4.1+incompatible // indirect - github.com/xanzy/ssh-agent v0.3.3 // indirect - github.com/zclconf/go-cty v1.13.2 // indirect - go.uber.org/atomic v1.9.0 // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect - golang.org/x/mod v0.13.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/sync v0.4.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect - golang.org/x/tools v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d // indirect - google.golang.org/grpc v1.57.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/warnings.v0 v0.1.2 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect - lukechampine.com/frand v1.4.2 // indirect - sourcegraph.com/sourcegraph/appdash v0.0.0-20211028080628-e2786a622600 // indirect -) diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-go/main.go b/themes/default/static/programs/awsx-load-balanced-fargate-nginx-go/main.go deleted file mode 100644 index 9de4ce74765..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-go/main.go +++ /dev/null @@ -1,49 +0,0 @@ -package main - -import ( - "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs" - ecsx "github.com/pulumi/pulumi-awsx/sdk/v2/go/awsx/ecs" - "github.com/pulumi/pulumi-awsx/sdk/v2/go/awsx/lb" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - lb, err := lb.NewApplicationLoadBalancer(ctx, "lb", nil) - if err != nil { - return err - } - - cluster, err := ecs.NewCluster(ctx, "cluster", nil) - if err != nil { - return err - } - - _, err = ecsx.NewFargateService(ctx, "service", &ecsx.FargateServiceArgs{ - Cluster: cluster.Arn, - AssignPublicIp: pulumi.Bool(true), - DesiredCount: pulumi.Int(2), - TaskDefinitionArgs: &ecsx.FargateServiceTaskDefinitionArgs{ - Container: &ecsx.TaskDefinitionContainerDefinitionArgs{ - Name: pulumi.String("my-service"), - Image: pulumi.String("nginx:latest"), - Cpu: pulumi.Int(128), - Memory: pulumi.Int(512), - Essential: pulumi.Bool(true), - PortMappings: ecsx.TaskDefinitionPortMappingArray{ - &ecsx.TaskDefinitionPortMappingArgs{ - ContainerPort: pulumi.Int(80), - TargetGroup: lb.DefaultTargetGroup, - }, - }, - }, - }, - }) - if err != nil { - return err - } - - ctx.Export("url", pulumi.Sprintf("http://%s", lb.LoadBalancer.DnsName())) - return nil - }) -} diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-java/Pulumi.yaml b/themes/default/static/programs/awsx-load-balanced-fargate-nginx-java/Pulumi.yaml deleted file mode 100644 index 70f3f3a7ce5..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-java/Pulumi.yaml +++ /dev/null @@ -1,2 +0,0 @@ -name: awsx-load-balanced-fargate-nginx-yaml -runtime: java diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-java/pom.xml b/themes/default/static/programs/awsx-load-balanced-fargate-nginx-java/pom.xml deleted file mode 100644 index 5b196ec5bb2..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-java/pom.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - 4.0.0 - - com.pulumi - awsx-load-balanced-fargate-nginx-java - 1.0-SNAPSHOT - - - UTF-8 - 11 - 11 - 11 - myproject.App - - - - - - com.pulumi - pulumi - (,1.0] - - - com.pulumi - aws - (6.0.0,6.99] - - - com.pulumi - awsx - (2.0.0,2.99] - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.2 - - - - true - ${mainClass} - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.4.2 - - - - true - ${mainClass} - - - - jar-with-dependencies - - - - - make-my-jar-with-dependencies - package - - single - - - - - - org.codehaus.mojo - exec-maven-plugin - 3.1.0 - - ${mainClass} - ${mainArgs} - - - - org.apache.maven.plugins - maven-wrapper-plugin - 3.1.1 - - 3.8.5 - - - - - diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-java/src/main/java/myproject/App.java b/themes/default/static/programs/awsx-load-balanced-fargate-nginx-java/src/main/java/myproject/App.java deleted file mode 100644 index 356bda12ebb..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-java/src/main/java/myproject/App.java +++ /dev/null @@ -1,45 +0,0 @@ -package myproject; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.pulumi.awsx.ecr.Repository; -import com.pulumi.awsx.ecr.RepositoryArgs; -import com.pulumi.aws.ecs.Cluster; -import com.pulumi.awsx.lb.ApplicationLoadBalancer; -import com.pulumi.awsx.ecs.FargateService; -import com.pulumi.awsx.ecs.FargateServiceArgs; -import com.pulumi.awsx.ecs.inputs.FargateServiceTaskDefinitionArgs; -import com.pulumi.awsx.ecs.inputs.TaskDefinitionContainerDefinitionArgs; -import com.pulumi.awsx.ecs.inputs.TaskDefinitionPortMappingArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - var cluster = new Cluster("cluster"); - var lb = new ApplicationLoadBalancer("lb"); - - var service = new FargateService("service", FargateServiceArgs.builder() - .cluster(cluster.arn()) - .assignPublicIp(true) - .taskDefinitionArgs(FargateServiceTaskDefinitionArgs.builder() - .container(TaskDefinitionContainerDefinitionArgs.builder() - .name("my-service") - .image("nginx:latest") - .cpu(128) - .memory(512) - .essential(true) - .portMappings(TaskDefinitionPortMappingArgs.builder() - .containerPort(80) - .targetGroup(lb.defaultTargetGroup()) - .build()) - .build()) - .build()) - .build()); - - ctx.export("url", Output.format("http://%s", lb.loadBalancer().applyValue(loadBalancer -> loadBalancer.dnsName()))); - } -} diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-javascript/Pulumi.yaml b/themes/default/static/programs/awsx-load-balanced-fargate-nginx-javascript/Pulumi.yaml deleted file mode 100644 index 4a28b7cff1e..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-javascript/Pulumi.yaml +++ /dev/null @@ -1,5 +0,0 @@ -name: awsx-load-balanced-fargate-nginx-javascript -runtime: - name: nodejs - options: - typescript: false diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-javascript/index.js b/themes/default/static/programs/awsx-load-balanced-fargate-nginx-javascript/index.js deleted file mode 100644 index 0f0d0c1940d..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-javascript/index.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -const pulumi = require("@pulumi/pulumi"); -const aws = require("@pulumi/aws"); -const awsx = require("@pulumi/awsx"); - -const lb = new awsx.lb.ApplicationLoadBalancer("lb"); -const cluster = new aws.ecs.Cluster("cluster"); - -const service = new awsx.ecs.FargateService("service", { - cluster: cluster.arn, - assignPublicIp: true, - desiredCount: 2, - taskDefinitionArgs: { - container: { - name: "my-service", - image: "nginx:latest", - cpu: 128, - memory: 512, - essential: true, - portMappings: [{ - containerPort: 80, - targetGroup: lb.defaultTargetGroup, - }], - }, - }, -}); - -exports.url = pulumi.interpolate`http://${lb.loadBalancer.dnsName}`; diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-javascript/package.json b/themes/default/static/programs/awsx-load-balanced-fargate-nginx-javascript/package.json deleted file mode 100644 index 4bcc28043d5..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-javascript/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "awsx-load-balanced-fargate-nginx-javascript", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^6.0.0", - "@pulumi/awsx": "^2.0.0" - } -} diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-python/Pulumi.yaml b/themes/default/static/programs/awsx-load-balanced-fargate-nginx-python/Pulumi.yaml deleted file mode 100644 index df180fae58f..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-python/Pulumi.yaml +++ /dev/null @@ -1,2 +0,0 @@ -name: awsx-load-balanced-fargate-nginx-python -runtime: python diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-python/__main__.py b/themes/default/static/programs/awsx-load-balanced-fargate-nginx-python/__main__.py deleted file mode 100644 index 385be5e741d..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-python/__main__.py +++ /dev/null @@ -1,26 +0,0 @@ -import pulumi -import pulumi_aws as aws -import pulumi_awsx as awsx - -lb = awsx.lb.ApplicationLoadBalancer("lb") -cluster = aws.ecs.Cluster("cluster") - -service = awsx.ecs.FargateService("service", - cluster=cluster.arn, - assign_public_ip=True, - desired_count=2, - task_definition_args=awsx.ecs.FargateServiceTaskDefinitionArgs( - container=awsx.ecs.TaskDefinitionContainerDefinitionArgs( - name="my-service", - image="nginx:latest", - cpu=128, - memory=512, - essential=True, - port_mappings=[awsx.ecs.TaskDefinitionPortMappingArgs( - container_port=80, - target_group=lb.default_target_group, - )], - ), - )) - -pulumi.export("url", pulumi.Output.concat("http://", lb.load_balancer.dns_name)) diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-python/requirements.txt b/themes/default/static/programs/awsx-load-balanced-fargate-nginx-python/requirements.txt deleted file mode 100644 index 961f30bc6eb..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-python/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pulumi>=3.0.0,<4.0.0 -pulumi-aws>=6.0.0,<7.0.0 -pulumi-awsx>=2.0.0,<3.0.0 diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-typescript/Pulumi.yaml b/themes/default/static/programs/awsx-load-balanced-fargate-nginx-typescript/Pulumi.yaml deleted file mode 100644 index d2937506550..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-typescript/Pulumi.yaml +++ /dev/null @@ -1,2 +0,0 @@ -name: awsx-load-balanced-fargate-nginx-typescript -runtime: nodejs diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-typescript/index.ts b/themes/default/static/programs/awsx-load-balanced-fargate-nginx-typescript/index.ts deleted file mode 100644 index 5fdf94b3add..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-typescript/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -import * as pulumi from "@pulumi/pulumi"; -import * as aws from "@pulumi/aws"; -import * as awsx from "@pulumi/awsx"; - -const lb = new awsx.lb.ApplicationLoadBalancer("lb"); -const cluster = new aws.ecs.Cluster("cluster"); - -const service = new awsx.ecs.FargateService("service", { - cluster: cluster.arn, - assignPublicIp: true, - desiredCount: 2, - taskDefinitionArgs: { - container: { - name: "my-service", - image: "nginx:latest", - cpu: 128, - memory: 512, - essential: true, - portMappings: [{ - containerPort: 80, - targetGroup: lb.defaultTargetGroup, - }], - }, - }, -}); - -export const url = pulumi.interpolate`http://${lb.loadBalancer.dnsName}`; diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-typescript/package.json b/themes/default/static/programs/awsx-load-balanced-fargate-nginx-typescript/package.json deleted file mode 100644 index 78c2fe1d013..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-typescript/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "awsx-load-balanced-fargate-nginx-typescript", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^6.0.0", - "@pulumi/awsx": "^2.0.0" - } -} diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-typescript/tsconfig.json b/themes/default/static/programs/awsx-load-balanced-fargate-nginx-typescript/tsconfig.json deleted file mode 100644 index 11fc69af240..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-typescript/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", - ] -} \ No newline at end of file diff --git a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-yaml/Pulumi.yaml b/themes/default/static/programs/awsx-load-balanced-fargate-nginx-yaml/Pulumi.yaml deleted file mode 100644 index 36992b22062..00000000000 --- a/themes/default/static/programs/awsx-load-balanced-fargate-nginx-yaml/Pulumi.yaml +++ /dev/null @@ -1,24 +0,0 @@ -name: awsx-load-balanced-fargate-nginx-yaml -runtime: yaml -resources: - lb: - type: awsx:lb:ApplicationLoadBalancer - cluster: - type: aws:ecs:Cluster - service: - type: awsx:ecs:FargateService - properties: - cluster: ${cluster.arn} - assignPublicIp: true - taskDefinitionArgs: - container: - name: my-service - image: "nginx:latest" - cpu: 128 - memory: 512 - essential: true - portMappings: - - containerPort: 80 - targetGroup: ${lb.defaultTargetGroup} -outputs: - url: http://${lb.loadBalancer.dnsName} diff --git a/themes/default/static/programs/awsx-vpc-fargate-service-csharp/Program.cs b/themes/default/static/programs/awsx-vpc-fargate-service-csharp/Program.cs deleted file mode 100644 index 6f89035a729..00000000000 --- a/themes/default/static/programs/awsx-vpc-fargate-service-csharp/Program.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using Pulumi; -using Aws = Pulumi.Aws; -using Awsx = Pulumi.Awsx; - -return await Deployment.RunAsync(() => -{ - var vpc = new Awsx.Ec2.Vpc("vpc"); - - var securityGroup = new Aws.Ec2.SecurityGroup("securityGroup", new() - { - VpcId = vpc.VpcId, - Egress = new[] - { - new Aws.Ec2.Inputs.SecurityGroupEgressArgs - { - FromPort = 0, - ToPort = 0, - Protocol = "-1", - CidrBlocks = new[] - { - "0.0.0.0/0", - }, - Ipv6CidrBlocks = new[] - { - "::/0", - }, - }, - }, - }); - - var cluster = new Aws.Ecs.Cluster("cluster"); - - var service = new Awsx.Ecs.FargateService("service", new() - { - Cluster = cluster.Arn, - NetworkConfiguration = new Aws.Ecs.Inputs.ServiceNetworkConfigurationArgs - { - Subnets = vpc.PrivateSubnetIds, - SecurityGroups = new[] - { - securityGroup.Id, - }, - }, - DesiredCount = 2, - TaskDefinitionArgs = new Awsx.Ecs.Inputs.FargateServiceTaskDefinitionArgs - { - Container = new Awsx.Ecs.Inputs.TaskDefinitionContainerDefinitionArgs - { - Name = "my-service", - Image = "nginx:latest", - Cpu = 128, - Memory = 512, - Essential = true, - }, - }, - }); -}); diff --git a/themes/default/static/programs/awsx-vpc-fargate-service-csharp/Pulumi.yaml b/themes/default/static/programs/awsx-vpc-fargate-service-csharp/Pulumi.yaml deleted file mode 100644 index d38a7abbff2..00000000000 --- a/themes/default/static/programs/awsx-vpc-fargate-service-csharp/Pulumi.yaml +++ /dev/null @@ -1,2 +0,0 @@ -name: awsx-vpc-fargate-service-csharp -runtime: dotnet diff --git a/themes/default/static/programs/awsx-vpc-fargate-service-csharp/awsx-vpc-fargate-service-csharp.csproj b/themes/default/static/programs/awsx-vpc-fargate-service-csharp/awsx-vpc-fargate-service-csharp.csproj deleted file mode 100644 index 57ad013e16d..00000000000 --- a/themes/default/static/programs/awsx-vpc-fargate-service-csharp/awsx-vpc-fargate-service-csharp.csproj +++ /dev/null @@ -1,15 +0,0 @@ - - - - Exe - net6.0 - enable - - - - - - - - - diff --git a/themes/default/static/programs/awsx-vpc-fargate-service-go/Pulumi.yaml b/themes/default/static/programs/awsx-vpc-fargate-service-go/Pulumi.yaml deleted file mode 100644 index 2af45806a56..00000000000 --- a/themes/default/static/programs/awsx-vpc-fargate-service-go/Pulumi.yaml +++ /dev/null @@ -1,2 +0,0 @@ -name: awsx-vpc-fargate-service-go -runtime: go diff --git a/themes/default/static/programs/awsx-vpc-fargate-service-go/go.mod b/themes/default/static/programs/awsx-vpc-fargate-service-go/go.mod deleted file mode 100644 index 161501c8615..00000000000 --- a/themes/default/static/programs/awsx-vpc-fargate-service-go/go.mod +++ /dev/null @@ -1,95 +0,0 @@ -module awsx-vpc-fargate-service-yaml - -go 1.21 - -toolchain go1.21.0 - -require ( - github.com/pulumi/pulumi-aws/sdk/v6 v6.10.0 - github.com/pulumi/pulumi-awsx/sdk/v2 v2.2.0 - github.com/pulumi/pulumi/sdk/v3 v3.93.0 -) - -require ( - dario.cat/mergo v1.0.0 // indirect - github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect - github.com/acomagu/bufpipe v1.0.4 // indirect - github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect - github.com/agext/levenshtein v1.2.3 // indirect - github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect - github.com/atotto/clipboard v0.1.4 // indirect - github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect - github.com/blang/semver v3.5.1+incompatible // indirect - github.com/charmbracelet/bubbles v0.16.1 // indirect - github.com/charmbracelet/bubbletea v0.24.2 // indirect - github.com/charmbracelet/lipgloss v0.7.1 // indirect - github.com/cheggaaa/pb v1.0.29 // indirect - github.com/cloudflare/circl v1.3.3 // indirect - github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect - github.com/cyphar/filepath-securejoin v0.2.4 // indirect - github.com/djherbis/times v1.5.0 // indirect - github.com/emirpasic/gods v1.18.1 // indirect - github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect - github.com/go-git/go-billy/v5 v5.5.0 // indirect - github.com/go-git/go-git/v5 v5.9.0 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.1.0 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/hcl/v2 v2.17.0 // indirect - github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect - github.com/kevinburke/ssh_config v1.2.0 // indirect - github.com/lucasb-eyer/go-colorful v1.2.0 // indirect - github.com/mattn/go-isatty v0.0.18 // indirect - github.com/mattn/go-localereader v0.0.1 // indirect - github.com/mattn/go-runewidth v0.0.14 // indirect - github.com/mitchellh/go-ps v1.0.0 // indirect - github.com/mitchellh/go-wordwrap v1.0.1 // indirect - github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b // indirect - github.com/muesli/cancelreader v0.2.2 // indirect - github.com/muesli/reflow v0.3.0 // indirect - github.com/muesli/termenv v0.15.1 // indirect - github.com/opentracing/basictracer-go v1.1.0 // indirect - github.com/opentracing/opentracing-go v1.2.0 // indirect - github.com/pjbgf/sha1cd v0.3.0 // indirect - github.com/pkg/errors v0.9.1 // indirect - github.com/pkg/term v1.1.0 // indirect - github.com/pulumi/esc v0.5.6 // indirect - github.com/pulumi/pulumi-docker/sdk/v4 v4.4.3 // indirect - github.com/rivo/uniseg v0.4.4 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect - github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect - github.com/santhosh-tekuri/jsonschema/v5 v5.0.0 // indirect - github.com/sergi/go-diff v1.3.1 // indirect - github.com/skeema/knownhosts v1.2.0 // indirect - github.com/spf13/cobra v1.7.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/texttheater/golang-levenshtein v1.0.1 // indirect - github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect - github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect - github.com/uber/jaeger-lib v2.4.1+incompatible // indirect - github.com/xanzy/ssh-agent v0.3.3 // indirect - github.com/zclconf/go-cty v1.13.2 // indirect - go.uber.org/atomic v1.9.0 // indirect - golang.org/x/crypto v0.14.0 // indirect - golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect - golang.org/x/mod v0.13.0 // indirect - golang.org/x/net v0.17.0 // indirect - golang.org/x/sync v0.4.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/term v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect - golang.org/x/tools v0.14.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d // indirect - google.golang.org/grpc v1.57.1 // indirect - google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/warnings.v0 v0.1.2 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect - lukechampine.com/frand v1.4.2 // indirect - sourcegraph.com/sourcegraph/appdash v0.0.0-20211028080628-e2786a622600 // indirect -) diff --git a/themes/default/static/programs/awsx-vpc-fargate-service-go/main.go b/themes/default/static/programs/awsx-vpc-fargate-service-go/main.go deleted file mode 100644 index 7f3b4cd3845..00000000000 --- a/themes/default/static/programs/awsx-vpc-fargate-service-go/main.go +++ /dev/null @@ -1,69 +0,0 @@ -package main - -import ( - awsec2 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" - "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs" - "github.com/pulumi/pulumi-awsx/sdk/v2/go/awsx/ec2" - awsxecs "github.com/pulumi/pulumi-awsx/sdk/v2/go/awsx/ecs" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" -) - -func main() { - pulumi.Run(func(ctx *pulumi.Context) error { - - vpc, err := ec2.NewVpc(ctx, "vpc", nil) - if err != nil { - return err - } - - securityGroup, err := awsec2.NewSecurityGroup(ctx, "securityGroup", &awsec2.SecurityGroupArgs{ - VpcId: vpc.VpcId, - Egress: awsec2.SecurityGroupEgressArray{ - &awsec2.SecurityGroupEgressArgs{ - FromPort: pulumi.Int(0), - ToPort: pulumi.Int(0), - Protocol: pulumi.String("-1"), - CidrBlocks: pulumi.StringArray{ - pulumi.String("0.0.0.0/0"), - }, - Ipv6CidrBlocks: pulumi.StringArray{ - pulumi.String("::/0"), - }, - }, - }, - }) - if err != nil { - return err - } - - cluster, err := ecs.NewCluster(ctx, "cluster", nil) - if err != nil { - return err - } - - _, err = awsxecs.NewFargateService(ctx, "service", &awsxecs.FargateServiceArgs{ - Cluster: cluster.Arn, - NetworkConfiguration: &ecs.ServiceNetworkConfigurationArgs{ - Subnets: vpc.PrivateSubnetIds, - SecurityGroups: pulumi.StringArray{ - securityGroup.ID(), - }, - }, - DesiredCount: pulumi.Int(2), - TaskDefinitionArgs: &awsxecs.FargateServiceTaskDefinitionArgs{ - Container: &awsxecs.TaskDefinitionContainerDefinitionArgs{ - Name: pulumi.String("my-service"), - Image: pulumi.String("nginx:latest"), - Cpu: pulumi.Int(128), - Memory: pulumi.Int(512), - Essential: pulumi.Bool(true), - }, - }, - }) - if err != nil { - return err - } - - return nil - }) -} diff --git a/themes/default/static/programs/awsx-vpc-fargate-service-java/Pulumi.yaml b/themes/default/static/programs/awsx-vpc-fargate-service-java/Pulumi.yaml deleted file mode 100644 index 364368f4e14..00000000000 --- a/themes/default/static/programs/awsx-vpc-fargate-service-java/Pulumi.yaml +++ /dev/null @@ -1,2 +0,0 @@ -name: awsx-vpc-fargate-service-java -runtime: java diff --git a/themes/default/static/programs/awsx-vpc-fargate-service-java/pom.xml b/themes/default/static/programs/awsx-vpc-fargate-service-java/pom.xml deleted file mode 100644 index 05a393f543d..00000000000 --- a/themes/default/static/programs/awsx-vpc-fargate-service-java/pom.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - 4.0.0 - - com.pulumi - awsx-vpc-fargate-service-java - 1.0-SNAPSHOT - - - UTF-8 - 11 - 11 - 11 - myproject.App - - - - - - com.pulumi - pulumi - (,1.0] - - - com.pulumi - aws - (6.0.0,6.99] - - - com.pulumi - awsx - (2.0.0,2.99] - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.2 - - - - true - ${mainClass} - - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.4.2 - - - - true - ${mainClass} - - - - jar-with-dependencies - - - - - make-my-jar-with-dependencies - package - - single - - - - - - org.codehaus.mojo - exec-maven-plugin - 3.1.0 - - ${mainClass} - ${mainArgs} - - - - org.apache.maven.plugins - maven-wrapper-plugin - 3.1.1 - - 3.8.5 - - - - - diff --git a/themes/default/static/programs/awsx-vpc-fargate-service-java/src/main/java/myproject/App.java b/themes/default/static/programs/awsx-vpc-fargate-service-java/src/main/java/myproject/App.java deleted file mode 100644 index 473dea7b7a1..00000000000 --- a/themes/default/static/programs/awsx-vpc-fargate-service-java/src/main/java/myproject/App.java +++ /dev/null @@ -1,46 +0,0 @@ -package myproject; - -import com.pulumi.Context; -import com.pulumi.Pulumi; -import com.pulumi.core.Output; -import com.pulumi.awsx.ecr.Repository; -import com.pulumi.awsx.ecr.RepositoryArgs; -import com.pulumi.aws.ecs.Cluster; -import com.pulumi.awsx.lb.ApplicationLoadBalancer; -import com.pulumi.awsx.ecs.FargateService; -import com.pulumi.awsx.ecs.FargateServiceArgs; -import com.pulumi.awsx.ecs.inputs.FargateServiceTaskDefinitionArgs; -import com.pulumi.awsx.ecs.inputs.TaskDefinitionContainerDefinitionArgs; -import com.pulumi.awsx.ecs.inputs.TaskDefinitionPortMappingArgs; - -public class App { - public static void main(String[] args) { - Pulumi.run(App::stack); - } - - public static void stack(Context ctx) { - var cluster = new Cluster("cluster"); - - var lb = new ApplicationLoadBalancer("lb"); - - var service = new FargateService("service", FargateServiceArgs.builder() - .cluster(cluster.arn()) - .assignPublicIp(true) - .desiredCount(2) - .taskDefinitionArgs(FargateServiceTaskDefinitionArgs.builder() - .container(TaskDefinitionContainerDefinitionArgs.builder() - .name("my-service") - .image("nginx:latest") - .cpu(512) - .memory(128) - .essential(true) - .portMappings(TaskDefinitionPortMappingArgs.builder() - .targetGroup(lb.defaultTargetGroup()) - .build()) - .build()) - .build()) - .build()); - - ctx.export("url", lb.loadBalancer().applyValue(loadBalancer -> loadBalancer.dnsName())); - } -} diff --git a/themes/default/static/programs/awsx-vpc-fargate-service-javascript/Pulumi.yaml b/themes/default/static/programs/awsx-vpc-fargate-service-javascript/Pulumi.yaml deleted file mode 100644 index b3af8730758..00000000000 --- a/themes/default/static/programs/awsx-vpc-fargate-service-javascript/Pulumi.yaml +++ /dev/null @@ -1,5 +0,0 @@ -name: awsx-vpc-fargate-service-javascript -runtime: - name: nodejs - options: - typescript: false diff --git a/themes/default/static/programs/awsx-vpc-fargate-service-javascript/index.js b/themes/default/static/programs/awsx-vpc-fargate-service-javascript/index.js deleted file mode 100644 index ac576cd6db6..00000000000 --- a/themes/default/static/programs/awsx-vpc-fargate-service-javascript/index.js +++ /dev/null @@ -1,37 +0,0 @@ -"use strict"; -const pulumi = require("@pulumi/pulumi"); -const aws = require("@pulumi/aws"); -const awsx = require("@pulumi/awsx"); - -const vpc = new awsx.ec2.Vpc("vpc"); - -const securityGroup = new aws.ec2.SecurityGroup("securityGroup", { - vpcId: vpc.vpcId, - egress: [{ - fromPort: 0, - toPort: 0, - protocol: "-1", - cidrBlocks: ["0.0.0.0/0"], - ipv6CidrBlocks: ["::/0"], - }], -}); - -const cluster = new aws.ecs.Cluster("cluster", {}); - -const service = new awsx.ecs.FargateService("service", { - cluster: cluster.arn, - networkConfiguration: { - subnets: vpc.privateSubnetIds, - securityGroups: [securityGroup.id], - }, - desiredCount: 2, - taskDefinitionArgs: { - container: { - name: "my-service", - image: "nginx:latest", - cpu: 128, - memory: 512, - essential: true, - }, - }, -}); diff --git a/themes/default/static/programs/awsx-vpc-fargate-service-javascript/package.json b/themes/default/static/programs/awsx-vpc-fargate-service-javascript/package.json deleted file mode 100644 index f5b9db80fd4..00000000000 --- a/themes/default/static/programs/awsx-vpc-fargate-service-javascript/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "awsx-vpc-fargate-service-javascript", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^6.0.0", - "@pulumi/awsx": "^2.0.0" - } -} diff --git a/themes/default/static/programs/awsx-vpc-fargate-service-python/Pulumi.yaml b/themes/default/static/programs/awsx-vpc-fargate-service-python/Pulumi.yaml deleted file mode 100644 index 13aa9494567..00000000000 --- a/themes/default/static/programs/awsx-vpc-fargate-service-python/Pulumi.yaml +++ /dev/null @@ -1,2 +0,0 @@ -name: awsx-vpc-fargate-service-python -runtime: python diff --git a/themes/default/static/programs/awsx-vpc-fargate-service-python/__main__.py b/themes/default/static/programs/awsx-vpc-fargate-service-python/__main__.py deleted file mode 100644 index d66d407586d..00000000000 --- a/themes/default/static/programs/awsx-vpc-fargate-service-python/__main__.py +++ /dev/null @@ -1,39 +0,0 @@ -import pulumi -import pulumi_aws as aws -import pulumi_awsx as awsx - -vpc = awsx.ec2.Vpc("vpc") - -security_group = aws.ec2.SecurityGroup( - "securityGroup", - vpc_id=vpc.vpc_id, - egress=[ - aws.ec2.SecurityGroupEgressArgs( - from_port=0, - to_port=0, - protocol="-1", - cidr_blocks=["0.0.0.0/0"], - ipv6_cidr_blocks=["::/0"], - ) - ], -) - -cluster = aws.ecs.Cluster("cluster") - -service = awsx.ecs.FargateService( - "service", - cluster=cluster.arn, - network_configuration=aws.ecs.ServiceNetworkConfigurationArgs( - subnets=vpc.private_subnet_ids, security_groups=[security_group.id] - ), - desired_count=2, - task_definition_args=awsx.ecs.FargateServiceTaskDefinitionArgs( - container=awsx.ecs.TaskDefinitionContainerDefinitionArgs( - name="my-service", - image="nginx:latest", - cpu=512, - memory=128, - essential=True, - ), - ), -) diff --git a/themes/default/static/programs/awsx-vpc-fargate-service-python/requirements.txt b/themes/default/static/programs/awsx-vpc-fargate-service-python/requirements.txt deleted file mode 100644 index 961f30bc6eb..00000000000 --- a/themes/default/static/programs/awsx-vpc-fargate-service-python/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -pulumi>=3.0.0,<4.0.0 -pulumi-aws>=6.0.0,<7.0.0 -pulumi-awsx>=2.0.0,<3.0.0 diff --git a/themes/default/static/programs/awsx-vpc-fargate-service-typescript/Pulumi.yaml b/themes/default/static/programs/awsx-vpc-fargate-service-typescript/Pulumi.yaml deleted file mode 100644 index 83334cd7471..00000000000 --- a/themes/default/static/programs/awsx-vpc-fargate-service-typescript/Pulumi.yaml +++ /dev/null @@ -1,2 +0,0 @@ -name: awsx-vpc-fargate-service-typescript -runtime: nodejs diff --git a/themes/default/static/programs/awsx-vpc-fargate-service-typescript/index.ts b/themes/default/static/programs/awsx-vpc-fargate-service-typescript/index.ts deleted file mode 100644 index 03e118c45ce..00000000000 --- a/themes/default/static/programs/awsx-vpc-fargate-service-typescript/index.ts +++ /dev/null @@ -1,36 +0,0 @@ -import * as pulumi from "@pulumi/pulumi"; -import * as aws from "@pulumi/aws"; -import * as awsx from "@pulumi/awsx"; - -const vpc = new awsx.ec2.Vpc("vpc"); - -const securityGroup = new aws.ec2.SecurityGroup("securityGroup", { - vpcId: vpc.vpcId, - egress: [{ - fromPort: 0, - toPort: 0, - protocol: "-1", - cidrBlocks: ["0.0.0.0/0"], - ipv6CidrBlocks: ["::/0"], - }], -}); - -const cluster = new aws.ecs.Cluster("cluster", {}); - -const service = new awsx.ecs.FargateService("service", { - cluster: cluster.arn, - networkConfiguration: { - subnets: vpc.privateSubnetIds, - securityGroups: [securityGroup.id], - }, - desiredCount: 2, - taskDefinitionArgs: { - container: { - name: "my-service", - image: "nginx:latest", - cpu: 128, - memory: 512, - essential: true, - }, - }, -}); diff --git a/themes/default/static/programs/awsx-vpc-fargate-service-typescript/package.json b/themes/default/static/programs/awsx-vpc-fargate-service-typescript/package.json deleted file mode 100644 index f2cdb537458..00000000000 --- a/themes/default/static/programs/awsx-vpc-fargate-service-typescript/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "awsx-vpc-fargate-service-typescript", - "devDependencies": { - "@types/node": "^14" - }, - "dependencies": { - "typescript": "^4.0.0", - "@pulumi/pulumi": "^3.0.0", - "@pulumi/aws": "^6.0.0", - "@pulumi/awsx": "^2.0.0" - } -} diff --git a/themes/default/static/programs/awsx-vpc-fargate-service-typescript/tsconfig.json b/themes/default/static/programs/awsx-vpc-fargate-service-typescript/tsconfig.json deleted file mode 100644 index 11fc69af240..00000000000 --- a/themes/default/static/programs/awsx-vpc-fargate-service-typescript/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", - ] -} \ No newline at end of file diff --git a/themes/default/static/programs/awsx-vpc-fargate-service-yaml/Pulumi.yaml b/themes/default/static/programs/awsx-vpc-fargate-service-yaml/Pulumi.yaml deleted file mode 100644 index cf7d9d787c7..00000000000 --- a/themes/default/static/programs/awsx-vpc-fargate-service-yaml/Pulumi.yaml +++ /dev/null @@ -1,35 +0,0 @@ -name: awsx-vpc-fargate-service-yaml -runtime: yaml -resources: - vpc: - type: awsx:ec2:Vpc - securityGroup: - type: aws:ec2:SecurityGroup - properties: - vpcId: ${vpc.vpcId} - egress: - - fromPort: 0 - toPort: 0 - protocol: -1 - cidrBlocks: - - 0.0.0.0/0 - ipv6CidrBlocks: - - "::/0" - cluster: - type: aws:ecs:Cluster - service: - type: awsx:ecs:FargateService - properties: - cluster: ${cluster.arn} - networkConfiguration: - subnets: ${vpc.privateSubnetIds} - securityGroups: - - ${securityGroup.id} - desiredCount: 2 - taskDefinitionArgs: - container: - name: my-service - image: nginx:latest - cpu: 128 - memory: 512 - essential: true