AWS Amazon Managed Service for Prometheus Workspace

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

aws_prometheus_workspace (Terraform)

The Workspace in Amazon Managed Service for Prometheus can be configured in Terraform with the resource name aws_prometheus_workspace. The following sections describe 3 examples of how to use the resource and its parameters.

Example Usage from GitHub

prometheus.tf#L1
resource "aws_prometheus_workspace" "analytical_platform_dev" {
  count = terraform.workspace == "management" ? 1 : 0
  alias = "analytical-platform-dev"
}

resource "aws_prometheus_workspace" "analytical_platform_prod" {
amp.tf#L1
resource "aws_prometheus_workspace" "amp" {
  provider = aws.ireland
  alias    = var.amp_alias
}
main.tf#L1
resource "aws_prometheus_workspace" "this" {
  count = var.create ? 1 : 0

  alias = var.workspace_alias
}

Parameters

Explanation in Terraform Registry

Manages an Amazon Managed Service for Prometheus (AMP) Workspace.

NOTE: This AWS functionality is in Preview and may change before General Availability release. Backwards compatibility is not guaranteed between Terraform AWS Provider releases.

AWS::APS::Workspace (CloudFormation)

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

Example Usage from GitHub

amp.2020-08-01.json#L762
                    "type": "AWS::APS::Workspace",
                    "service": "com.amazonaws.services.awsprometheus.serviceapi#ManagedPrometheusCP",
                    "resource": "com.amazonaws.amp#Workspace"
                },
                "smithy.api#documentation": "An ARN identifying a Workspace."
            }
amp.2020-08-01.json#L2215
                    "type": "AWS::APS::Workspace",
                    "service": "com.amazonaws.services.awsprometheus.serviceapi#ManagedPrometheusCP",
                    "resource": "com.amazonaws.amp#Workspace"
                },
                "smithy.api#documentation": "An ARN identifying a Workspace."
            }
amp.2020-08-01.json#L2215
                    "type": "AWS::APS::Workspace",
                    "service": "com.amazonaws.services.awsprometheus.serviceapi#ManagedPrometheusCP",
                    "resource": "com.amazonaws.amp#Workspace"
                },
                "smithy.api#documentation": "An ARN identifying a Workspace."
            }
amp.2020-08-01.json#L2215
                    "type": "AWS::APS::Workspace",
                    "service": "com.amazonaws.services.awsprometheus.serviceapi#ManagedPrometheusCP",
                    "resource": "com.amazonaws.amp#Workspace"
                },
                "smithy.api#documentation": "An ARN identifying a Workspace."
            }
amp.json#L2215
                    "type": "AWS::APS::Workspace",
                    "service": "com.amazonaws.services.awsprometheus.serviceapi#ManagedPrometheusCP",
                    "resource": "com.amazonaws.amp#Workspace"
                },
                "smithy.api#documentation": "An ARN identifying a Workspace."
            }

Parameters

Explanation in CloudFormation Registry

The AWS::APS::Workspace type specifies an Amazon Managed Service for Prometheus (Amazon Managed Service for Prometheus) workspace. A workspace is a logical and isolated Prometheus server dedicated to Prometheus resources such as metrics. You can have one or more workspaces in each Region in your account.

Frequently asked questions

What is AWS Amazon Managed Service for Prometheus Workspace?

AWS Amazon Managed Service for Prometheus Workspace 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 Workspace?

For Terraform, the neillturner/cross-account-managed-prometheus, ministryofjustice/cloud-platform-terraform-amp and clowdhaus/terraform-aws-managed-service-prometheus source code examples are useful. See the Terraform Example section for further details.

For CloudFormation, the elerch/aws-sdk-for-zig, soto-project/soto and aws/aws-sdk-go-v2 source code examples are useful. See the CloudFormation Example section for further details.