Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

AWS Classic

v4.30.0 published on Tuesday, Nov 30, 2021 by Pulumi

HostedZoneDnsSec

Manages Route 53 Hosted Zone Domain Name System Security Extensions (DNSSEC). For more information about managing DNSSEC in Route 53, see the Route 53 Developer Guide.

Example Usage

using System.Collections.Generic;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var exampleKey = new Aws.Kms.Key("exampleKey", new Aws.Kms.KeyArgs
        {
            CustomerMasterKeySpec = "ECC_NIST_P256",
            DeletionWindowInDays = 7,
            KeyUsage = "SIGN_VERIFY",
            Policy = JsonSerializer.Serialize(new Dictionary<string, object?>
            {
                { "Statement", new[]
                    {
                        new Dictionary<string, object?>
                        {
                            { "Action", new[]
                                {
                                    "kms:DescribeKey",
                                    "kms:GetPublicKey",
                                    "kms:Sign",
                                }
                             },
                            { "Effect", "Allow" },
                            { "Principal", new Dictionary<string, object?>
                            {
                                { "Service", "dnssec-route53.amazonaws.com" },
                            } },
                            { "Sid", "Allow Route 53 DNSSEC Service" },
                            { "Resource", "*" },
                        },
                        new Dictionary<string, object?>
                        {
                            { "Action", "kms:CreateGrant" },
                            { "Effect", "Allow" },
                            { "Principal", new Dictionary<string, object?>
                            {
                                { "Service", "dnssec-route53.amazonaws.com" },
                            } },
                            { "Sid", "Allow Route 53 DNSSEC Service to CreateGrant" },
                            { "Resource", "*" },
                            { "Condition", new Dictionary<string, object?>
                            {
                                { "Bool", new Dictionary<string, object?>
                                {
                                    { "kms:GrantIsForAWSResource", "true" },
                                } },
                            } },
                        },
                        new Dictionary<string, object?>
                        {
                            { "Action", "kms:*" },
                            { "Effect", "Allow" },
                            { "Principal", new Dictionary<string, object?>
                            {
                                { "AWS", "*" },
                            } },
                            { "Resource", "*" },
                            { "Sid", "IAM User Permissions" },
                        },
                    }
                 },
                { "Version", "2012-10-17" },
            }),
        });
        var exampleZone = new Aws.Route53.Zone("exampleZone", new Aws.Route53.ZoneArgs
        {
        });
        var exampleKeySigningKey = new Aws.Route53.KeySigningKey("exampleKeySigningKey", new Aws.Route53.KeySigningKeyArgs
        {
            HostedZoneId = exampleZone.Id,
            KeyManagementServiceArn = exampleKey.Arn,
        });
        var exampleHostedZoneDnsSec = new Aws.Route53.HostedZoneDnsSec("exampleHostedZoneDnsSec", new Aws.Route53.HostedZoneDnsSecArgs
        {
            HostedZoneId = exampleKeySigningKey.HostedZoneId,
        }, new CustomResourceOptions
        {
            DependsOn = 
            {
                exampleKeySigningKey,
            },
        });
    }

}
package main

import (
	"encoding/json"

	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/kms"
	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/route53"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		tmpJSON0, err := json.Marshal(map[string]interface{}{
			"Statement": []interface{}{
				map[string]interface{}{
					"Action": []string{
						"kms:DescribeKey",
						"kms:GetPublicKey",
						"kms:Sign",
					},
					"Effect": "Allow",
					"Principal": map[string]interface{}{
						"Service": "dnssec-route53.amazonaws.com",
					},
					"Sid":      "Allow Route 53 DNSSEC Service",
					"Resource": "*",
				},
				map[string]interface{}{
					"Action": "kms:CreateGrant",
					"Effect": "Allow",
					"Principal": map[string]interface{}{
						"Service": "dnssec-route53.amazonaws.com",
					},
					"Sid":      "Allow Route 53 DNSSEC Service to CreateGrant",
					"Resource": "*",
					"Condition": map[string]interface{}{
						"Bool": map[string]interface{}{
							"kms:GrantIsForAWSResource": "true",
						},
					},
				},
				map[string]interface{}{
					"Action": "kms:*",
					"Effect": "Allow",
					"Principal": map[string]interface{}{
						"AWS": "*",
					},
					"Resource": "*",
					"Sid":      "IAM User Permissions",
				},
			},
			"Version": "2012-10-17",
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		exampleKey, err := kms.NewKey(ctx, "exampleKey", &kms.KeyArgs{
			CustomerMasterKeySpec: pulumi.String("ECC_NIST_P256"),
			DeletionWindowInDays:  pulumi.Int(7),
			KeyUsage:              pulumi.String("SIGN_VERIFY"),
			Policy:                pulumi.String(json0),
		})
		if err != nil {
			return err
		}
		exampleZone, err := route53.NewZone(ctx, "exampleZone", nil)
		if err != nil {
			return err
		}
		exampleKeySigningKey, err := route53.NewKeySigningKey(ctx, "exampleKeySigningKey", &route53.KeySigningKeyArgs{
			HostedZoneId:            exampleZone.ID(),
			KeyManagementServiceArn: exampleKey.Arn,
		})
		if err != nil {
			return err
		}
		_, err = route53.NewHostedZoneDnsSec(ctx, "exampleHostedZoneDnsSec", &route53.HostedZoneDnsSecArgs{
			HostedZoneId: exampleKeySigningKey.HostedZoneId,
		}, pulumi.DependsOn([]pulumi.Resource{
			exampleKeySigningKey,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import json
import pulumi_aws as aws

example_key = aws.kms.Key("exampleKey",
    customer_master_key_spec="ECC_NIST_P256",
    deletion_window_in_days=7,
    key_usage="SIGN_VERIFY",
    policy=json.dumps({
        "Statement": [
            {
                "Action": [
                    "kms:DescribeKey",
                    "kms:GetPublicKey",
                    "kms:Sign",
                ],
                "Effect": "Allow",
                "Principal": {
                    "Service": "dnssec-route53.amazonaws.com",
                },
                "Sid": "Allow Route 53 DNSSEC Service",
                "Resource": "*",
            },
            {
                "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": "*",
                },
                "Resource": "*",
                "Sid": "IAM User Permissions",
            },
        ],
        "Version": "2012-10-17",
    }))
example_zone = aws.route53.Zone("exampleZone")
example_key_signing_key = aws.route53.KeySigningKey("exampleKeySigningKey",
    hosted_zone_id=example_zone.id,
    key_management_service_arn=example_key.arn)
example_hosted_zone_dns_sec = aws.route53.HostedZoneDnsSec("exampleHostedZoneDnsSec", hosted_zone_id=example_key_signing_key.hosted_zone_id,
opts=pulumi.ResourceOptions(depends_on=[example_key_signing_key]))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const exampleKey = new aws.kms.Key("exampleKey", {
    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: "*",
            },
            {
                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: "*",
                },
                Resource: "*",
                Sid: "IAM User Permissions",
            },
        ],
        Version: "2012-10-17",
    }),
});
const exampleZone = new aws.route53.Zone("exampleZone", {});
const exampleKeySigningKey = new aws.route53.KeySigningKey("exampleKeySigningKey", {
    hostedZoneId: exampleZone.id,
    keyManagementServiceArn: exampleKey.arn,
});
const exampleHostedZoneDnsSec = new aws.route53.HostedZoneDnsSec("exampleHostedZoneDnsSec", {hostedZoneId: exampleKeySigningKey.hostedZoneId}, {
    dependsOn: [exampleKeySigningKey],
});

Create a HostedZoneDnsSec Resource

new HostedZoneDnsSec(name: string, args: HostedZoneDnsSecArgs, opts?: CustomResourceOptions);
@overload
def HostedZoneDnsSec(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     hosted_zone_id: Optional[str] = None,
                     signing_status: Optional[str] = None)
@overload
def HostedZoneDnsSec(resource_name: str,
                     args: HostedZoneDnsSecArgs,
                     opts: Optional[ResourceOptions] = None)
func NewHostedZoneDnsSec(ctx *Context, name string, args HostedZoneDnsSecArgs, opts ...ResourceOption) (*HostedZoneDnsSec, error)
public HostedZoneDnsSec(string name, HostedZoneDnsSecArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args HostedZoneDnsSecArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args HostedZoneDnsSecArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args HostedZoneDnsSecArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args HostedZoneDnsSecArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

HostedZoneDnsSec Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The HostedZoneDnsSec resource accepts the following input properties:

HostedZoneId string
Identifier of the Route 53 Hosted Zone.
SigningStatus string
Hosted Zone signing status. Valid values: SIGNING, NOT_SIGNING. Defaults to SIGNING.
HostedZoneId string
Identifier of the Route 53 Hosted Zone.
SigningStatus string
Hosted Zone signing status. Valid values: SIGNING, NOT_SIGNING. Defaults to SIGNING.
hostedZoneId string
Identifier of the Route 53 Hosted Zone.
signingStatus string
Hosted Zone signing status. Valid values: SIGNING, NOT_SIGNING. Defaults to SIGNING.
hosted_zone_id str
Identifier of the Route 53 Hosted Zone.
signing_status str
Hosted Zone signing status. Valid values: SIGNING, NOT_SIGNING. Defaults to SIGNING.

Outputs

All input properties are implicitly available as output properties. Additionally, the HostedZoneDnsSec resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing HostedZoneDnsSec Resource

Get an existing HostedZoneDnsSec resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: HostedZoneDnsSecState, opts?: CustomResourceOptions): HostedZoneDnsSec
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        hosted_zone_id: Optional[str] = None,
        signing_status: Optional[str] = None) -> HostedZoneDnsSec
func GetHostedZoneDnsSec(ctx *Context, name string, id IDInput, state *HostedZoneDnsSecState, opts ...ResourceOption) (*HostedZoneDnsSec, error)
public static HostedZoneDnsSec Get(string name, Input<string> id, HostedZoneDnsSecState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

HostedZoneId string
Identifier of the Route 53 Hosted Zone.
SigningStatus string
Hosted Zone signing status. Valid values: SIGNING, NOT_SIGNING. Defaults to SIGNING.
HostedZoneId string
Identifier of the Route 53 Hosted Zone.
SigningStatus string
Hosted Zone signing status. Valid values: SIGNING, NOT_SIGNING. Defaults to SIGNING.
hostedZoneId string
Identifier of the Route 53 Hosted Zone.
signingStatus string
Hosted Zone signing status. Valid values: SIGNING, NOT_SIGNING. Defaults to SIGNING.
hosted_zone_id str
Identifier of the Route 53 Hosted Zone.
signing_status str
Hosted Zone signing status. Valid values: SIGNING, NOT_SIGNING. Defaults to SIGNING.

Import

aws_route53_hosted_zone_dnssec resources can be imported by using the Route 53 Hosted Zone identifier, e.g.,

 $ pulumi import aws:route53/hostedZoneDnsSec:HostedZoneDnsSec example Z1D633PJN98FT9

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.