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

feat: Generate sam deploy schema #5504

Merged
merged 35 commits into from
Jul 14, 2023
Merged
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
025357d
chore: use amazon ecr credential helper in windows appveyor (#5446)
moelasmar Jul 5, 2023
b6b4e39
chore: bump version to 1.90.0 (#5448)
moelasmar Jul 5, 2023
3603e12
fix: Handler path mapping for layer-wrapped esbuild functions (#5450)
mildaniel Jul 5, 2023
cee2d3d
fix: fix macos reproducable task and gh actions (#5455)
mndeveci Jul 6, 2023
16a1740
feat(sync): support build-image option (#5441)
elvishp2006 Jul 6, 2023
58faff0
fix: Avoid Certain Depedendency Version (#5460)
mildaniel Jul 7, 2023
cca9f93
Fix broken e2e test (#5459)
mildaniel Jul 7, 2023
0bd4c58
add pip check after all pip install in pyinstaller scripts (#5463)
hawflau Jul 7, 2023
f07e80d
chore: fix typo in help text of `pipeline bootstrap` (#5467)
efekarakus Jul 7, 2023
055b727
chore: update aws-sam-translator to 1.71.0 (#5462)
github-actions[bot] Jul 7, 2023
c78c617
chore(deps): bump cryptography from 41.0.0 to 41.0.1 in /requirements…
dependabot[bot] Jul 10, 2023
cb5e46b
fix: E2E test can't find esbuild binary (#5476)
mildaniel Jul 10, 2023
d5ce6d5
fix(invoke): Write in UTF-8 string instead of bytes (#5427)
jfuss Jul 10, 2023
7efaac1
feat: Add remote invoke implementation for step functions (#5458)
hnnasit Jul 11, 2023
f508c57
fix: use images.build rather than low level build API to catch errors…
mndeveci Jul 11, 2023
df526d8
Relax document version check for authorizers (#5477)
lucashuy Jul 11, 2023
577d0d4
fix: use StringIO instead of BytesIO with StreamWriter (#5485)
mndeveci Jul 12, 2023
50c04dd
chore: Update dependabot config (#5491)
mildaniel Jul 12, 2023
baff742
feat: Support YAML file formats for config files (#5469)
lucashuy Jul 12, 2023
7821962
Generate sam deploy schema
Jul 12, 2023
f358403
chore(deps): bump cryptography from 41.0.1 to 41.0.2 in /requirements…
dependabot[bot] Jul 12, 2023
24a541c
chore(deps): bump rich from 13.3.3 to 13.4.2 in /requirements (#5495)
dependabot[bot] Jul 13, 2023
eb18ec1
Allow greater versions of typing_extensions (#5489)
berzi Jul 13, 2023
c59e3d5
chore: bump version to 1.91.0 (#5506)
lucashuy Jul 13, 2023
eedd1ee
fix: Pin click to be < 8.1.4 temporarily (#5511)
mildaniel Jul 13, 2023
36f8bf9
fix: Revert UTF-8 fixes #5485 and #5427 (#5512)
lucashuy Jul 13, 2023
dd96898
fix: Bump timeout (#5510)
mildaniel Jul 13, 2023
8418494
chore(deps): bump botocore from 1.29.135 to 1.31.2 in /requirements (…
dependabot[bot] Jul 13, 2023
6a41212
Add field for JSON arrays
Jul 14, 2023
b49018d
Remove config_env and config_file params
Jul 14, 2023
e42c29b
Linting and formatting
Jul 14, 2023
bf33e0d
Merge branch 'develop' into feat/json-schema
Jul 14, 2023
412f283
Fix failing tests
Jul 14, 2023
ed398c1
Merge branch 'feat/json-schema' into deploy-schema
Jul 14, 2023
4ba9e7a
Merge branch 'feat/json-schema' into deploy-schema
Leo10Gama Jul 14, 2023
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
170 changes: 168 additions & 2 deletions schema/samcli.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,175 @@
"properties": {
"parameters": {
"title": "Parameters for the deploy command",
"description": "Available parameters for the deploy command:\n",
"description": "Available parameters for the deploy command:\n* config_env:\nEnvironment name specifying default parameter values in the configuration file.\n* config_file:\nConfiguration file containing default parameter values.\n* guided:\nSpecify this flag to allow SAM CLI to guide you through the deployment using guided prompts.\n* template_file:\nAWS SAM template which references built artifacts for resources in the template. (if applicable)\n* no_execute_changeset:\nIndicates whether to execute the change set. Specify this flag to view stack changes before executing the change set.\n* fail_on_empty_changeset:\nSpecify whether AWS SAM CLI should return a non-zero exit code if there are no changes to be made to the stack. Defaults to a non-zero exit code.\n* confirm_changeset:\nPrompt to confirm if the computed changeset is to be deployed by SAM CLI.\n* disable_rollback:\nPreserves the state of previously provisioned resources when an operation fails.\n* on_failure:\nProvide an action to determine what will happen when a stack fails to create. Three actions are available:\n\n- ROLLBACK: This will rollback a stack to a previous known good state.\n\n- DELETE: The stack will rollback to a previous state if one exists, otherwise the stack will be deleted.\n\n- DO_NOTHING: The stack will not rollback or delete, this is the same as disabling rollback.\n\nDefault behaviour is ROLLBACK.\n\n\n\nThis option is mutually exclusive with --disable-rollback/--no-disable-rollback. You can provide\n--on-failure or --disable-rollback/--no-disable-rollback but not both at the same time.\n* stack_name:\nName of the AWS CloudFormation stack.\n* s3_bucket:\nAWS S3 bucket where artifacts referenced in the template are uploaded.\n* image_repository:\nAWS ECR repository URI where artifacts referenced in the template are uploaded.\n* image_repositories:\nMapping of Function Logical ID to AWS ECR Repository URI.\n\nExample: Function_Logical_ID=ECR_Repo_Uri\nThis option can be specified multiple times.\n* force_upload:\nIndicates whether to override existing files in the S3 bucket. Specify this flag to upload artifacts even if they match existing artifacts in the S3 bucket.\n* s3_prefix:\nPrefix name that is added to the artifact's name when it is uploaded to the AWS S3 bucket.\n* kms_key_id:\nThe ID of an AWS KMS key that is used to encrypt artifacts that are at rest in the AWS S3 bucket.\n* role_arn:\nARN of an IAM role that AWS Cloudformation assumes when executing a deployment change set.\n* use_json:\nIndicates whether to use JSON as the format for the output AWS CloudFormation template. YAML is used by default.\n* resolve_s3:\nAutomatically resolve AWS S3 bucket for non-guided deployments. Enabling this option will also create a managed default AWS S3 bucket for you. If one does not provide a --s3-bucket value, the managed bucket will be used. Do not use --guided with this option.\n* resolve_image_repos:\nAutomatically create and delete ECR repositories for image-based functions in non-guided deployments. A companion stack containing ECR repos for each function will be deployed along with the template stack. Automatically created image repositories will be deleted if the corresponding functions are removed.\n* metadata:\nMap of metadata to attach to ALL the artifacts that are referenced in the template.\n* notification_arns:\nARNs of SNS topics that AWS Cloudformation associates with the stack.\n* tags:\nList of tags to associate with the stack.\n* parameter_overrides:\nString that contains AWS CloudFormation parameter overrides encoded as key=value pairs.\n* signing_profiles:\nA string that contains Code Sign configuration parameters as FunctionOrLayerNameToSign=SigningProfileName:SigningProfileOwner Since signing profile owner is optional, it could also be written as FunctionOrLayerNameToSign=SigningProfileName\n* no_progressbar:\nDoes not showcase a progress bar when uploading artifacts to S3 and pushing docker images to ECR\n* capabilities:\nList of capabilities that one must specify before AWS Cloudformation can create certain stacks.\n\nAccepted Values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM, CAPABILITY_RESOURCE_POLICY, CAPABILITY_AUTO_EXPAND.\n\nLearn more at: https://docs.aws.amazon.com/serverlessrepo/latest/devguide/acknowledging-application-capabilities.html\n* profile:\nSelect a specific profile from your credential file to get AWS credentials.\n* region:\nSet the AWS Region of the service. (e.g. us-east-1)\n* beta_features:\nEnable/Disable beta features.\n* debug:\nTurn on debug logging to print debug message generated by AWS SAM CLI and display timestamps.",
moelasmar marked this conversation as resolved.
Show resolved Hide resolved
"type": "object",
"properties": {}
"properties": {
"config_env": {
"title": "config_env",
"type": "string",
"description": "Environment name specifying default parameter values in the configuration file.",
"default": "default"
},
"config_file": {
"title": "config_file",
"type": "string",
"description": "Configuration file containing default parameter values.",
"default": "samconfig.toml"
},
Leo10Gama marked this conversation as resolved.
Show resolved Hide resolved
"guided": {
"title": "guided",
"type": "boolean",
"description": "Specify this flag to allow SAM CLI to guide you through the deployment using guided prompts."
},
"template_file": {
"title": "template_file",
"type": "string",
"description": "AWS SAM template which references built artifacts for resources in the template. (if applicable)",
"default": "template.[yaml|yml|json]"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is template.[yaml|yml|json] really the default value? or a symbol representing that it will look up these three files in certain order?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is, yes. I thought it weird, but that's how the default value is stored in the command, I assume so it's more readable under the CLI as options.

},
"no_execute_changeset": {
"title": "no_execute_changeset",
"type": "boolean",
"description": "Indicates whether to execute the change set. Specify this flag to view stack changes before executing the change set."
},
"fail_on_empty_changeset": {
"title": "fail_on_empty_changeset",
"type": "boolean",
"description": "Specify whether AWS SAM CLI should return a non-zero exit code if there are no changes to be made to the stack. Defaults to a non-zero exit code.",
"default": true
},
"confirm_changeset": {
"title": "confirm_changeset",
"type": "boolean",
"description": "Prompt to confirm if the computed changeset is to be deployed by SAM CLI."
},
"disable_rollback": {
"title": "disable_rollback",
"type": "boolean",
"description": "Preserves the state of previously provisioned resources when an operation fails."
},
"on_failure": {
Leo10Gama marked this conversation as resolved.
Show resolved Hide resolved
"title": "on_failure",
"type": "string",
"description": "Provide an action to determine what will happen when a stack fails to create. Three actions are available:\n\n- ROLLBACK: This will rollback a stack to a previous known good state.\n\n- DELETE: The stack will rollback to a previous state if one exists, otherwise the stack will be deleted.\n\n- DO_NOTHING: The stack will not rollback or delete, this is the same as disabling rollback.\n\nDefault behaviour is ROLLBACK.\n\n\n\nThis option is mutually exclusive with --disable-rollback/--no-disable-rollback. You can provide\n--on-failure or --disable-rollback/--no-disable-rollback but not both at the same time.",
moelasmar marked this conversation as resolved.
Show resolved Hide resolved
"default": "ROLLBACK",
"enum": [
"ROLLBACK",
"DELETE",
"DO_NOTHING"
]
},
"stack_name": {
"title": "stack_name",
"type": "string",
"description": "Name of the AWS CloudFormation stack."
},
"s3_bucket": {
"title": "s3_bucket",
"type": "string",
"description": "AWS S3 bucket where artifacts referenced in the template are uploaded."
},
"image_repository": {
"title": "image_repository",
"type": "string",
"description": "AWS ECR repository URI where artifacts referenced in the template are uploaded."
},
"image_repositories": {
"title": "image_repositories",
"type": "string",
"description": "Mapping of Function Logical ID to AWS ECR Repository URI.\n\nExample: Function_Logical_ID=ECR_Repo_Uri\nThis option can be specified multiple times."
},
"force_upload": {
"title": "force_upload",
"type": "boolean",
"description": "Indicates whether to override existing files in the S3 bucket. Specify this flag to upload artifacts even if they match existing artifacts in the S3 bucket."
},
"s3_prefix": {
"title": "s3_prefix",
"type": "string",
"description": "Prefix name that is added to the artifact's name when it is uploaded to the AWS S3 bucket."
},
"kms_key_id": {
"title": "kms_key_id",
"type": "string",
"description": "The ID of an AWS KMS key that is used to encrypt artifacts that are at rest in the AWS S3 bucket."
},
"role_arn": {
"title": "role_arn",
"type": "string",
"description": "ARN of an IAM role that AWS Cloudformation assumes when executing a deployment change set."
},
"use_json": {
"title": "use_json",
"type": "boolean",
"description": "Indicates whether to use JSON as the format for the output AWS CloudFormation template. YAML is used by default."
},
"resolve_s3": {
"title": "resolve_s3",
"type": "boolean",
"description": "Automatically resolve AWS S3 bucket for non-guided deployments. Enabling this option will also create a managed default AWS S3 bucket for you. If one does not provide a --s3-bucket value, the managed bucket will be used. Do not use --guided with this option."
},
"resolve_image_repos": {
"title": "resolve_image_repos",
"type": "boolean",
"description": "Automatically create and delete ECR repositories for image-based functions in non-guided deployments. A companion stack containing ECR repos for each function will be deployed along with the template stack. Automatically created image repositories will be deleted if the corresponding functions are removed."
},
"metadata": {
"title": "metadata",
"type": "string",
"description": "Map of metadata to attach to ALL the artifacts that are referenced in the template."
},
"notification_arns": {
"title": "notification_arns",
"type": "array",
Leo10Gama marked this conversation as resolved.
Show resolved Hide resolved
"description": "ARNs of SNS topics that AWS Cloudformation associates with the stack."
},
"tags": {
"title": "tags",
"type": "string",
"description": "List of tags to associate with the stack."
},
"parameter_overrides": {
"title": "parameter_overrides",
"type": "string",
"description": "String that contains AWS CloudFormation parameter overrides encoded as key=value pairs."
},
"signing_profiles": {
"title": "signing_profiles",
"type": "string",
"description": "A string that contains Code Sign configuration parameters as FunctionOrLayerNameToSign=SigningProfileName:SigningProfileOwner Since signing profile owner is optional, it could also be written as FunctionOrLayerNameToSign=SigningProfileName"
},
"no_progressbar": {
"title": "no_progressbar",
"type": "boolean",
"description": "Does not showcase a progress bar when uploading artifacts to S3 and pushing docker images to ECR"
},
"capabilities": {
"title": "capabilities",
"type": "array",
Leo10Gama marked this conversation as resolved.
Show resolved Hide resolved
"description": "List of capabilities that one must specify before AWS Cloudformation can create certain stacks.\n\nAccepted Values: CAPABILITY_IAM, CAPABILITY_NAMED_IAM, CAPABILITY_RESOURCE_POLICY, CAPABILITY_AUTO_EXPAND.\n\nLearn more at: https://docs.aws.amazon.com/serverlessrepo/latest/devguide/acknowledging-application-capabilities.html"
},
"profile": {
"title": "profile",
"type": "string",
"description": "Select a specific profile from your credential file to get AWS credentials."
},
"region": {
"title": "region",
"type": "string",
"description": "Set the AWS Region of the service. (e.g. us-east-1)"
},
"beta_features": {
"title": "beta_features",
"type": "boolean",
"description": "Enable/Disable beta features."
},
"debug": {
"title": "debug",
"type": "boolean",
"description": "Turn on debug logging to print debug message generated by AWS SAM CLI and display timestamps."
}
}
}
},
"required": [
Expand Down