Dean
03/13/2024, 9:25 PMDean
03/13/2024, 9:26 PMcomponent {
property name='aws' inject='aws@awscfml';
property name='moduleSettings' inject='commandbox:moduleSettings:studylink-env';
property name='systemSettings' inject='systemSettings';
public void function onCLIStart( required struct interceptData ) {
systemOutput(moduleSettings)
// Pull the secrets from SecretManager and create environment variables for them
var secret_response = aws.secretsmanager.GetSecretValue( SecretId=moduleSettings.secretId, region = moduleSettings.defaultRegion );
var secrets = deserializejson(secret_response.data.SecretString)
for (var secret in secrets) {
systemSettings.setSystemSetting( secret, secrets[ secret ] );
}
}
}
Dean
03/13/2024, 9:27 PM11.62 | Eureka, '/app/studylink-env/' has been installed!
11.62 | Activating your new module for instant use...
11.62 | √ | Installing package [forgebox:aws-cfml@1.33.0]
11.64
11.64
11.64
11.64 ERROR (5.9.1+00767)
11.64
11.64 Error building: aws@awscfml -> Unable to resolve AWS credentials..
11.64
11.64 DSL: , Path: /usr/local/lib/CommandBox/cfml/modules/studylink-env/modules/awscfml.aws,Error Location:/usr/local/lib/CommandBox/cfml/modules/studylink-env/modules/awscfml/com/credentials.cfc:97/usr/local/lib/CommandBox/cfml/modules/studylink-env/modules/awscfml/com/credentials.cfc:13/usr/local/lib/CommandBox/cfml/modules/studylink-env/modules/awscfml/com/api.cfc:17/usr/local/lib/CommandBox/cfml/modules/studylink-env/modules/awscfml/aws.cfc:63
11.64 /system/wirebox/system/ioc/Builder.cfc: line 220
11.64 218: detail = "DSL: #thisMap.getDSL()#, Path: #thisMap.getPath()#,
11.64 219: Error Location:
11.64 220: #reducedTagContext#"
11.64 221: );
11.64 222: }
Dean
03/13/2024, 9:28 PMbdw429s
03/13/2024, 9:49 PMbdw429s
03/13/2024, 9:50 PMaws@awscfml
instance which is injected into your class
property name='aws' inject='aws@awscfml';
bdw429s
03/13/2024, 9:50 PMbdw429s
03/13/2024, 9:51 PMDean
03/13/2024, 9:52 PMdocker build
bdw429s
03/13/2024, 9:52 PMbdw429s
03/13/2024, 9:52 PMbdw429s
03/13/2024, 9:52 PMbdw429s
03/13/2024, 9:52 PMbdw429s
03/13/2024, 9:53 PMDean
03/13/2024, 9:53 PMDean
03/13/2024, 9:53 PMDean
03/13/2024, 9:53 PMnew module.aws...
Dean
03/13/2024, 9:53 PMbdw429s
03/13/2024, 9:54 PMbdw429s
03/13/2024, 9:54 PMbdw429s
03/13/2024, 9:54 PMbdw429s
03/13/2024, 9:54 PMbdw429s
03/13/2024, 9:54 PMDean
03/13/2024, 9:54 PMbdw429s
03/13/2024, 9:55 PMgetInstance( dsl="aws@awscfml" )
bdw429s
03/13/2024, 9:55 PMbdw429s
03/13/2024, 9:56 PMgetInstance( "aws@awscfml" )
should work too since that's not really a DSLbdw429s
03/13/2024, 9:56 PMwirebox.getINstance()
. I'm not sure what you have access to right thereDean
03/13/2024, 9:56 PMbdw429s
03/13/2024, 9:56 PMbdw429s
03/13/2024, 9:56 PMbdw429s
03/13/2024, 9:57 PMonCLIStart()
if it were mebdw429s
03/13/2024, 9:57 PMDean
03/13/2024, 9:58 PMDean
03/13/2024, 10:02 PMgetInstance
to load the included module I was missing.
[INFO] 2024-03-13T22:01:25Z - Error building: aws@awscfml -> Unable to resolve AWS credentials.
. √ | Starting Server
|------------------------------
| Looking for server JSON file by convention: /app//server.json
Dean
03/13/2024, 10:02 PMDean
03/13/2024, 10:03 PM