aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

[AWS::ApplicationInsights::Application] - [BUG] - `Tier` parameter have wrong Pattern making configuration unusable

Open
#2,286 0 comments 4 reactions 0 assignees View on GitHub
bug
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### Name of the resource

AWS::ApplicationInsights::Application

### Resource Name

_No response_

### Issue Description

There is a validation issue with the Tier attribute inside the ComponentMonitoringSetting property. The documentation lists valid values such as DEFAULT, SQL_SERVER, etc., but the schema includes a regex pattern ^[A-Z][[A-Z]_]*$, which is malformed and blocks all allowed values. The pattern incorrectly contains double square brackets [[A-Z]_]*, making it impossible to deploy resources using CloudFormation.

AWS Documentation: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-componentmonitoringsetting.html

### Expected Behavior

The Tier attribute should accept valid values as specified in the documentation, such as DEFAULT, SQL_SERVER, POSTGRESQL, etc. The regular expression pattern should be corrected to accurately reflect these allowed values.

### Observed Behavior

Using any valid Tier value results in a validation error. For example, setting:
```yaml
Tier: DEFAULT
```
Produces the following error:
```
E3031 'DEFAULT' does not match '^[A-Z][[A-Z]_]*$'
```

### Test Cases

Attempting to deploy a CloudFormation stack with the following configuration:

```yaml
...
Resources:
ApplicationResourceGroup:
Type: AWS::ResourceGroups::Group
Properties:
Name: "app-resource-group"
ResourceQuery:
Type: CLOUDFORMATION_STACK_1_0

ApplicationInsightsMonitoring:
Type: AWS::ApplicationInsights::Application
Properties:
ResourceGroupName: "app-resource-group"
AutoConfigurationEnabled: 'false'
OpsCenterEnabled: 'true'
OpsItemSNSTopicArn: !Ref SupportTopic
CustomComponents:
- ComponentName: "ApiLambda"
ResourceList:
- !GetAtt Function.Arn
ComponentMonitoringSettings:
- ComponentName: "ApiLambda"
Tier: DEFAULT
ComponentConfigurationMode: DEFAULT
DependsOn: ApplicationResourceGroup
```

Results in following validation error:
`E3031 'DEFAULT' does not match '^[A-Z][[A-Z]_]*$'`

### Other Details

This issue prevents the use of the AWS::ApplicationInsights::Application resource with custom ComponentMonitoringSetting configurations, hindering the deployment of applications that rely on this functionality.

Reference: [AWS Documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-componentmonitoringsetting.html)

This issue is critical as it blocks production deployments using AWS::ApplicationInsights::Application with custom ComponentMonitoringSetting configurations.

Contributor guide

Open the contributing guide

Research direction

Start by locating the schema entry for AWS::ApplicationInsights::Application and its ComponentMonitoringSetting Tier pattern. Use the provided YAML example with Tier: DEFAULT as the reproduction case; done means documented valid Tier values pass validation without the reported E3031 error.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.