pulumi / pulumi-aws-native

AWS Native Provider for Pulumi
Apache License 2.0
94 stars 17 forks source link

AppRunner fails with Operation Create failed #487

Open kingwill101 opened 2 years ago

kingwill101 commented 2 years ago

What happened?

AppRunner fails with Operation Create failed

Steps to reproduce

            vpcConnectorName: "connector",
            subnets: subnets,
            securityGroups: args.appSecurityGroupIds
        })

        const instanceRole = new awsNative.iam.Role(
            `${name}-appRunnerinstanceRole`,

            {
                managedPolicyArns: ["arn:aws:iam::aws:policy/AmazonRDSFullAccess"],
                assumeRolePolicyDocument: JSON.stringify(
                    {
                        Version: "2012-10-17",
                        Statement: [{
                            Action: "sts:AssumeRole",
                            Principal: {
                                Service: ["tasks.apprunner.amazonaws.com"]
                            },
                            Effect: "Allow",
                            Sid: "",
                        }],
                    }
                ),
            },
            {parent: this}
        )

        const app = new awsNative.apprunner.Service(`${name}-application`, {
            serviceName: name,
            observabilityConfiguration: {
                observabilityEnabled: true
            },
            instanceConfiguration: {
                instanceRoleArn: instanceRole.arn,
            },
            networkConfiguration: {
                egressConfiguration: {
                    vpcConnectorArn: vpcConnector.vpcConnectorArn,
                    egressType: "VPC"
                }
            },
            sourceConfiguration: {

                autoDeploymentsEnabled: true,
                authenticationConfiguration: {
                    accessRoleArn: role.arn,
                },
                imageRepository: {
                    imageRepositoryType: "ECR",
                    imageIdentifier: image.imageName,
                    imageConfiguration: {
                        port: args.environmentVariables?.PORT || "8080",
                        runtimeEnvironmentVariables: appEnv
                    },
                },
            },
        })

Expected Behavior

AppRunner creation should report success

Actual Behavior

└─ aws-native:apprunner:Service        apprunner-application      **creating failed**     1 error

Diagnostics:
  aws-native:apprunner:Service (apprunner-application):
    error: operation CREATE failed with "InternalFailure":

Versions used

@pulumi/aws-native": "^0.16.1"

Additional context

It works fine with aws-classic but classic lacks the observabilty option so native is the only option i have to use right now

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).

mjeffryes commented 3 weeks ago

This issue hasn't seen any activity in the last 180 days. If you are still seeing this problem, please leave a comment to let us know that this is still an active issue.