AWS X-Ray Encryption Config
This page shows how to write Terraform for X-Ray Encryption Config and write them securely.
aws_xray_encryption_config (Terraform)
The Encryption Config in X-Ray can be configured in Terraform with the resource name aws_xray_encryption_config
. The following sections describe 5 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_xray_encryption_config" "xray_encryption_config" {
count = var.enable_xray_encryption_config ? 1 : 0
type = var.xray_encryption_config_type
key_id = var.xray_encryption_config_key_id
resource "aws_xray_encryption_config" "xray_encryption_config" {
count = var.enable_xray_encryption_config ? 1 : 0
type = var.xray_encryption_config_type
key_id = var.xray_encryption_config_key_id
resource "aws_xray_encryption_config" "this" {
key_id = var.key_id
type = var.type
}
resource "aws_xray_encryption_config" "test" {
type = "NONE"
}
resource "aws_xray_encryption_config" "test" {
type = "NONE"
}
Parameters
Explanation in Terraform Registry
Creates and manages an AWS XRay Encryption Config.
NOTE: Removing this resource from Terraform has no effect to the encryption configuration within X-Ray.
CloudFormation Example
CloudFormation code does not have the related resource.
Frequently asked questions
What is AWS X-Ray Encryption Config?
AWS X-Ray Encryption Config is a resource for X-Ray of Amazon Web Service. Settings can be wrote in Terraform.
Where can I find the example code for the AWS X-Ray Encryption Config?
For Terraform, the asrkata/SebastianUA-terraform, SebastianUA/terraform and niveklabs/aws source code examples are useful. See the Terraform Example section for further details.