get KMSCrypto Key
Provides access to a Google Cloud Platform KMS CryptoKey. For more information see the official documentation and API. 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
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());
}
}
Return
A collection of values returned by getKMSCryptoKey.
Parameters
A collection of arguments for invoking getKMSCryptoKey.
Return
A collection of values returned by getKMSCryptoKey.
Parameters
The id
of the Google Cloud Platform KeyRing to which the key belongs.
The CryptoKey's name. A CryptoKey’s name belonging to the specified Google Cloud Platform KeyRing and match the regular expression [a-zA-Z0-9_-]{1,63}
See also
Return
A collection of values returned by getKMSCryptoKey.
Parameters
Builder for com.pulumi.gcp.kms.kotlin.inputs.GetKMSCryptoKeyPlainArgs.