Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StandardAppVersion app engine application errors out with no way to debug #2391

Open
pgege opened this issue Sep 18, 2024 · 3 comments
Open
Labels
awaiting-feedback Blocked on input from the author kind/bug Some behavior is incorrect or out of spec

Comments

@pgege
Copy link

pgege commented Sep 18, 2024

Describe what happened

I have been trying to use Pulumi to deploy a standard app engine application for some time now and I feel like I'm spinning my wheels. It always produces an error and after checking my logs on google cloud, I see nothing. Am I missing something?

Sample program

// 1. Create a Google Cloud Storage bucket to store the app code
const storageBucket = new gcp.storage.Bucket("storage-bucket", {
    name: `${project}-${stack}-storage-bucket`, // Bucket name must be globally unique
    location: region,
    forceDestroy: true,
});

const publicAccess = new gcp.storage.BucketIAMMember("public-access", {
    bucket: storageBucket.name,
    role: "roles/storage.objectViewer",
    member: "allUsers",
});

// 2. Package your application code
const appArchive = new pulumi.asset.FileArchive(appDir);

// 3. Upload the application code to the bucket
const appObject = new gcp.storage.BucketObject("app-object", {
    name: "app.zip",
    bucket: storageBucket.name,
    source: appArchive,
});

// 4. Reserve a static IP address (for outbound traffic)
const staticIp = new gcp.compute.Address("static-ip", {
    name: `${project}-${stack}-static-ip`,
    region: region,
});

// 5. Create a VPC Network
const network = new gcp.compute.Network("vpc-network", {
    name: `${project}-${stack}-network`,
    autoCreateSubnetworks: false,
});

// 6. Create a Subnetwork
const subnetwork = new gcp.compute.Subnetwork("vpc-subnetwork", {
    name: `${project}-${stack}-subnetwork`,
    ipCidrRange: "10.0.0.0/28",
    region: region,
    network: network.id,
});

// 7. Create a Serverless VPC Access Connector
const vpcConnector = new gcp.vpcaccess.Connector("vpc-connector", {
    name: `vpc-connect`,
    region: region,
    network: network.name,
    ipCidrRange: "10.8.0.0/28",
});

// 8. Create a Cloud NAT to allow outbound traffic with the static IP
const router = new gcp.compute.Router("vpc-router", {
    name: `${project}-${stack}-router`,
    region: region,
    network: network.id,
});

const nat = new gcp.compute.RouterNat("vpc-nat", {
    name: `${project}-${stack}-nat`,
    router: router.name,
    region: region,
    natIpAllocateOption: "MANUAL_ONLY",
    natIps: [staticIp.id],
    sourceSubnetworkIpRangesToNat: "ALL_SUBNETWORKS_ALL_IP_RANGES",
});

// 9. Deploy the App Engine application
const appEngineApp = new gcp.appengine.Application("app-engine-app", {
    locationId: region,
}, { protect: true });

const appEngineVersion = new gcp.appengine.StandardAppVersion("app-engine-version", {
    versionId: "v1",
    service: "default",
    runtime: "nodejs20", // Set your runtime
    entrypoint: {
        shell: "npm run start",
    },
    deployment: {
        zip: {
            sourceUrl: pulumi.interpolate`https://storage.googleapis.com/${storageBucket.name}/${appObject.name}`,
        },
    },
    envVariables: {
        NODE_ENV: "production",
        PORT: "8080"
    },
    vpcAccessConnector: {
        name: vpcConnector.id,
        egressSetting: "ALL_TRAFFIC",
    },
    deleteServiceOnDestroy: true,
    serviceAccount: "[email protected]"
}, { dependsOn: [appEngineApp, vpcConnector] });

Log output

sdk-v2/provider2.go:457: sdk.helper_schema: Error waiting to create StandardAppVersion: Error waiting for Creating StandardAppVersion: Error code 13, message: An internal error occurred.: [email protected]

Affected Resource(s)

StandardAppVersion

Output of pulumi about

CLI          
Version      3.133.0
Go Version   go1.23.1
Go Compiler  gc

Plugins
KIND      NAME    VERSION
resource  gcp     8.1.0
language  nodejs  unknown

Host     
OS       darwin
Version  14.6.1
Arch     arm64

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@pgege pgege added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Sep 18, 2024
@iwahbe
Copy link
Member

iwahbe commented Sep 18, 2024

Hi @pgege. I'm sorry your having issues here.

Have you checked out the google-cloud channel in our community slack?

Otherwise, could you post the entire error message.

@iwahbe iwahbe added awaiting-feedback Blocked on input from the author and removed needs-triage Needs attention from the triage team labels Sep 18, 2024
@pgege
Copy link
Author

pgege commented Sep 25, 2024

I will try that channel, the log output I shared is the extent of the error message I get. Makes it challenging to understand what's going on.

@pulumi-bot pulumi-bot added needs-triage Needs attention from the triage team and removed awaiting-feedback Blocked on input from the author labels Sep 25, 2024
@guineveresaenger guineveresaenger added awaiting-feedback Blocked on input from the author and removed needs-triage Needs attention from the triage team labels Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-feedback Blocked on input from the author kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

4 participants