We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
const yaml = require('js-yaml'); // Sample data const pipelineData = { appName: "sample-app", eksEnv: "dev", secretProviderClass: { parameters: {} } }; const jmesPathEntries = [ { path: "CONFIG_services_postgres_password", objectAlias: "postgres_password" } ]; // Build the objects section with proper formatting pipelineData.secretProviderClass.parameters.objects = `|\n - objectName: "ktp/${pipelineData.appName}/${pipelineData.eksEnv}/secrets"\n objectType: "secretsmanager"\n jmesPath:\n${jmesPathEntries.map(entry => ` - path: ${entry.path}\n objectAlias: ${entry.objectAlias}`).join('\n')}`; // Convert to YAML const yamlStr = yaml.dump(pipelineData.secretProviderClass.parameters); console.log(yamlStr);
parameters: objects: "|\n - objectName: \"domain/sample-app/dev/secrets\"\n objectType: \"secretsmanager\"\n jmesPath:- path: CONFIG_services_postgres_password \r\n objectAlias: postgres_password"
parameters: objects: | - objectName: "domain/sample-app/dev/secrets" objectType: "secretsmanager" jmesPath: - path: CONFIG_services_postgres_password objectAlias: postgres_password
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Output
Expected Output:
The text was updated successfully, but these errors were encountered: