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

Enable intrinsic function for configs #640

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix validation issue
This commit allows to use intrinsic function for waf and xray
eacet committed Sep 3, 2024
commit bfebe490348ebe1b661c47ec87a766079ca78502
27 changes: 23 additions & 4 deletions src/validation.ts
Original file line number Diff line number Diff line change
@@ -128,7 +128,7 @@ export const appSyncSchema = {
oidcAuth: {
type: 'object',
properties: {
issuer: { type: 'string' },
issuer: { $ref: '#/definitions/stringOrIntrinsicFunction' },
clientId: { type: 'string' },
iatTTL: { type: 'number' },
authTTL: { type: 'number' },
@@ -630,6 +630,9 @@ export const appSyncSchema = {
},
required: ['eventBusArn'],
},
xrayEnabledConfig: {
$ref: '#/definitions/lambdaFunctionConfig',
},
},
properties: {
name: { type: 'string' },
@@ -685,7 +688,13 @@ export const appSyncSchema = {
'when using CloudFormation, you must provide either certificateArn or hostedZoneId.',
},
},
xrayEnabled: { type: 'boolean' },
xrayEnabled: {
oneOf: [
{ type: 'boolean' },
{ $ref: '#/definitions/stringOrIntrinsicFunction' },
],
errorMessage: 'must be a boolean or a CloudFormation intrinsic function',
},
visibility: {
type: 'string',
enum: ['GLOBAL', 'PRIVATE'],
@@ -699,7 +708,12 @@ export const appSyncSchema = {
waf: {
type: 'object',
properties: {
enabled: { type: 'boolean' },
enabled: {
oneOf: [
{ type: 'boolean' },
{ $ref: '#/definitions/stringOrIntrinsicFunction' },
],
},
},
if: {
required: ['arn'],
@@ -805,7 +819,12 @@ export const appSyncSchema = {
errorMessage: "must be one of 'ALL', 'ERROR' or 'NONE'",
},
retentionInDays: { type: 'integer' },
excludeVerboseContent: { type: 'boolean' },
excludeVerboseContent: {
oneOf: [
{ type: 'boolean' },
{ $ref: '#/definitions/stringOrIntrinsicFunction' },
],
},
enabled: { type: 'boolean' },
},
required: ['level'],