Package com.pulumi.gcp.kms
Class KmsFunctions
- java.lang.Object
-
- com.pulumi.gcp.kms.KmsFunctions
-
public final class KmsFunctions extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description KmsFunctions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.pulumi.core.Output<GetCryptoKeyIamPolicyResult>
getCryptoKeyIamPolicy(GetCryptoKeyIamPolicyArgs args)
Retrieves the current IAM policy data for a Google Cloud KMS crypto key.static com.pulumi.core.Output<GetCryptoKeyIamPolicyResult>
getCryptoKeyIamPolicy(GetCryptoKeyIamPolicyArgs args, com.pulumi.deployment.InvokeOptions options)
Retrieves the current IAM policy data for a Google Cloud KMS crypto key.static java.util.concurrent.CompletableFuture<GetCryptoKeyIamPolicyResult>
getCryptoKeyIamPolicyPlain(GetCryptoKeyIamPolicyPlainArgs args)
Retrieves the current IAM policy data for a Google Cloud KMS crypto key.static java.util.concurrent.CompletableFuture<GetCryptoKeyIamPolicyResult>
getCryptoKeyIamPolicyPlain(GetCryptoKeyIamPolicyPlainArgs args, com.pulumi.deployment.InvokeOptions options)
Retrieves the current IAM policy data for a Google Cloud KMS crypto key.static com.pulumi.core.Output<GetKeyRingIamPolicyResult>
getKeyRingIamPolicy(GetKeyRingIamPolicyArgs args)
Retrieves the current IAM policy data for a Google Cloud KMS key ring.static com.pulumi.core.Output<GetKeyRingIamPolicyResult>
getKeyRingIamPolicy(GetKeyRingIamPolicyArgs args, com.pulumi.deployment.InvokeOptions options)
Retrieves the current IAM policy data for a Google Cloud KMS key ring.static java.util.concurrent.CompletableFuture<GetKeyRingIamPolicyResult>
getKeyRingIamPolicyPlain(GetKeyRingIamPolicyPlainArgs args)
Retrieves the current IAM policy data for a Google Cloud KMS key ring.static java.util.concurrent.CompletableFuture<GetKeyRingIamPolicyResult>
getKeyRingIamPolicyPlain(GetKeyRingIamPolicyPlainArgs args, com.pulumi.deployment.InvokeOptions options)
Retrieves the current IAM policy data for a Google Cloud KMS key ring.static com.pulumi.core.Output<GetKMSCryptoKeyResult>
getKMSCryptoKey(GetKMSCryptoKeyArgs args)
Provides access to a Google Cloud Platform KMS CryptoKey.static com.pulumi.core.Output<GetKMSCryptoKeyResult>
getKMSCryptoKey(GetKMSCryptoKeyArgs args, com.pulumi.deployment.InvokeOptions options)
Provides access to a Google Cloud Platform KMS CryptoKey.static java.util.concurrent.CompletableFuture<GetKMSCryptoKeyResult>
getKMSCryptoKeyPlain(GetKMSCryptoKeyPlainArgs args)
Provides access to a Google Cloud Platform KMS CryptoKey.static java.util.concurrent.CompletableFuture<GetKMSCryptoKeyResult>
getKMSCryptoKeyPlain(GetKMSCryptoKeyPlainArgs args, com.pulumi.deployment.InvokeOptions options)
Provides access to a Google Cloud Platform KMS CryptoKey.static com.pulumi.core.Output<GetKMSCryptoKeyVersionResult>
getKMSCryptoKeyVersion(GetKMSCryptoKeyVersionArgs args)
Provides access to a Google Cloud Platform KMS CryptoKeyVersion.static com.pulumi.core.Output<GetKMSCryptoKeyVersionResult>
getKMSCryptoKeyVersion(GetKMSCryptoKeyVersionArgs args, com.pulumi.deployment.InvokeOptions options)
Provides access to a Google Cloud Platform KMS CryptoKeyVersion.static java.util.concurrent.CompletableFuture<GetKMSCryptoKeyVersionResult>
getKMSCryptoKeyVersionPlain(GetKMSCryptoKeyVersionPlainArgs args)
Provides access to a Google Cloud Platform KMS CryptoKeyVersion.static java.util.concurrent.CompletableFuture<GetKMSCryptoKeyVersionResult>
getKMSCryptoKeyVersionPlain(GetKMSCryptoKeyVersionPlainArgs args, com.pulumi.deployment.InvokeOptions options)
Provides access to a Google Cloud Platform KMS CryptoKeyVersion.static com.pulumi.core.Output<GetKMSKeyRingResult>
getKMSKeyRing(GetKMSKeyRingArgs args)
Provides access to Google Cloud Platform KMS KeyRing.static com.pulumi.core.Output<GetKMSKeyRingResult>
getKMSKeyRing(GetKMSKeyRingArgs args, com.pulumi.deployment.InvokeOptions options)
Provides access to Google Cloud Platform KMS KeyRing.static java.util.concurrent.CompletableFuture<GetKMSKeyRingResult>
getKMSKeyRingPlain(GetKMSKeyRingPlainArgs args)
Provides access to Google Cloud Platform KMS KeyRing.static java.util.concurrent.CompletableFuture<GetKMSKeyRingResult>
getKMSKeyRingPlain(GetKMSKeyRingPlainArgs args, com.pulumi.deployment.InvokeOptions options)
Provides access to Google Cloud Platform KMS KeyRing.static com.pulumi.core.Output<GetKMSSecretResult>
getKMSSecret(GetKMSSecretArgs args)
This data source allows you to use data encrypted with Google Cloud KMS within your resource definitions.static com.pulumi.core.Output<GetKMSSecretResult>
getKMSSecret(GetKMSSecretArgs args, com.pulumi.deployment.InvokeOptions options)
This data source allows you to use data encrypted with Google Cloud KMS within your resource definitions.static com.pulumi.core.Output<GetKMSSecretAsymmetricResult>
getKMSSecretAsymmetric(GetKMSSecretAsymmetricArgs args)
## get the public key to encrypt the secret with $ gcloud kms keys versions get-public-key 1\ --project my-project\ --location us-central1\ --keyring my-key-ring\ --key my-crypto-key\ --output-file public-key.pem ## encrypt secret with the public key $ echo -n my-secret-password |\ openssl pkeyutl -in -\ -encrypt\ -pubin\ -inkey public-key.pem\ -pkeyopt rsa_padding_mode:oaep\ -pkeyopt rsa_oaep_md:sha256\ -pkeyopt rsa_mgf1_md:sha256 >\ my-secret-password.enc ## base64 encode the ciphertext $ openssl base64 -in my-secret-password.enc M7nUoba9EGVTu2LjNjBKGdGVBYjyS/i/AY+4yQMQF0Qf/RfUfX31Jw6+VO9OuThq ylu/7ihX9XD4bM7yYdXnMv9p1OHQUlorSBSbb/J6n1W9UJhcp6um8Tw8/Isx4f75 4PskYS6f8Y2ItliGt1/A9iR5BTgGtJBwOxMlgoX2Ggq+Nh4E5SbdoaE5o6CO1nBx eIPsPEebQ6qC4JehQM3IGuV/lrm58+hZhaXAqNzX1cEYyAt5GYqJIVCiI585SUYs wRToGyTgaN+zthF0HP9IWlR4Am4LmJ/1OcePTnYw11CkU8wNRbDzVAzogwNH+rXr LTmf7hxVjBm6bBSVSNFcBKAXFlllubSfIeZ5hgzGqn54OmSf6odO12L5JxllddHc yAd54vWKs2kJtnsKV2V4ZdkI0w6y1TeI67baFZDNGo6qsCpFMPnvv7d46Pg2VOp1 J6Ivner0NnNHE4MzNmpZRk8WXMwqq4P/gTiT7F/aCX6oFCUQ4AWPQhJYh2dkcOmL IP+47Veb10aFn61F1CJwpmOOiGNXKdDT1vK8CMnnwhm825K0q/q9Zqpzc1+1ae1z mSqol1zCoa88CuSN6nTLQlVnN/dzfrGbc0boJPaM0iGhHtSzHk4SWg84LhiJB1q9 A9XFJmOVdkvRY9nnz/iVLAdd0Q3vFtLqCdUYsNN2yh4=static com.pulumi.core.Output<GetKMSSecretAsymmetricResult>
getKMSSecretAsymmetric(GetKMSSecretAsymmetricArgs args, com.pulumi.deployment.InvokeOptions options)
## get the public key to encrypt the secret with $ gcloud kms keys versions get-public-key 1\ --project my-project\ --location us-central1\ --keyring my-key-ring\ --key my-crypto-key\ --output-file public-key.pem ## encrypt secret with the public key $ echo -n my-secret-password |\ openssl pkeyutl -in -\ -encrypt\ -pubin\ -inkey public-key.pem\ -pkeyopt rsa_padding_mode:oaep\ -pkeyopt rsa_oaep_md:sha256\ -pkeyopt rsa_mgf1_md:sha256 >\ my-secret-password.enc ## base64 encode the ciphertext $ openssl base64 -in my-secret-password.enc M7nUoba9EGVTu2LjNjBKGdGVBYjyS/i/AY+4yQMQF0Qf/RfUfX31Jw6+VO9OuThq ylu/7ihX9XD4bM7yYdXnMv9p1OHQUlorSBSbb/J6n1W9UJhcp6um8Tw8/Isx4f75 4PskYS6f8Y2ItliGt1/A9iR5BTgGtJBwOxMlgoX2Ggq+Nh4E5SbdoaE5o6CO1nBx eIPsPEebQ6qC4JehQM3IGuV/lrm58+hZhaXAqNzX1cEYyAt5GYqJIVCiI585SUYs wRToGyTgaN+zthF0HP9IWlR4Am4LmJ/1OcePTnYw11CkU8wNRbDzVAzogwNH+rXr LTmf7hxVjBm6bBSVSNFcBKAXFlllubSfIeZ5hgzGqn54OmSf6odO12L5JxllddHc yAd54vWKs2kJtnsKV2V4ZdkI0w6y1TeI67baFZDNGo6qsCpFMPnvv7d46Pg2VOp1 J6Ivner0NnNHE4MzNmpZRk8WXMwqq4P/gTiT7F/aCX6oFCUQ4AWPQhJYh2dkcOmL IP+47Veb10aFn61F1CJwpmOOiGNXKdDT1vK8CMnnwhm825K0q/q9Zqpzc1+1ae1z mSqol1zCoa88CuSN6nTLQlVnN/dzfrGbc0boJPaM0iGhHtSzHk4SWg84LhiJB1q9 A9XFJmOVdkvRY9nnz/iVLAdd0Q3vFtLqCdUYsNN2yh4=static java.util.concurrent.CompletableFuture<GetKMSSecretAsymmetricResult>
getKMSSecretAsymmetricPlain(GetKMSSecretAsymmetricPlainArgs args)
## get the public key to encrypt the secret with $ gcloud kms keys versions get-public-key 1\ --project my-project\ --location us-central1\ --keyring my-key-ring\ --key my-crypto-key\ --output-file public-key.pem ## encrypt secret with the public key $ echo -n my-secret-password |\ openssl pkeyutl -in -\ -encrypt\ -pubin\ -inkey public-key.pem\ -pkeyopt rsa_padding_mode:oaep\ -pkeyopt rsa_oaep_md:sha256\ -pkeyopt rsa_mgf1_md:sha256 >\ my-secret-password.enc ## base64 encode the ciphertext $ openssl base64 -in my-secret-password.enc M7nUoba9EGVTu2LjNjBKGdGVBYjyS/i/AY+4yQMQF0Qf/RfUfX31Jw6+VO9OuThq ylu/7ihX9XD4bM7yYdXnMv9p1OHQUlorSBSbb/J6n1W9UJhcp6um8Tw8/Isx4f75 4PskYS6f8Y2ItliGt1/A9iR5BTgGtJBwOxMlgoX2Ggq+Nh4E5SbdoaE5o6CO1nBx eIPsPEebQ6qC4JehQM3IGuV/lrm58+hZhaXAqNzX1cEYyAt5GYqJIVCiI585SUYs wRToGyTgaN+zthF0HP9IWlR4Am4LmJ/1OcePTnYw11CkU8wNRbDzVAzogwNH+rXr LTmf7hxVjBm6bBSVSNFcBKAXFlllubSfIeZ5hgzGqn54OmSf6odO12L5JxllddHc yAd54vWKs2kJtnsKV2V4ZdkI0w6y1TeI67baFZDNGo6qsCpFMPnvv7d46Pg2VOp1 J6Ivner0NnNHE4MzNmpZRk8WXMwqq4P/gTiT7F/aCX6oFCUQ4AWPQhJYh2dkcOmL IP+47Veb10aFn61F1CJwpmOOiGNXKdDT1vK8CMnnwhm825K0q/q9Zqpzc1+1ae1z mSqol1zCoa88CuSN6nTLQlVnN/dzfrGbc0boJPaM0iGhHtSzHk4SWg84LhiJB1q9 A9XFJmOVdkvRY9nnz/iVLAdd0Q3vFtLqCdUYsNN2yh4=static java.util.concurrent.CompletableFuture<GetKMSSecretAsymmetricResult>
getKMSSecretAsymmetricPlain(GetKMSSecretAsymmetricPlainArgs args, com.pulumi.deployment.InvokeOptions options)
## get the public key to encrypt the secret with $ gcloud kms keys versions get-public-key 1\ --project my-project\ --location us-central1\ --keyring my-key-ring\ --key my-crypto-key\ --output-file public-key.pem ## encrypt secret with the public key $ echo -n my-secret-password |\ openssl pkeyutl -in -\ -encrypt\ -pubin\ -inkey public-key.pem\ -pkeyopt rsa_padding_mode:oaep\ -pkeyopt rsa_oaep_md:sha256\ -pkeyopt rsa_mgf1_md:sha256 >\ my-secret-password.enc ## base64 encode the ciphertext $ openssl base64 -in my-secret-password.enc M7nUoba9EGVTu2LjNjBKGdGVBYjyS/i/AY+4yQMQF0Qf/RfUfX31Jw6+VO9OuThq ylu/7ihX9XD4bM7yYdXnMv9p1OHQUlorSBSbb/J6n1W9UJhcp6um8Tw8/Isx4f75 4PskYS6f8Y2ItliGt1/A9iR5BTgGtJBwOxMlgoX2Ggq+Nh4E5SbdoaE5o6CO1nBx eIPsPEebQ6qC4JehQM3IGuV/lrm58+hZhaXAqNzX1cEYyAt5GYqJIVCiI585SUYs wRToGyTgaN+zthF0HP9IWlR4Am4LmJ/1OcePTnYw11CkU8wNRbDzVAzogwNH+rXr LTmf7hxVjBm6bBSVSNFcBKAXFlllubSfIeZ5hgzGqn54OmSf6odO12L5JxllddHc yAd54vWKs2kJtnsKV2V4ZdkI0w6y1TeI67baFZDNGo6qsCpFMPnvv7d46Pg2VOp1 J6Ivner0NnNHE4MzNmpZRk8WXMwqq4P/gTiT7F/aCX6oFCUQ4AWPQhJYh2dkcOmL IP+47Veb10aFn61F1CJwpmOOiGNXKdDT1vK8CMnnwhm825K0q/q9Zqpzc1+1ae1z mSqol1zCoa88CuSN6nTLQlVnN/dzfrGbc0boJPaM0iGhHtSzHk4SWg84LhiJB1q9 A9XFJmOVdkvRY9nnz/iVLAdd0Q3vFtLqCdUYsNN2yh4=static com.pulumi.core.Output<GetKMSSecretCiphertextResult>
getKMSSecretCiphertext(GetKMSSecretCiphertextArgs args)
!> **Warning:** This data source is deprecated.static com.pulumi.core.Output<GetKMSSecretCiphertextResult>
getKMSSecretCiphertext(GetKMSSecretCiphertextArgs args, com.pulumi.deployment.InvokeOptions options)
!> **Warning:** This data source is deprecated.static java.util.concurrent.CompletableFuture<GetKMSSecretCiphertextResult>
getKMSSecretCiphertextPlain(GetKMSSecretCiphertextPlainArgs args)
!> **Warning:** This data source is deprecated.static java.util.concurrent.CompletableFuture<GetKMSSecretCiphertextResult>
getKMSSecretCiphertextPlain(GetKMSSecretCiphertextPlainArgs args, com.pulumi.deployment.InvokeOptions options)
!> **Warning:** This data source is deprecated.static java.util.concurrent.CompletableFuture<GetKMSSecretResult>
getKMSSecretPlain(GetKMSSecretPlainArgs args)
This data source allows you to use data encrypted with Google Cloud KMS within your resource definitions.static java.util.concurrent.CompletableFuture<GetKMSSecretResult>
getKMSSecretPlain(GetKMSSecretPlainArgs args, com.pulumi.deployment.InvokeOptions options)
This data source allows you to use data encrypted with Google Cloud KMS within your resource definitions.
-
-
-
Method Detail
-
getCryptoKeyIamPolicy
public static com.pulumi.core.Output<GetCryptoKeyIamPolicyResult> getCryptoKeyIamPolicy(GetCryptoKeyIamPolicyArgs args)
Retrieves the current IAM policy data for a Google Cloud KMS crypto key. ## example ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.kms.KmsFunctions; import com.pulumi.gcp.kms.inputs.GetCryptoKeyIamPolicyArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var foo = KmsFunctions.getCryptoKeyIamPolicy(GetCryptoKeyIamPolicyArgs.builder() .cryptoKeyId(google_kms_crypto_key.crypto_key().id()) .build()); } } ```
-
getCryptoKeyIamPolicyPlain
public static java.util.concurrent.CompletableFuture<GetCryptoKeyIamPolicyResult> getCryptoKeyIamPolicyPlain(GetCryptoKeyIamPolicyPlainArgs args)
Retrieves the current IAM policy data for a Google Cloud KMS crypto key. ## example ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.kms.KmsFunctions; import com.pulumi.gcp.kms.inputs.GetCryptoKeyIamPolicyArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var foo = KmsFunctions.getCryptoKeyIamPolicy(GetCryptoKeyIamPolicyArgs.builder() .cryptoKeyId(google_kms_crypto_key.crypto_key().id()) .build()); } } ```
-
getCryptoKeyIamPolicy
public static com.pulumi.core.Output<GetCryptoKeyIamPolicyResult> getCryptoKeyIamPolicy(GetCryptoKeyIamPolicyArgs args, com.pulumi.deployment.InvokeOptions options)
Retrieves the current IAM policy data for a Google Cloud KMS crypto key. ## example ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.kms.KmsFunctions; import com.pulumi.gcp.kms.inputs.GetCryptoKeyIamPolicyArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var foo = KmsFunctions.getCryptoKeyIamPolicy(GetCryptoKeyIamPolicyArgs.builder() .cryptoKeyId(google_kms_crypto_key.crypto_key().id()) .build()); } } ```
-
getCryptoKeyIamPolicyPlain
public static java.util.concurrent.CompletableFuture<GetCryptoKeyIamPolicyResult> getCryptoKeyIamPolicyPlain(GetCryptoKeyIamPolicyPlainArgs args, com.pulumi.deployment.InvokeOptions options)
Retrieves the current IAM policy data for a Google Cloud KMS crypto key. ## example ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.kms.KmsFunctions; import com.pulumi.gcp.kms.inputs.GetCryptoKeyIamPolicyArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var foo = KmsFunctions.getCryptoKeyIamPolicy(GetCryptoKeyIamPolicyArgs.builder() .cryptoKeyId(google_kms_crypto_key.crypto_key().id()) .build()); } } ```
-
getKMSCryptoKey
public static com.pulumi.core.Output<GetKMSCryptoKeyResult> getKMSCryptoKey(GetKMSCryptoKeyArgs args)
Provides access to a Google Cloud Platform KMS CryptoKey. For more information see [the official documentation](https://cloud.google.com/kms/docs/object-hierarchy#key) and [API](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys). A CryptoKey is an interface to key material which can be used to encrypt and decrypt data. A CryptoKey belongs to a Google Cloud KMS KeyRing. ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.kms.KmsFunctions; import com.pulumi.gcp.kms.inputs.GetKMSKeyRingArgs; import com.pulumi.gcp.kms.inputs.GetKMSCryptoKeyArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var myKeyRing = KmsFunctions.getKMSKeyRing(GetKMSKeyRingArgs.builder() .name("my-key-ring") .location("us-central1") .build()); final var myCryptoKey = KmsFunctions.getKMSCryptoKey(GetKMSCryptoKeyArgs.builder() .name("my-crypto-key") .keyRing(myKeyRing.applyValue(getKMSKeyRingResult -> getKMSKeyRingResult.id())) .build()); } } ```
-
getKMSCryptoKeyPlain
public static java.util.concurrent.CompletableFuture<GetKMSCryptoKeyResult> getKMSCryptoKeyPlain(GetKMSCryptoKeyPlainArgs args)
Provides access to a Google Cloud Platform KMS CryptoKey. For more information see [the official documentation](https://cloud.google.com/kms/docs/object-hierarchy#key) and [API](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys). A CryptoKey is an interface to key material which can be used to encrypt and decrypt data. A CryptoKey belongs to a Google Cloud KMS KeyRing. ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.kms.KmsFunctions; import com.pulumi.gcp.kms.inputs.GetKMSKeyRingArgs; import com.pulumi.gcp.kms.inputs.GetKMSCryptoKeyArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var myKeyRing = KmsFunctions.getKMSKeyRing(GetKMSKeyRingArgs.builder() .name("my-key-ring") .location("us-central1") .build()); final var myCryptoKey = KmsFunctions.getKMSCryptoKey(GetKMSCryptoKeyArgs.builder() .name("my-crypto-key") .keyRing(myKeyRing.applyValue(getKMSKeyRingResult -> getKMSKeyRingResult.id())) .build()); } } ```
-
getKMSCryptoKey
public static com.pulumi.core.Output<GetKMSCryptoKeyResult> getKMSCryptoKey(GetKMSCryptoKeyArgs args, com.pulumi.deployment.InvokeOptions options)
Provides access to a Google Cloud Platform KMS CryptoKey. For more information see [the official documentation](https://cloud.google.com/kms/docs/object-hierarchy#key) and [API](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys). A CryptoKey is an interface to key material which can be used to encrypt and decrypt data. A CryptoKey belongs to a Google Cloud KMS KeyRing. ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.kms.KmsFunctions; import com.pulumi.gcp.kms.inputs.GetKMSKeyRingArgs; import com.pulumi.gcp.kms.inputs.GetKMSCryptoKeyArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var myKeyRing = KmsFunctions.getKMSKeyRing(GetKMSKeyRingArgs.builder() .name("my-key-ring") .location("us-central1") .build()); final var myCryptoKey = KmsFunctions.getKMSCryptoKey(GetKMSCryptoKeyArgs.builder() .name("my-crypto-key") .keyRing(myKeyRing.applyValue(getKMSKeyRingResult -> getKMSKeyRingResult.id())) .build()); } } ```
-
getKMSCryptoKeyPlain
public static java.util.concurrent.CompletableFuture<GetKMSCryptoKeyResult> getKMSCryptoKeyPlain(GetKMSCryptoKeyPlainArgs args, com.pulumi.deployment.InvokeOptions options)
Provides access to a Google Cloud Platform KMS CryptoKey. For more information see [the official documentation](https://cloud.google.com/kms/docs/object-hierarchy#key) and [API](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys). A CryptoKey is an interface to key material which can be used to encrypt and decrypt data. A CryptoKey belongs to a Google Cloud KMS KeyRing. ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.kms.KmsFunctions; import com.pulumi.gcp.kms.inputs.GetKMSKeyRingArgs; import com.pulumi.gcp.kms.inputs.GetKMSCryptoKeyArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var myKeyRing = KmsFunctions.getKMSKeyRing(GetKMSKeyRingArgs.builder() .name("my-key-ring") .location("us-central1") .build()); final var myCryptoKey = KmsFunctions.getKMSCryptoKey(GetKMSCryptoKeyArgs.builder() .name("my-crypto-key") .keyRing(myKeyRing.applyValue(getKMSKeyRingResult -> getKMSKeyRingResult.id())) .build()); } } ```
-
getKMSCryptoKeyVersion
public static com.pulumi.core.Output<GetKMSCryptoKeyVersionResult> getKMSCryptoKeyVersion(GetKMSCryptoKeyVersionArgs args)
Provides access to a Google Cloud Platform KMS CryptoKeyVersion. For more information see [the official documentation](https://cloud.google.com/kms/docs/object-hierarchy#key_version) and [API](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions). A CryptoKeyVersion represents an individual cryptographic key, and the associated key material. ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.kms.KmsFunctions; import com.pulumi.gcp.kms.inputs.GetKMSKeyRingArgs; import com.pulumi.gcp.kms.inputs.GetKMSCryptoKeyArgs; import com.pulumi.gcp.kms.inputs.GetKMSCryptoKeyVersionArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var myKeyRing = KmsFunctions.getKMSKeyRing(GetKMSKeyRingArgs.builder() .name("my-key-ring") .location("us-central1") .build()); final var myCryptoKey = KmsFunctions.getKMSCryptoKey(GetKMSCryptoKeyArgs.builder() .name("my-crypto-key") .keyRing(myKeyRing.applyValue(getKMSKeyRingResult -> getKMSKeyRingResult.id())) .build()); final var myCryptoKeyVersion = KmsFunctions.getKMSCryptoKeyVersion(GetKMSCryptoKeyVersionArgs.builder() .cryptoKey(data.google_kms_crypto_key().my_key().id()) .build()); } } ```
-
getKMSCryptoKeyVersionPlain
public static java.util.concurrent.CompletableFuture<GetKMSCryptoKeyVersionResult> getKMSCryptoKeyVersionPlain(GetKMSCryptoKeyVersionPlainArgs args)
Provides access to a Google Cloud Platform KMS CryptoKeyVersion. For more information see [the official documentation](https://cloud.google.com/kms/docs/object-hierarchy#key_version) and [API](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions). A CryptoKeyVersion represents an individual cryptographic key, and the associated key material. ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.kms.KmsFunctions; import com.pulumi.gcp.kms.inputs.GetKMSKeyRingArgs; import com.pulumi.gcp.kms.inputs.GetKMSCryptoKeyArgs; import com.pulumi.gcp.kms.inputs.GetKMSCryptoKeyVersionArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var myKeyRing = KmsFunctions.getKMSKeyRing(GetKMSKeyRingArgs.builder() .name("my-key-ring") .location("us-central1") .build()); final var myCryptoKey = KmsFunctions.getKMSCryptoKey(GetKMSCryptoKeyArgs.builder() .name("my-crypto-key") .keyRing(myKeyRing.applyValue(getKMSKeyRingResult -> getKMSKeyRingResult.id())) .build()); final var myCryptoKeyVersion = KmsFunctions.getKMSCryptoKeyVersion(GetKMSCryptoKeyVersionArgs.builder() .cryptoKey(data.google_kms_crypto_key().my_key().id()) .build()); } } ```
-
getKMSCryptoKeyVersion
public static com.pulumi.core.Output<GetKMSCryptoKeyVersionResult> getKMSCryptoKeyVersion(GetKMSCryptoKeyVersionArgs args, com.pulumi.deployment.InvokeOptions options)
Provides access to a Google Cloud Platform KMS CryptoKeyVersion. For more information see [the official documentation](https://cloud.google.com/kms/docs/object-hierarchy#key_version) and [API](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions). A CryptoKeyVersion represents an individual cryptographic key, and the associated key material. ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.kms.KmsFunctions; import com.pulumi.gcp.kms.inputs.GetKMSKeyRingArgs; import com.pulumi.gcp.kms.inputs.GetKMSCryptoKeyArgs; import com.pulumi.gcp.kms.inputs.GetKMSCryptoKeyVersionArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var myKeyRing = KmsFunctions.getKMSKeyRing(GetKMSKeyRingArgs.builder() .name("my-key-ring") .location("us-central1") .build()); final var myCryptoKey = KmsFunctions.getKMSCryptoKey(GetKMSCryptoKeyArgs.builder() .name("my-crypto-key") .keyRing(myKeyRing.applyValue(getKMSKeyRingResult -> getKMSKeyRingResult.id())) .build()); final var myCryptoKeyVersion = KmsFunctions.getKMSCryptoKeyVersion(GetKMSCryptoKeyVersionArgs.builder() .cryptoKey(data.google_kms_crypto_key().my_key().id()) .build()); } } ```
-
getKMSCryptoKeyVersionPlain
public static java.util.concurrent.CompletableFuture<GetKMSCryptoKeyVersionResult> getKMSCryptoKeyVersionPlain(GetKMSCryptoKeyVersionPlainArgs args, com.pulumi.deployment.InvokeOptions options)
Provides access to a Google Cloud Platform KMS CryptoKeyVersion. For more information see [the official documentation](https://cloud.google.com/kms/docs/object-hierarchy#key_version) and [API](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings.cryptoKeys.cryptoKeyVersions). A CryptoKeyVersion represents an individual cryptographic key, and the associated key material. ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.kms.KmsFunctions; import com.pulumi.gcp.kms.inputs.GetKMSKeyRingArgs; import com.pulumi.gcp.kms.inputs.GetKMSCryptoKeyArgs; import com.pulumi.gcp.kms.inputs.GetKMSCryptoKeyVersionArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var myKeyRing = KmsFunctions.getKMSKeyRing(GetKMSKeyRingArgs.builder() .name("my-key-ring") .location("us-central1") .build()); final var myCryptoKey = KmsFunctions.getKMSCryptoKey(GetKMSCryptoKeyArgs.builder() .name("my-crypto-key") .keyRing(myKeyRing.applyValue(getKMSKeyRingResult -> getKMSKeyRingResult.id())) .build()); final var myCryptoKeyVersion = KmsFunctions.getKMSCryptoKeyVersion(GetKMSCryptoKeyVersionArgs.builder() .cryptoKey(data.google_kms_crypto_key().my_key().id()) .build()); } } ```
-
getKMSKeyRing
public static com.pulumi.core.Output<GetKMSKeyRingResult> getKMSKeyRing(GetKMSKeyRingArgs args)
Provides access to Google Cloud Platform KMS KeyRing. For more information see [the official documentation](https://cloud.google.com/kms/docs/object-hierarchy#key_ring) and [API](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings). A KeyRing is a grouping of CryptoKeys for organizational purposes. A KeyRing belongs to a Google Cloud Platform Project and resides in a specific location. ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.kms.KmsFunctions; import com.pulumi.gcp.kms.inputs.GetKMSKeyRingArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var myKeyRing = KmsFunctions.getKMSKeyRing(GetKMSKeyRingArgs.builder() .location("us-central1") .name("my-key-ring") .build()); } } ```
-
getKMSKeyRingPlain
public static java.util.concurrent.CompletableFuture<GetKMSKeyRingResult> getKMSKeyRingPlain(GetKMSKeyRingPlainArgs args)
Provides access to Google Cloud Platform KMS KeyRing. For more information see [the official documentation](https://cloud.google.com/kms/docs/object-hierarchy#key_ring) and [API](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings). A KeyRing is a grouping of CryptoKeys for organizational purposes. A KeyRing belongs to a Google Cloud Platform Project and resides in a specific location. ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.kms.KmsFunctions; import com.pulumi.gcp.kms.inputs.GetKMSKeyRingArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var myKeyRing = KmsFunctions.getKMSKeyRing(GetKMSKeyRingArgs.builder() .location("us-central1") .name("my-key-ring") .build()); } } ```
-
getKMSKeyRing
public static com.pulumi.core.Output<GetKMSKeyRingResult> getKMSKeyRing(GetKMSKeyRingArgs args, com.pulumi.deployment.InvokeOptions options)
Provides access to Google Cloud Platform KMS KeyRing. For more information see [the official documentation](https://cloud.google.com/kms/docs/object-hierarchy#key_ring) and [API](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings). A KeyRing is a grouping of CryptoKeys for organizational purposes. A KeyRing belongs to a Google Cloud Platform Project and resides in a specific location. ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.kms.KmsFunctions; import com.pulumi.gcp.kms.inputs.GetKMSKeyRingArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var myKeyRing = KmsFunctions.getKMSKeyRing(GetKMSKeyRingArgs.builder() .location("us-central1") .name("my-key-ring") .build()); } } ```
-
getKMSKeyRingPlain
public static java.util.concurrent.CompletableFuture<GetKMSKeyRingResult> getKMSKeyRingPlain(GetKMSKeyRingPlainArgs args, com.pulumi.deployment.InvokeOptions options)
Provides access to Google Cloud Platform KMS KeyRing. For more information see [the official documentation](https://cloud.google.com/kms/docs/object-hierarchy#key_ring) and [API](https://cloud.google.com/kms/docs/reference/rest/v1/projects.locations.keyRings). A KeyRing is a grouping of CryptoKeys for organizational purposes. A KeyRing belongs to a Google Cloud Platform Project and resides in a specific location. ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.kms.KmsFunctions; import com.pulumi.gcp.kms.inputs.GetKMSKeyRingArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var myKeyRing = KmsFunctions.getKMSKeyRing(GetKMSKeyRingArgs.builder() .location("us-central1") .name("my-key-ring") .build()); } } ```
-
getKMSSecret
public static com.pulumi.core.Output<GetKMSSecretResult> getKMSSecret(GetKMSSecretArgs args)
This data source allows you to use data encrypted with Google Cloud KMS within your resource definitions. For more information see [the official documentation](https://cloud.google.com/kms/docs/encrypt-decrypt). > **NOTE:** Using this data provider will allow you to conceal secret data within your resource definitions, but it does not take care of protecting that data in the logging output, plan output, or state output. Please take care to secure your secret data outside of resource definitions.
-
getKMSSecretPlain
public static java.util.concurrent.CompletableFuture<GetKMSSecretResult> getKMSSecretPlain(GetKMSSecretPlainArgs args)
This data source allows you to use data encrypted with Google Cloud KMS within your resource definitions. For more information see [the official documentation](https://cloud.google.com/kms/docs/encrypt-decrypt). > **NOTE:** Using this data provider will allow you to conceal secret data within your resource definitions, but it does not take care of protecting that data in the logging output, plan output, or state output. Please take care to secure your secret data outside of resource definitions.
-
getKMSSecret
public static com.pulumi.core.Output<GetKMSSecretResult> getKMSSecret(GetKMSSecretArgs args, com.pulumi.deployment.InvokeOptions options)
This data source allows you to use data encrypted with Google Cloud KMS within your resource definitions. For more information see [the official documentation](https://cloud.google.com/kms/docs/encrypt-decrypt). > **NOTE:** Using this data provider will allow you to conceal secret data within your resource definitions, but it does not take care of protecting that data in the logging output, plan output, or state output. Please take care to secure your secret data outside of resource definitions.
-
getKMSSecretPlain
public static java.util.concurrent.CompletableFuture<GetKMSSecretResult> getKMSSecretPlain(GetKMSSecretPlainArgs args, com.pulumi.deployment.InvokeOptions options)
This data source allows you to use data encrypted with Google Cloud KMS within your resource definitions. For more information see [the official documentation](https://cloud.google.com/kms/docs/encrypt-decrypt). > **NOTE:** Using this data provider will allow you to conceal secret data within your resource definitions, but it does not take care of protecting that data in the logging output, plan output, or state output. Please take care to secure your secret data outside of resource definitions.
-
getKMSSecretAsymmetric
public static com.pulumi.core.Output<GetKMSSecretAsymmetricResult> getKMSSecretAsymmetric(GetKMSSecretAsymmetricArgs args)
## get the public key to encrypt the secret with $ gcloud kms keys versions get-public-key 1\ --project my-project\ --location us-central1\ --keyring my-key-ring\ --key my-crypto-key\ --output-file public-key.pem ## encrypt secret with the public key $ echo -n my-secret-password |\ openssl pkeyutl -in -\ -encrypt\ -pubin\ -inkey public-key.pem\ -pkeyopt rsa_padding_mode:oaep\ -pkeyopt rsa_oaep_md:sha256\ -pkeyopt rsa_mgf1_md:sha256 >\ my-secret-password.enc ## base64 encode the ciphertext $ openssl base64 -in my-secret-password.enc M7nUoba9EGVTu2LjNjBKGdGVBYjyS/i/AY+4yQMQF0Qf/RfUfX31Jw6+VO9OuThq ylu/7ihX9XD4bM7yYdXnMv9p1OHQUlorSBSbb/J6n1W9UJhcp6um8Tw8/Isx4f75 4PskYS6f8Y2ItliGt1/A9iR5BTgGtJBwOxMlgoX2Ggq+Nh4E5SbdoaE5o6CO1nBx eIPsPEebQ6qC4JehQM3IGuV/lrm58+hZhaXAqNzX1cEYyAt5GYqJIVCiI585SUYs wRToGyTgaN+zthF0HP9IWlR4Am4LmJ/1OcePTnYw11CkU8wNRbDzVAzogwNH+rXr LTmf7hxVjBm6bBSVSNFcBKAXFlllubSfIeZ5hgzGqn54OmSf6odO12L5JxllddHc yAd54vWKs2kJtnsKV2V4ZdkI0w6y1TeI67baFZDNGo6qsCpFMPnvv7d46Pg2VOp1 J6Ivner0NnNHE4MzNmpZRk8WXMwqq4P/gTiT7F/aCX6oFCUQ4AWPQhJYh2dkcOmL IP+47Veb10aFn61F1CJwpmOOiGNXKdDT1vK8CMnnwhm825K0q/q9Zqpzc1+1ae1z mSqol1zCoa88CuSN6nTLQlVnN/dzfrGbc0boJPaM0iGhHtSzHk4SWg84LhiJB1q9 A9XFJmOVdkvRY9nnz/iVLAdd0Q3vFtLqCdUYsNN2yh4=
-
getKMSSecretAsymmetricPlain
public static java.util.concurrent.CompletableFuture<GetKMSSecretAsymmetricResult> getKMSSecretAsymmetricPlain(GetKMSSecretAsymmetricPlainArgs args)
## get the public key to encrypt the secret with $ gcloud kms keys versions get-public-key 1\ --project my-project\ --location us-central1\ --keyring my-key-ring\ --key my-crypto-key\ --output-file public-key.pem ## encrypt secret with the public key $ echo -n my-secret-password |\ openssl pkeyutl -in -\ -encrypt\ -pubin\ -inkey public-key.pem\ -pkeyopt rsa_padding_mode:oaep\ -pkeyopt rsa_oaep_md:sha256\ -pkeyopt rsa_mgf1_md:sha256 >\ my-secret-password.enc ## base64 encode the ciphertext $ openssl base64 -in my-secret-password.enc M7nUoba9EGVTu2LjNjBKGdGVBYjyS/i/AY+4yQMQF0Qf/RfUfX31Jw6+VO9OuThq ylu/7ihX9XD4bM7yYdXnMv9p1OHQUlorSBSbb/J6n1W9UJhcp6um8Tw8/Isx4f75 4PskYS6f8Y2ItliGt1/A9iR5BTgGtJBwOxMlgoX2Ggq+Nh4E5SbdoaE5o6CO1nBx eIPsPEebQ6qC4JehQM3IGuV/lrm58+hZhaXAqNzX1cEYyAt5GYqJIVCiI585SUYs wRToGyTgaN+zthF0HP9IWlR4Am4LmJ/1OcePTnYw11CkU8wNRbDzVAzogwNH+rXr LTmf7hxVjBm6bBSVSNFcBKAXFlllubSfIeZ5hgzGqn54OmSf6odO12L5JxllddHc yAd54vWKs2kJtnsKV2V4ZdkI0w6y1TeI67baFZDNGo6qsCpFMPnvv7d46Pg2VOp1 J6Ivner0NnNHE4MzNmpZRk8WXMwqq4P/gTiT7F/aCX6oFCUQ4AWPQhJYh2dkcOmL IP+47Veb10aFn61F1CJwpmOOiGNXKdDT1vK8CMnnwhm825K0q/q9Zqpzc1+1ae1z mSqol1zCoa88CuSN6nTLQlVnN/dzfrGbc0boJPaM0iGhHtSzHk4SWg84LhiJB1q9 A9XFJmOVdkvRY9nnz/iVLAdd0Q3vFtLqCdUYsNN2yh4=
-
getKMSSecretAsymmetric
public static com.pulumi.core.Output<GetKMSSecretAsymmetricResult> getKMSSecretAsymmetric(GetKMSSecretAsymmetricArgs args, com.pulumi.deployment.InvokeOptions options)
## get the public key to encrypt the secret with $ gcloud kms keys versions get-public-key 1\ --project my-project\ --location us-central1\ --keyring my-key-ring\ --key my-crypto-key\ --output-file public-key.pem ## encrypt secret with the public key $ echo -n my-secret-password |\ openssl pkeyutl -in -\ -encrypt\ -pubin\ -inkey public-key.pem\ -pkeyopt rsa_padding_mode:oaep\ -pkeyopt rsa_oaep_md:sha256\ -pkeyopt rsa_mgf1_md:sha256 >\ my-secret-password.enc ## base64 encode the ciphertext $ openssl base64 -in my-secret-password.enc M7nUoba9EGVTu2LjNjBKGdGVBYjyS/i/AY+4yQMQF0Qf/RfUfX31Jw6+VO9OuThq ylu/7ihX9XD4bM7yYdXnMv9p1OHQUlorSBSbb/J6n1W9UJhcp6um8Tw8/Isx4f75 4PskYS6f8Y2ItliGt1/A9iR5BTgGtJBwOxMlgoX2Ggq+Nh4E5SbdoaE5o6CO1nBx eIPsPEebQ6qC4JehQM3IGuV/lrm58+hZhaXAqNzX1cEYyAt5GYqJIVCiI585SUYs wRToGyTgaN+zthF0HP9IWlR4Am4LmJ/1OcePTnYw11CkU8wNRbDzVAzogwNH+rXr LTmf7hxVjBm6bBSVSNFcBKAXFlllubSfIeZ5hgzGqn54OmSf6odO12L5JxllddHc yAd54vWKs2kJtnsKV2V4ZdkI0w6y1TeI67baFZDNGo6qsCpFMPnvv7d46Pg2VOp1 J6Ivner0NnNHE4MzNmpZRk8WXMwqq4P/gTiT7F/aCX6oFCUQ4AWPQhJYh2dkcOmL IP+47Veb10aFn61F1CJwpmOOiGNXKdDT1vK8CMnnwhm825K0q/q9Zqpzc1+1ae1z mSqol1zCoa88CuSN6nTLQlVnN/dzfrGbc0boJPaM0iGhHtSzHk4SWg84LhiJB1q9 A9XFJmOVdkvRY9nnz/iVLAdd0Q3vFtLqCdUYsNN2yh4=
-
getKMSSecretAsymmetricPlain
public static java.util.concurrent.CompletableFuture<GetKMSSecretAsymmetricResult> getKMSSecretAsymmetricPlain(GetKMSSecretAsymmetricPlainArgs args, com.pulumi.deployment.InvokeOptions options)
## get the public key to encrypt the secret with $ gcloud kms keys versions get-public-key 1\ --project my-project\ --location us-central1\ --keyring my-key-ring\ --key my-crypto-key\ --output-file public-key.pem ## encrypt secret with the public key $ echo -n my-secret-password |\ openssl pkeyutl -in -\ -encrypt\ -pubin\ -inkey public-key.pem\ -pkeyopt rsa_padding_mode:oaep\ -pkeyopt rsa_oaep_md:sha256\ -pkeyopt rsa_mgf1_md:sha256 >\ my-secret-password.enc ## base64 encode the ciphertext $ openssl base64 -in my-secret-password.enc M7nUoba9EGVTu2LjNjBKGdGVBYjyS/i/AY+4yQMQF0Qf/RfUfX31Jw6+VO9OuThq ylu/7ihX9XD4bM7yYdXnMv9p1OHQUlorSBSbb/J6n1W9UJhcp6um8Tw8/Isx4f75 4PskYS6f8Y2ItliGt1/A9iR5BTgGtJBwOxMlgoX2Ggq+Nh4E5SbdoaE5o6CO1nBx eIPsPEebQ6qC4JehQM3IGuV/lrm58+hZhaXAqNzX1cEYyAt5GYqJIVCiI585SUYs wRToGyTgaN+zthF0HP9IWlR4Am4LmJ/1OcePTnYw11CkU8wNRbDzVAzogwNH+rXr LTmf7hxVjBm6bBSVSNFcBKAXFlllubSfIeZ5hgzGqn54OmSf6odO12L5JxllddHc yAd54vWKs2kJtnsKV2V4ZdkI0w6y1TeI67baFZDNGo6qsCpFMPnvv7d46Pg2VOp1 J6Ivner0NnNHE4MzNmpZRk8WXMwqq4P/gTiT7F/aCX6oFCUQ4AWPQhJYh2dkcOmL IP+47Veb10aFn61F1CJwpmOOiGNXKdDT1vK8CMnnwhm825K0q/q9Zqpzc1+1ae1z mSqol1zCoa88CuSN6nTLQlVnN/dzfrGbc0boJPaM0iGhHtSzHk4SWg84LhiJB1q9 A9XFJmOVdkvRY9nnz/iVLAdd0Q3vFtLqCdUYsNN2yh4=
-
getKMSSecretCiphertext
public static com.pulumi.core.Output<GetKMSSecretCiphertextResult> getKMSSecretCiphertext(GetKMSSecretCiphertextArgs args)
!> **Warning:** This data source is deprecated. Use the `gcp.kms.SecretCiphertext` **resource** instead. This data source allows you to encrypt data with Google Cloud KMS and use the ciphertext within your resource definitions. For more information see [the official documentation](https://cloud.google.com/kms/docs/encrypt-decrypt). > **NOTE:** Using this data source will allow you to conceal secret data within your resource definitions, but it does not take care of protecting that data in the logging output, plan output, or state output. Please take care to secure your secret data outside of resource definitions.
-
getKMSSecretCiphertextPlain
public static java.util.concurrent.CompletableFuture<GetKMSSecretCiphertextResult> getKMSSecretCiphertextPlain(GetKMSSecretCiphertextPlainArgs args)
!> **Warning:** This data source is deprecated. Use the `gcp.kms.SecretCiphertext` **resource** instead. This data source allows you to encrypt data with Google Cloud KMS and use the ciphertext within your resource definitions. For more information see [the official documentation](https://cloud.google.com/kms/docs/encrypt-decrypt). > **NOTE:** Using this data source will allow you to conceal secret data within your resource definitions, but it does not take care of protecting that data in the logging output, plan output, or state output. Please take care to secure your secret data outside of resource definitions.
-
getKMSSecretCiphertext
public static com.pulumi.core.Output<GetKMSSecretCiphertextResult> getKMSSecretCiphertext(GetKMSSecretCiphertextArgs args, com.pulumi.deployment.InvokeOptions options)
!> **Warning:** This data source is deprecated. Use the `gcp.kms.SecretCiphertext` **resource** instead. This data source allows you to encrypt data with Google Cloud KMS and use the ciphertext within your resource definitions. For more information see [the official documentation](https://cloud.google.com/kms/docs/encrypt-decrypt). > **NOTE:** Using this data source will allow you to conceal secret data within your resource definitions, but it does not take care of protecting that data in the logging output, plan output, or state output. Please take care to secure your secret data outside of resource definitions.
-
getKMSSecretCiphertextPlain
public static java.util.concurrent.CompletableFuture<GetKMSSecretCiphertextResult> getKMSSecretCiphertextPlain(GetKMSSecretCiphertextPlainArgs args, com.pulumi.deployment.InvokeOptions options)
!> **Warning:** This data source is deprecated. Use the `gcp.kms.SecretCiphertext` **resource** instead. This data source allows you to encrypt data with Google Cloud KMS and use the ciphertext within your resource definitions. For more information see [the official documentation](https://cloud.google.com/kms/docs/encrypt-decrypt). > **NOTE:** Using this data source will allow you to conceal secret data within your resource definitions, but it does not take care of protecting that data in the logging output, plan output, or state output. Please take care to secure your secret data outside of resource definitions.
-
getKeyRingIamPolicy
public static com.pulumi.core.Output<GetKeyRingIamPolicyResult> getKeyRingIamPolicy(GetKeyRingIamPolicyArgs args)
Retrieves the current IAM policy data for a Google Cloud KMS key ring. ## example ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.kms.KmsFunctions; import com.pulumi.gcp.kms.inputs.GetKeyRingIamPolicyArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var testKeyRingIamPolicy = KmsFunctions.getKeyRingIamPolicy(GetKeyRingIamPolicyArgs.builder() .keyRingId("{project_id}/{location_name}/{key_ring_name}") .build()); } } ```
-
getKeyRingIamPolicyPlain
public static java.util.concurrent.CompletableFuture<GetKeyRingIamPolicyResult> getKeyRingIamPolicyPlain(GetKeyRingIamPolicyPlainArgs args)
Retrieves the current IAM policy data for a Google Cloud KMS key ring. ## example ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.kms.KmsFunctions; import com.pulumi.gcp.kms.inputs.GetKeyRingIamPolicyArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var testKeyRingIamPolicy = KmsFunctions.getKeyRingIamPolicy(GetKeyRingIamPolicyArgs.builder() .keyRingId("{project_id}/{location_name}/{key_ring_name}") .build()); } } ```
-
getKeyRingIamPolicy
public static com.pulumi.core.Output<GetKeyRingIamPolicyResult> getKeyRingIamPolicy(GetKeyRingIamPolicyArgs args, com.pulumi.deployment.InvokeOptions options)
Retrieves the current IAM policy data for a Google Cloud KMS key ring. ## example ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.kms.KmsFunctions; import com.pulumi.gcp.kms.inputs.GetKeyRingIamPolicyArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var testKeyRingIamPolicy = KmsFunctions.getKeyRingIamPolicy(GetKeyRingIamPolicyArgs.builder() .keyRingId("{project_id}/{location_name}/{key_ring_name}") .build()); } } ```
-
getKeyRingIamPolicyPlain
public static java.util.concurrent.CompletableFuture<GetKeyRingIamPolicyResult> getKeyRingIamPolicyPlain(GetKeyRingIamPolicyPlainArgs args, com.pulumi.deployment.InvokeOptions options)
Retrieves the current IAM policy data for a Google Cloud KMS key ring. ## example ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.kms.KmsFunctions; import com.pulumi.gcp.kms.inputs.GetKeyRingIamPolicyArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { final var testKeyRingIamPolicy = KmsFunctions.getKeyRingIamPolicy(GetKeyRingIamPolicyArgs.builder() .keyRingId("{project_id}/{location_name}/{key_ring_name}") .build()); } } ```
-
-