Skip to content

aws_appconfig, cdk.Fn.import_value: Error: Missing required parameters for environment ARN: format should be /$/{applicationId}/environment//$/{environmentId} #31580

Open
@vivekrpatel8

Description

@vivekrpatel8

Describe the bug

I am creating environment for my AWS App Config using

environment = app.add_environement(id, environment_name)
cdk.CfnOutput(self, "EnvArn", export_name="EnvArn", value=environment.environment_arn)

I am using static method which returns the environment using ARN:

env_arn = cdk.Fn.import_value("EnvArn")
env = Environment.from_environment_arn(scope, construct_id, environment_arn = env_arn)

but getting following error:
@jsii/kernel.RuntimeError: Error: Missing required parameters for environment ARN: format should be /$/{applicationId}/environment//$/{environmentId}

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Version

No response

Expected Behavior

It should return environment

Current Behavior

It is throwing error as mentioned

Reproduction Steps

Create environment and try to import it as mentioned in the description

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.154.1

Framework Version

No response

Node.js Version

20.0.0

OS

Windows

Language

Python

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-appconfigRelated to AWS AppConfig@aws-cdk/coreRelated to core CDK functionalitybugThis issue is a bug.effort/smallSmall work item – less than a day of effortp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions