aws-cloudformation / cloudformation-coverage-roadmap

The AWS CloudFormation Public Coverage Roadmap
https://aws.amazon.com/cloudformation/
Creative Commons Attribution Share Alike 4.0 International
1.1k stars 54 forks source link

AWS::WorkSpaces::Workspace does not have stack-level tags #985

Open madeline-k opened 2 years ago

madeline-k commented 2 years ago

Name of the resource

AWS::WorkSpaces::Workspace

Resource Name

AWS::WorkSpaces::Workspace

Issue Description

Stack-level tags are not created for an AWS:WorkSpaces::Workspace resource as documented here.

This issue was originally reported in the CDK repo, but I believe it is a CloudFormation issue: https://github.com/aws/aws-cdk/issues/17139

Create a Cloudformation Stack with an Amazon Prometheus Workspace:

import * as cdk from '@aws-cdk/core';
import { CfnWorkspace } from '@aws-cdk/aws-aps';

export class HelloCdkStack extends cdk.Stack {
  constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props);
    this.createWorkspace()
  }

  private createWorkspace(): void {
      const aliasName = `alias-name`
      new CfnWorkspace(this, `SomeWorkspace`, {
          alias: aliasName
      })
  }
}

CFN template:

Resources:
  SomeWorkspace:
    Type: AWS::APS::Workspace
    Properties:
      Alias: alias-name
    Metadata:
      aws:cdk:path: ProdSampleAppStack3/SomeWorkspace
  CDKMetadata:
    Type: AWS::CDK::Metadata
    Properties:
      Analytics: v2:deflate64:H4sIAAAAAAAA/yWLMQrDMAxFz5LdUWq30LWQG6RDZyOr4JhaQZLTIeTuTej0H+/xPfjrDS7dI361x1SGDVkItqdFLG7kqiYNzY3vOpFyE6STj5CyZa67O49xUTjsi6XoEpF2VzkRzDqsPkAIcO9mzbmXVi1/CKb//gDW+CwXfQAAAA==
    Metadata:
      aws:cdk:path: ProdSampleAppStack3/CDKMetadata/Default
    Condition: CDKMetadataAvailable
Conditions:
  CDKMetadataAvailable:
   ...

Expected Behavior

A workspace created with stack-level tags with the prefix aws:

aws:cloudformation:logical-id

aws:cloudformation:stack-id

aws:cloudformation:stack-name

Observed Behavior

A workspace created without aws: tags.

Test Cases

Create a new AWS::WorkSpaces::Workspace, and verify presence of stack-level tags on the resource.

Other Details

No response

pplu commented 2 years ago

Please implement stack-level tagging on stack update, so that once this bug is fixed, we can update the stack, and have the workspaces tagged