Alias
Provides an alias for a KMS customer master key. AWS Console enforces 1-to-1 mapping between aliases & keys, but API (hence this provider too) allows you to create as many aliases as the account limits allow you.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.kms.Key;
import com.pulumi.aws.kms.Alias;
import com.pulumi.aws.kms.AliasArgs;
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) {
var key = new Key("key");
var alias = new Alias("alias", AliasArgs.builder()
.targetKeyId(key.keyId())
.build());
}
}
Content copied to clipboard
Import
KMS aliases can be imported using the name
, e.g.,
$ pulumi import aws:kms/alias:Alias a alias/my-key-alias
Content copied to clipboard
Properties
Link copied to clipboard
Creates an unique alias beginning with the specified prefix. The name must start with the word "alias" followed by a forward slash (alias/). Conflicts with name
.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
The Amazon Resource Name (ARN) of the target key identifier.
Link copied to clipboard
Identifier for the key for which the alias is for, can be either an ARN or key_id.