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

aws_cloudwatch_log_metric_filter pattern character limit incorrect #1810

Closed
michaelmcguinness opened this issue Oct 4, 2017 · 3 comments
Closed
Labels
bug Addresses a defect in current functionality.

Comments

@michaelmcguinness
Copy link

Terraform Version

0.10.7

Affected Resource(s)

aws_cloudwatch_log_metric_filter

Issue

The pattern argument is restricted to 512 characters. I believe this should be 1024 characters as per the documentation here: http://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutMetricFilter.html

Manual configuration confirms that patterns can be greater than 512 characters.

Terraform Code

	return &schema.Resource{
		Create: resourceAwsCloudWatchLogMetricFilterUpdate,
		Read:   resourceAwsCloudWatchLogMetricFilterRead,
		Update: resourceAwsCloudWatchLogMetricFilterUpdate,
		Delete: resourceAwsCloudWatchLogMetricFilterDelete,

		Schema: map[string]*schema.Schema{
			"name": &schema.Schema{
				Type:         schema.TypeString,
				Required:     true,
				ForceNew:     true,
				ValidateFunc: validateLogMetricFilterName,
			},

			"pattern": &schema.Schema{
				Type:         schema.TypeString,
				Required:     true,
				ValidateFunc: validateMaxLength(512),
				StateFunc: func(v interface{}) string {
					s, ok := v.(string)
					if !ok {
						return ""
					}
					return strings.TrimSpace(s)
				},
			},
@Ninir Ninir added the bug Addresses a defect in current functionality. label Oct 11, 2017
@atsushi-ishibashi
Copy link
Contributor

Fixed #2107

@Ninir
Copy link
Contributor

Ninir commented Nov 2, 2017

Thanks for the ping @atsushi-ishibashi :)

@Ninir Ninir closed this as completed Nov 2, 2017
@ghost
Copy link

ghost commented Apr 10, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality.
Projects
None yet
Development

No branches or pull requests

3 participants