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

fix: Add default value for alert_manager_definition #3

Merged
merged 3 commits into from
Apr 26, 2022
Merged

fix: Add default value for alert_manager_definition #3

merged 3 commits into from
Apr 26, 2022

Conversation

bryankaraffa
Copy link
Contributor

Description

This fixes and issue with the latest version of this module when no value is provided for alert_manager_definition and the current default value [null] is used:

Error: Missing required argument

  with module.global-zone.module.prometheus.aws_prometheus_alert_manager_definition.this[0],
  on .terraform/modules/global-zone.prometheus/main.tf line 20, in resource "aws_prometheus_alert_manager_definition" "this":
  20:   definition   = var.alert_manager_definition

The argument "definition" is required, but no definition was found.

This error matches the aws provider documentation and definition is required

A empty string value [""] will not work for this either and produces this error:

Error: error creating Prometheus Alert Manager Definition (ws-f6f96b26-b023-41ce-975f-e5c0667f6fc3): ValidationException: Malformed Alertmanager definition.
{
  RespMetadata: {
    StatusCode: 400,
    RequestID: "31676246-1759-465c-94fc-3f954ae6a10d"
  },
  Message_: "Malformed Alertmanager definition."
}

This PR changes the module to use a very basic definition as the default value for alert_manager_definition

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)

@bryantbiggs bryantbiggs changed the title fix: default value for alert_manager_definition fix: Add default value for alert_manager_definition Apr 21, 2022
Copy link
Member

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after updating the heredocs format, please run pre-commit run -a to update the documentation

variables.tf Outdated Show resolved Hide resolved
Copy link
Member

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @bryankaraffa

@bryantbiggs bryantbiggs merged commit a66025f into terraform-aws-modules:master Apr 26, 2022
antonbabenko pushed a commit that referenced this pull request Apr 26, 2022
### [2.1.2](v2.1.1...v2.1.2) (2022-04-26)

### Bug Fixes

* Add default value for `alert_manager_definition` ([#3](#3)) ([a66025f](a66025f))
@antonbabenko
Copy link
Member

This PR is included in version 2.1.2 🎉

@bryankaraffa bryankaraffa deleted the patch-1 branch May 2, 2022 21:34
@github-actions
Copy link

github-actions bot commented Nov 8, 2022

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants