Package com.pulumi.aws.route53
Class KeySigningKey
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.route53.KeySigningKey
-
public class KeySigningKey extends com.pulumi.resources.CustomResourceManages a Route 53 Key Signing Key. To manage DNS Security Extensions (DNSSEC) for a Hosted Zone, see the `aws.route53.HostedZoneDnsSec` resource. For more information about managing DNSSEC in Route 53, see the [Route 53 Developer Guide](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-configuring-dnssec.html). ## Example Usage
## Import Using `pulumi import`, import `aws.route53.KeySigningKey` resources using the Route 53 Hosted Zone identifier and KMS Key identifier, separated by a comma (`,`). For example: ```sh $ pulumi import aws:route53/keySigningKey:KeySigningKey example Z1D633PJN98FT9,example ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.AwsFunctions; import com.pulumi.aws.inputs.GetCallerIdentityArgs; import com.pulumi.aws.kms.Key; import com.pulumi.aws.kms.KeyArgs; import com.pulumi.aws.route53.Zone; import com.pulumi.aws.route53.ZoneArgs; import com.pulumi.aws.route53.KeySigningKey; import com.pulumi.aws.route53.KeySigningKeyArgs; import com.pulumi.aws.route53.HostedZoneDnsSec; import com.pulumi.aws.route53.HostedZoneDnsSecArgs; import static com.pulumi.codegen.internal.Serialization.*; import com.pulumi.resources.CustomResourceOptions; import java.util.ArrayList; import java.util.Arrays; 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 current = AwsFunctions.getCallerIdentity(GetCallerIdentityArgs.builder() .build()); var example = new Key("example", KeyArgs.builder() .customerMasterKeySpec("ECC_NIST_P256") .deletionWindowInDays(7) .keyUsage("SIGN_VERIFY") .policy(serializeJson( jsonObject( jsonProperty("Statement", jsonArray( jsonObject( jsonProperty("Action", jsonArray( "kms:DescribeKey", "kms:GetPublicKey", "kms:Sign" )), jsonProperty("Effect", "Allow"), jsonProperty("Principal", jsonObject( jsonProperty("Service", "dnssec-route53.amazonaws.com") )), jsonProperty("Sid", "Allow Route 53 DNSSEC Service"), jsonProperty("Resource", "*"), jsonProperty("Condition", jsonObject( jsonProperty("StringEquals", jsonObject( jsonProperty("aws:SourceAccount", current.accountId()) )), jsonProperty("ArnLike", jsonObject( jsonProperty("aws:SourceArn", "arn:aws:route53:::hostedzone/*") )) )) ), jsonObject( jsonProperty("Action", "kms:CreateGrant"), jsonProperty("Effect", "Allow"), jsonProperty("Principal", jsonObject( jsonProperty("Service", "dnssec-route53.amazonaws.com") )), jsonProperty("Sid", "Allow Route 53 DNSSEC Service to CreateGrant"), jsonProperty("Resource", "*"), jsonProperty("Condition", jsonObject( jsonProperty("Bool", jsonObject( jsonProperty("kms:GrantIsForAWSResource", "true") )) )) ), jsonObject( jsonProperty("Action", "kms:*"), jsonProperty("Effect", "Allow"), jsonProperty("Principal", jsonObject( jsonProperty("AWS", String.format("arn:aws:iam::%s:root", current.accountId())) )), jsonProperty("Resource", "*"), jsonProperty("Sid", "Enable IAM User Permissions") ) )), jsonProperty("Version", "2012-10-17") ))) .build()); var exampleZone = new Zone("exampleZone", ZoneArgs.builder() .name("example.com") .build()); var exampleKeySigningKey = new KeySigningKey("exampleKeySigningKey", KeySigningKeyArgs.builder() .hostedZoneId(test.id()) .keyManagementServiceArn(testAwsKmsKey.arn()) .name("example") .build()); var exampleHostedZoneDnsSec = new HostedZoneDnsSec("exampleHostedZoneDnsSec", HostedZoneDnsSecArgs.builder() .hostedZoneId(exampleKeySigningKey.hostedZoneId()) .build(), CustomResourceOptions.builder() .dependsOn(exampleKeySigningKey) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description KeySigningKey(java.lang.String name)KeySigningKey(java.lang.String name, KeySigningKeyArgs args)KeySigningKey(java.lang.String name, KeySigningKeyArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>digestAlgorithmMnemonic()com.pulumi.core.Output<java.lang.Integer>digestAlgorithmType()com.pulumi.core.Output<java.lang.String>digestValue()com.pulumi.core.Output<java.lang.String>dnskeyRecord()com.pulumi.core.Output<java.lang.String>dsRecord()com.pulumi.core.Output<java.lang.Integer>flag()static KeySigningKeyget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, KeySigningKeyState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>hostedZoneId()com.pulumi.core.Output<java.lang.String>keyManagementServiceArn()com.pulumi.core.Output<java.lang.Integer>keyTag()com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.lang.String>publicKey()com.pulumi.core.Output<java.lang.String>signingAlgorithmMnemonic()com.pulumi.core.Output<java.lang.Integer>signingAlgorithmType()com.pulumi.core.Output<java.util.Optional<java.lang.String>>status()
-
-
-
Constructor Detail
-
KeySigningKey
public KeySigningKey(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
KeySigningKey
public KeySigningKey(java.lang.String name, KeySigningKeyArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
KeySigningKey
public KeySigningKey(java.lang.String name, KeySigningKeyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
digestAlgorithmMnemonic
public com.pulumi.core.Output<java.lang.String> digestAlgorithmMnemonic()
- Returns:
- A string used to represent the delegation signer digest algorithm. This value must follow the guidelines provided by [RFC-8624 Section 3.3](https://tools.ietf.org/html/rfc8624#section-3.3).
-
digestAlgorithmType
public com.pulumi.core.Output<java.lang.Integer> digestAlgorithmType()
- Returns:
- An integer used to represent the delegation signer digest algorithm. This value must follow the guidelines provided by [RFC-8624 Section 3.3](https://tools.ietf.org/html/rfc8624#section-3.3).
-
digestValue
public com.pulumi.core.Output<java.lang.String> digestValue()
- Returns:
- A cryptographic digest of a DNSKEY resource record (RR). DNSKEY records are used to publish the public key that resolvers can use to verify DNSSEC signatures that are used to secure certain kinds of information provided by the DNS system.
-
dnskeyRecord
public com.pulumi.core.Output<java.lang.String> dnskeyRecord()
- Returns:
- A string that represents a DNSKEY record.
-
dsRecord
public com.pulumi.core.Output<java.lang.String> dsRecord()
- Returns:
- A string that represents a delegation signer (DS) record.
-
flag
public com.pulumi.core.Output<java.lang.Integer> flag()
- Returns:
- An integer that specifies how the key is used. For key-signing key (KSK), this value is always 257.
-
hostedZoneId
public com.pulumi.core.Output<java.lang.String> hostedZoneId()
- Returns:
- Identifier of the Route 53 Hosted Zone.
-
keyManagementServiceArn
public com.pulumi.core.Output<java.lang.String> keyManagementServiceArn()
- Returns:
- ARN of the KMS Key. This must be unique for each key-signing key (KSK) in a single hosted zone. This key must be in the `us-east-1` Region and meet certain requirements, which are described in the [Route 53 Developer Guide](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-configuring-dnssec-cmk-requirements.html) and [Route 53 API Reference](https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateKeySigningKey.html).
-
keyTag
public com.pulumi.core.Output<java.lang.Integer> keyTag()
- Returns:
- An integer used to identify the DNSSEC record for the domain name. The process used to calculate the value is described in [RFC-4034 Appendix B](https://tools.ietf.org/rfc/rfc4034.txt).
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- Name of the key-signing key (KSK). Must be unique for each key-signing key in the same hosted zone. The following arguments are optional:
-
publicKey
public com.pulumi.core.Output<java.lang.String> publicKey()
- Returns:
- The public key, represented as a Base64 encoding, as required by [RFC-4034 Page 5](https://tools.ietf.org/rfc/rfc4034.txt).
-
signingAlgorithmMnemonic
public com.pulumi.core.Output<java.lang.String> signingAlgorithmMnemonic()
- Returns:
- A string used to represent the signing algorithm. This value must follow the guidelines provided by [RFC-8624 Section 3.1](https://tools.ietf.org/html/rfc8624#section-3.1).
-
signingAlgorithmType
public com.pulumi.core.Output<java.lang.Integer> signingAlgorithmType()
- Returns:
- An integer used to represent the signing algorithm. This value must follow the guidelines provided by [RFC-8624 Section 3.1](https://tools.ietf.org/html/rfc8624#section-3.1).
-
status
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> status()
- Returns:
- Status of the key-signing key (KSK). Valid values: `ACTIVE`, `INACTIVE`. Defaults to `ACTIVE`.
-
get
public static KeySigningKey get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable KeySigningKeyState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-