UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

151 lines 6.27 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.DelegationSignerRecord = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Provides a resource to manage a [delegation signer record](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-configuring-dnssec-enable-signing.html#dns-configuring-dnssec-enable-signing-step-1) in the parent DNS zone for domains registered with Route53. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const current = aws.getCallerIdentity({}); * const example = new aws.kms.Key("example", { * customerMasterKeySpec: "ECC_NIST_P256", * deletionWindowInDays: 7, * keyUsage: "SIGN_VERIFY", * policy: JSON.stringify({ * Statement: [ * { * Action: [ * "kms:DescribeKey", * "kms:GetPublicKey", * "kms:Sign", * ], * Effect: "Allow", * Principal: { * Service: "dnssec-route53.amazonaws.com", * }, * Sid: "Allow Route 53 DNSSEC Service", * Resource: "*", * Condition: { * StringEquals: { * "aws:SourceAccount": current.then(current => current.accountId), * }, * ArnLike: { * "aws:SourceArn": "arn:aws:route53:::hostedzone/*", * }, * }, * }, * { * Action: "kms:CreateGrant", * Effect: "Allow", * Principal: { * Service: "dnssec-route53.amazonaws.com", * }, * Sid: "Allow Route 53 DNSSEC Service to CreateGrant", * Resource: "*", * Condition: { * Bool: { * "kms:GrantIsForAWSResource": "true", * }, * }, * }, * { * Action: "kms:*", * Effect: "Allow", * Principal: { * AWS: current.then(current => `arn:aws:iam::${current.accountId}:root`), * }, * Resource: "*", * Sid: "Enable IAM User Permissions", * }, * ], * Version: "2012-10-17", * }), * }); * const exampleZone = new aws.route53.Zone("example", {name: "example.com"}); * const exampleKeySigningKey = new aws.route53.KeySigningKey("example", { * hostedZoneId: test.id, * keyManagementServiceArn: testAwsKmsKey.arn, * name: "example", * }); * const exampleHostedZoneDnsSec = new aws.route53.HostedZoneDnsSec("example", {hostedZoneId: exampleKeySigningKey.hostedZoneId}, { * dependsOn: [exampleKeySigningKey], * }); * const exampleDelegationSignerRecord = new aws.route53domains.DelegationSignerRecord("example", { * domainName: "example.com", * signingAttributes: { * algorithm: exampleKeySigningKey.signingAlgorithmType, * flags: exampleKeySigningKey.flag, * publicKey: exampleKeySigningKey.publicKey, * }, * }); * ``` * * ## Import * * Using `pulumi import`, import delegation signer records using the domain name and DNSSEC key ID, separated by a comma (`,`). For example: * * ```sh * $ pulumi import aws:route53domains/delegationSignerRecord:DelegationSignerRecord example example.com,40DE3534F5324DBDAC598ACEDB5B1E26A5368732D9C791D1347E4FBDDF6FC343 * ``` */ class DelegationSignerRecord extends pulumi.CustomResource { /** * Get an existing DelegationSignerRecord resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name, id, state, opts) { return new DelegationSignerRecord(name, state, { ...opts, id: id }); } /** * Returns true if the given object is an instance of DelegationSignerRecord. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj) { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === DelegationSignerRecord.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["dnssecKeyId"] = state?.dnssecKeyId; resourceInputs["domainName"] = state?.domainName; resourceInputs["signingAttributes"] = state?.signingAttributes; resourceInputs["timeouts"] = state?.timeouts; } else { const args = argsOrState; if (args?.domainName === undefined && !opts.urn) { throw new Error("Missing required property 'domainName'"); } resourceInputs["domainName"] = args?.domainName; resourceInputs["signingAttributes"] = args?.signingAttributes; resourceInputs["timeouts"] = args?.timeouts; resourceInputs["dnssecKeyId"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(DelegationSignerRecord.__pulumiType, name, resourceInputs, opts); } } exports.DelegationSignerRecord = DelegationSignerRecord; /** @internal */ DelegationSignerRecord.__pulumiType = 'aws:route53domains/delegationSignerRecord:DelegationSignerRecord'; //# sourceMappingURL=delegationSignerRecord.js.map