AWS Amazon Managed Service for Prometheus Rule Group Namespace

This page shows how to write Terraform and CloudFormation for Amazon Managed Service for Prometheus Rule Group Namespace and write them securely.

aws_prometheus_rule_group_namespace (Terraform)

The Rule Group Namespace in Amazon Managed Service for Prometheus can be configured in Terraform with the resource name aws_prometheus_rule_group_namespace. The following sections describe 1 example of how to use the resource and its parameters.

Example Usage from GitHub

rules.tf#L1
resource "aws_prometheus_rule_group_namespace" "raz_demo" {
  provider     = aws.ireland
  name         = "raz-demo"
  workspace_id = module.test_prometheus.amp_id
  data         = <<EOF
groups:

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

The following arguments are supported:

  • name - (Required) The name of the rule group namespace
  • workspace_id - (Required) The id of the prometheus workspace the rule group namespace should be linked to
  • data - (Required) the rule group namespace data that you want to be applied. See more in AWS Docs.

No additional attributes are exported.

Explanation in Terraform Registry

Manages an Amazon Managed Service for Prometheus (AMP) Rule Group Namespace

AWS::APS::RuleGroupsNamespace (CloudFormation)

The RuleGroupsNamespace in APS can be configured in CloudFormation with the resource name AWS::APS::RuleGroupsNamespace. The following sections describe 5 examples of how to use the resource and its parameters.

Example Usage from GitHub

amp.2020-08-01.json#L1557
                    "type": "AWS::APS::RuleGroupsNamespace",
                    "service": "com.amazonaws.services.awsprometheus.serviceapi#ManagedPrometheusCP",
                    "resource": "com.amazonaws.amp#RuleGroupsNamespace"
                },
                "smithy.api#documentation": "An ARN identifying a rule groups namespace."
            }
amp.json#L1557
                    "type": "AWS::APS::RuleGroupsNamespace",
                    "service": "com.amazonaws.services.awsprometheus.serviceapi#ManagedPrometheusCP",
                    "resource": "com.amazonaws.amp#RuleGroupsNamespace"
                },
                "smithy.api#documentation": "An ARN identifying a rule groups namespace."
            }
amp.2020-08-01.json#L1557
                    "type": "AWS::APS::RuleGroupsNamespace",
                    "service": "com.amazonaws.services.awsprometheus.serviceapi#ManagedPrometheusCP",
                    "resource": "com.amazonaws.amp#RuleGroupsNamespace"
                },
                "smithy.api#documentation": "An ARN identifying a rule groups namespace."
            }
amp.2020-08-01.json#L1557
                    "type": "AWS::APS::RuleGroupsNamespace",
                    "service": "com.amazonaws.services.awsprometheus.serviceapi#ManagedPrometheusCP",
                    "resource": "com.amazonaws.amp#RuleGroupsNamespace"
                },
                "smithy.api#documentation": "An ARN identifying a rule groups namespace."
            }
amp.2020-08-01.json#L1557
                    "type": "AWS::APS::RuleGroupsNamespace",
                    "service": "com.amazonaws.services.awsprometheus.serviceapi#ManagedPrometheusCP",
                    "resource": "com.amazonaws.amp#RuleGroupsNamespace"
                },
                "smithy.api#documentation": "An ARN identifying a rule groups namespace."
            }

Parameters

Explanation in CloudFormation Registry

The AWS::APS::RuleGroupsNamespace resource creates or updates a rule groups namespace within a Amazon Managed Service for Prometheus workspace. For more information, see Recording rules and alerting rules.

Frequently asked questions

What is AWS Amazon Managed Service for Prometheus Rule Group Namespace?

AWS Amazon Managed Service for Prometheus Rule Group Namespace is a resource for Amazon Managed Service for Prometheus of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Amazon Managed Service for Prometheus Rule Group Namespace?

For Terraform, the ministryofjustice/cloud-platform-terraform-amp source code example is useful. See the Terraform Example section for further details.

For CloudFormation, the kggilmer/ghwftb, awslabs/smithy-rs and aws/aws-sdk-go-v2 source code examples are useful. See the CloudFormation Example section for further details.