--- layout: "aws" page_title: "AWS: aws_kms_ciphertext" sidebar_current: "docs-aws-datasource-kms-ciphertext" description: |- Provides ciphertext encrypted using a KMS key --- # aws\_kms\_ciphertext The KMS ciphertext data source allows you to encrypt plaintext into ciphertext by using an AWS KMS customer master key. ~> **Note:** All arguments including the plaintext be stored in the raw state as plain-text. [Read more about sensitive data in state](/docs/state/sensitive-data.html). ## Example Usage ```hcl resource "aws_kms_key" "oauth_config" { description = "oauth config" is_enabled = true } data "aws_kms_ciphertext" "oauth" { key_id = "${aws_kms_key.oauth_config.key_id}" plaintext = <