Aws-sam-cli: SAM TOML file should support array of capabilities

Created on 27 Mar 2020  路  3Comments  路  Source: aws/aws-sam-cli

Describe your idea/feature/enhancement:

The _samconfig.toml_ file allows specifying capabilities like this:

capabilities = "CAPABILITY_IAM"

This documentation page explains that SAM uses TOML:
https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-config.html

Proposal:

The TOML documentation shows that TOML arrays are expressed like this:

integers = [ 1, 2, 3 ]
colors = [ "red", "yellow", "green" ]
nested_array_of_int = [ [ 1, 2 ], [3, 4, 5] ]
nested_mixed_array = [ [ 1, 2 ], ["a", "b", "c"] ]
string_array = [ "all", 'strings', """are the same""", '''type''' ]

# Mixed-type arrays are allowed
numbers = [ 0.1, 0.2, 0.5, 1, 2, 5 ]
contributors = [
  "Foo Bar <[email protected]>",
  { name = "Baz Qux", email = "[email protected]", url = "https://example.com/bazqux" }
]

The SAM TOML file should allow this as a valid expression of multiple _capabilities_:

capabilities = [ "CAPABILITY_IAM", "CAPABILITY_AUTO_EXPAND" ]

Additional Details:

  1. Will this require any updates to the SAM Spec?
  2. I do not believe this will require updates to the SAM Spec.

_Thank you for considering this feature_

typfeature

Most helpful comment

Thanks for the feature request. you should be able to have multiple values in your samconfig.toml file this way right now, but i have tagged this issue as feature request. 馃憤

version = 0.1
[default]
[default.deploy]
[default.deploy.parameters]
capabilities = "CAPABILITY_IAM CAPABILITY_NAMED_IAM"

All 3 comments

Thanks for the feature request. you should be able to have multiple values in your samconfig.toml file this way right now, but i have tagged this issue as feature request. 馃憤

version = 0.1
[default]
[default.deploy]
[default.deploy.parameters]
capabilities = "CAPABILITY_IAM CAPABILITY_NAMED_IAM"

Thank you @sriram-mv

I was able to use that approach to have multiple values in my _samconfig.toml_ file

Screenshot:
successful multiple capabilities

Hi sriram-mv@

I added a PR for the documentation as it is not clear; however, I would recommend updating the documentation once this feature is released.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

terlar picture terlar  路  3Comments

PhungXuanAnh picture PhungXuanAnh  路  3Comments

red8888 picture red8888  路  3Comments

dschu-lab picture dschu-lab  路  3Comments

cmccoypdx picture cmccoypdx  路  3Comments