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

aws-apprunner-alpha: environmentSecrets are not update #28103

Closed
cjoecker opened this issue Nov 22, 2023 · 1 comment
Closed

aws-apprunner-alpha: environmentSecrets are not update #28103

cjoecker opened this issue Nov 22, 2023 · 1 comment
Labels
@aws-cdk/aws-apprunner Related to the apprunner package bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@cjoecker
Copy link

Describe the bug

I have an app deployed like this:

	const service = new Service(scope, "service", {
		serviceName: "WebApp",
		instanceRole,
		cpu: Cpu.ONE_VCPU,
		memory: Memory.TWO_GB,
		accessRole,
		source: Source.fromAsset({
			imageConfiguration: {
				port: 3000,
				environmentVariables: checkedEnvVariables,
				environmentSecrets: {
					SECRET: Secret.fromSecretsManager(secret),
				},
			},
			asset: dockerImageAsset,
		}),
		vpcConnector,
	});

Once it is deployed, if I add another secret like this, the secret are not updated:

	const service = new Service(scope, "service", {
		serviceName: "WebApp",
		instanceRole,
		cpu: Cpu.ONE_VCPU,
		memory: Memory.TWO_GB,
		accessRole,
		source: Source.fromAsset({
			imageConfiguration: {
				port: 3000,
				environmentVariables: checkedEnvVariables,
				environmentSecrets: {
					SECRET: Secret.fromSecretsManager(secret),
					SECRET2: Secret.fromSecretsManager(secret2),  // this is new
				},
			},
			asset: dockerImageAsset,
		}),
		vpcConnector,
	});

As a workaround, I have service.addSecret that is working to add new secrets

Expected Behavior

Secrets are updated when they are added to environmentSecrets object

Current Behavior

Secrets are NOT updated when they are added to environmentSecrets object

Reproduction Steps

See bug description

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.110.1 (build 0d37f0d)

Framework Version

"@aws-cdk/aws-apprunner-alpha": "^2.110.1-alpha.0" , "aws-cdk-lib": "^2.110.1",

Node.js Version

18.16.0

OS

MacOS

Language

TypeScript

Language Version

No response

Other information

No response

@cjoecker cjoecker added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 22, 2023
@github-actions github-actions bot added the @aws-cdk/aws-apprunner Related to the apprunner package label Nov 22, 2023
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-apprunner Related to the apprunner package bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

1 participant