It seems that resource tagging for resource type AWS::Serverless::Api is not available using SAM model.
Also tagging is not working from the global section like we define in cloudformation template.
@arcsoftech At the moment, Tagging for AWS::Serverless::Api is not supported. Can you update this request to include how you envision this being added to the AWS::Serverless::Api? You can use #376 as an example. This will help in creating discussions on how the schema should look for this feature.
@jfuss It could be done same like we do for Lambda function as in "AWS::Serverless::Function" and translated to final CFN.
Here is how I envision it:-
SAM Template:
ApiGatewayApi:
Type: AWS::Serverless::Api
Properties:
DefinitionUri: ./swagger.yaml
StageName: !Ref AppEnv
Variables:
lbfunc: !Ref MyApp
Tags:
parent_project: !Ref ParentProjectTag
environment: !Ref EnvironmentTag
billing_ref: !Ref BillingRefTag
application: !Ref ApplicationTag
key_contact: !Ref KeyContact
project: !Ref ProjectTag
STAGE: !Ref STAGETag
Transformed CFN Template:
Type: "AWS::ApiGateway::Stage"
Properties:
MethodSettings:
- MethodSetting
StageName: String
Variables:
String: String
Tags:
- Key: parent_project
Value:
Ref: ParentProjectTag
- Key: environment
Value:
Ref: EnvironmentTag
- Key: billing_ref
Value:
Ref: BillingRefTag
- Key: application
Value:
Ref: ApplicationTag
- Key: key_contact
Value:
Ref: KeyContact
- Key: project
Value:
Ref: ProjectTag
- Key: STAGE
Value:
Ref: STAGETag
Any updates on the above ?
I saw that they used this issue as an example on a twitch episode https://clips.twitch.tv/PoorAthleticWalrusPeteZarollTie
They implemented in that episode but it looks like it has not been committed yet.
Need this feature for our application development too
@Nr18 I sm not able to view that link.Can you explain what they did?
They basically implemented this feature as an example full episode: https://www.twitch.tv/videos/256907743?collection=rjHIYEY1KRXuKA
Is anyone actively working on this? If not I may attempt it myself.
I am currenttly looking for severless study source.
2018๋ 8์ 28์ผ (ํ) ์คํ 9:20, Simon Baynes notifications@github.com๋์ด ์์ฑ:
Is anyone actively working on this? If not I may attempt it myself.
โ
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/awslabs/serverless-application-model/issues/384#issuecomment-416563167,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Ad-pdiiZwBR_dQOUXhYfVufa41i1M8uFks5uVTWdgaJpZM4TTJro
.
@goldpenguin93
Are you close to raising a PR?
what is mean? that PR close?
I m studing Sverless Compute.
2018๋ 8์ 28์ผ (ํ) ์คํ 9:46, Simon Baynes notifications@github.com๋์ด ์์ฑ:
@goldpenguin93 https://github.com/goldpenguin93
Are you close to raising a PR?โ
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/awslabs/serverless-application-model/issues/384#issuecomment-416570275,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Ad-pdo-0-QyxeDEtd-VWQLWCACKHE3R2ks5uVTujgaJpZM4TTJro
.
@goldpenguin93 - I meant do you have a pull request that you are nearly ready to create?
@baynezy feel free to contribute a PR for this! ๐
What is ready?
I went to your question because I am not understnad Alright?
2018๋ 9์ 2์ผ (์ผ) ์ค์ 12:25, James Hood notifications@github.com๋์ด ์์ฑ:
@baynezy https://github.com/baynezy feel free to contribute a PR for
this! ๐โ
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/awslabs/serverless-application-model/issues/384#issuecomment-417866787,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Ad-pdqYMojG_ZAlYHweIC27-5Do5vGstks5uWqbggaJpZM4TTJro
.
2018๋ 9์ 2์ผ (์ผ) ์ค์ 12:29, Sanghyup sanghyup1993@gmail.com๋์ด ์์ฑ:
What is ready?
I want to your question because I am not understnad Alright?2018๋ 9์ 2์ผ (์ผ) ์ค์ 12:25, James Hood notifications@github.com๋์ด ์์ฑ:
@baynezy https://github.com/baynezy feel free to contribute a PR for
this! ๐โ
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/awslabs/serverless-application-model/issues/384#issuecomment-417866787,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Ad-pdqYMojG_ZAlYHweIC27-5Do5vGstks5uWqbggaJpZM4TTJro
.
@goldpenguin93 - I think @baynezy was thinking about submitting a fix for this issue, but was trying to determine if you were already close to submitting a fix for it, in which case they would not submit a fix since you were already working on it.
Submitting a fix on a GitHub repo is initiated by created a Pull Request (PR), which is why they asked if you were close to "raising a PR" (creating a PR). You can read more about Pull Requests here.
I was advising @baynezy to go ahead and create their own PR to fix this problem since it's unclear at this point if you are going to create one.
Hope this clarifies
I am understand PR (self introduce) but Now, I am PR(Pull Request)
Understand. Also, I am coming soon PR(pull request) create.
2018๋ 9์ 2์ผ (์ผ) ์ค์ 12:37, James Hood notifications@github.com๋์ด ์์ฑ:
@goldpenguin93 https://github.com/goldpenguin93 - I think @baynezy
https://github.com/baynezy was thinking about submitting a fix for this
issue, but was trying to determine if you were already close to submitting
a fix for it, in which case they would not submit a fix since you were
already working on it.Submitting a fix on a GitHub repo is initiated by created a Pull Request
(PR), which is why they asked if you were close to "raising a PR" (creating
a PR). You can read more about Pull Requests here
https://help.github.com/articles/about-pull-requests/.I was advising @baynezy https://github.com/baynezy to go ahead and
create their own PR to fix this problem since it's unclear at this point if
you are going to create one.โ
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/awslabs/serverless-application-model/issues/384#issuecomment-417867535,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Ad-pdshO-MJpRCuMkeWKQSYNi1fpzjn2ks5uWqnNgaJpZM4TTJro
.
Great! Looking forward to your contribution!
Yap! I am comfirm
2018๋ 9์ 4์ผ (ํ) ์ค์ 3:45, James Hood notifications@github.com๋์ด ์์ฑ:
Great! Looking forward to your contribution!
โ
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/awslabs/serverless-application-model/issues/384#issuecomment-418176016,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Ad-pdqLQY1SZE8QB4GBh7H-ANZIoCfkwks5uXXjGgaJpZM4TTJro
.
Is adding Tags supported on the standard CFN Stage resource? It isn't listed as a property in the docs:
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html
Good point, I am almost certain I saw it there at one point, having trouble finding it now. Anyone else?
Is adding Tags supported on the standard CFN Stage resource? It isn't listed as a property in the docs:
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-stage.html
It seems to be supported according to the link you sent, is it newly added? Anybody working on a PR or what is the status?
@hhagblom Yes, that does seem to be a recent add, Tags were definitely not there before. In that case, tags should also be added to the SAM resource.
The docs do say that tags are now supported.
Tags should be added as a parameter to the ApiGatewayStage class: https://github.com/awslabs/serverless-application-model/blob/master/samtranslator/model/apigateway.py#L28
Tags should be added as a parameter to the SamApi class: https://github.com/awslabs/serverless-application-model/blob/master/samtranslator/model/sam_resources.py#L428
Add the tags in the api generator: in the init statement as well as when the Stage is being created
I created a PR to add this feature (#993).
I wonder to PR? What is mean?
2019๋ 6์ 23์ผ (์ผ) ์ค์ 4:41, Eduardo Vieira notifications@github.com๋์ด ์์ฑ:
I created a PR to add this feature (#993
https://github.com/awslabs/serverless-application-model/pull/993).โ
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/awslabs/serverless-application-model/issues/384?email_source=notifications&email_token=AHP2S5SDHUDE35O36LNFPJLP3Z577A5CNFSM4E2MTLUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYKQCUY#issuecomment-504693075,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHP2S5U6NKEHMW3SLF7X7K3P3Z577ANCNFSM4E2MTLUA
.
@goldpenguin93 it means pull request
Ok, I undersand PR
Also, soon I hands on to Pull Request.
2019๋ 6์ 23์ผ (์ผ) ์คํ 8:05, Joris Conijn notifications@github.com๋์ด ์์ฑ:
@goldpenguin93 https://github.com/goldpenguin93 it means pull request
โ
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/awslabs/serverless-application-model/issues/384?email_source=notifications&email_token=AHP2S5XBSQCDJK6AYNAEI4LP35KHZA5CNFSM4E2MTLUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYK33OY#issuecomment-504741307,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHP2S5VWRMXICAG2Y7O625DP35KHZANCNFSM4E2MTLUA
.
Pending v1.14.0 release
Is it also not possible to add Tags to AWS::Serverless::Function? I get an error when trying to do so.
@rynop AWS::Serverless::Function supports tags (spec reference), but note, the syntax is slightly different if you're used to the native CloudFormation AWS::Lambda::Function resource.
For AWS::Lambda::Function, it looks like this:
MyFunction:
Type: AWS::Lambda::Function
Properties:
Tags:
- Key: Foo
Value: Bar
- Key: Baz
Value: Blah
...
For AWS::Serverless::Function, the equivalent looks like this:
MyFunction:
Type: AWS::Serverless::Function
Properties:
Tags:
Foo: Bar
Baz: Blah
...
Closing this issue as this is released in v1.14.0
Most helpful comment
The docs do say that tags are now supported.
Tags should be added as a parameter to the ApiGatewayStage class: https://github.com/awslabs/serverless-application-model/blob/master/samtranslator/model/apigateway.py#L28
Tags should be added as a parameter to the SamApi class: https://github.com/awslabs/serverless-application-model/blob/master/samtranslator/model/sam_resources.py#L428
Add the tags in the api generator: in the init statement as well as when the Stage is being created