getKeys

suspend fun getKeys(argument: GetKeysPlainArgs): GetKeysResult

Get the DNSKEY and DS records of DNSSEC-signed managed zones. For more information see the official documentation and API.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.dns.ManagedZone;
import com.pulumi.gcp.dns.ManagedZoneArgs;
import com.pulumi.gcp.dns.inputs.ManagedZoneDnssecConfigArgs;
import com.pulumi.gcp.dns.DnsFunctions;
import com.pulumi.gcp.dns.inputs.GetKeysArgs;
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 foo = new ManagedZone("foo", ManagedZoneArgs.builder()
.dnsName("foo.bar.")
.dnssecConfig(ManagedZoneDnssecConfigArgs.builder()
.state("on")
.nonExistence("nsec3")
.build())
.build());
final var fooDnsKeys = DnsFunctions.getKeys(GetKeysArgs.builder()
.managedZone(foo.id())
.build());
ctx.export("fooDnsDsRecord", fooDnsKeys.applyValue(getKeysResult -> getKeysResult).applyValue(fooDnsKeys -> fooDnsKeys.applyValue(getKeysResult -> getKeysResult.keySigningKeys()[0].dsRecord())));
}
}

Return

A collection of values returned by getKeys.

Parameters

argument

A collection of arguments for invoking getKeys.


suspend fun getKeys(managedZone: String, project: String? = null): GetKeysResult

Return

A collection of values returned by getKeys.

Parameters

managedZone

The name or id of the Cloud DNS managed zone.

project

The ID of the project in which the resource belongs. If project is not provided, the provider project is used.

See also


suspend fun getKeys(argument: suspend GetKeysPlainArgsBuilder.() -> Unit): GetKeysResult

Return

A collection of values returned by getKeys.

Parameters

argument

Builder for com.pulumi.gcp.dns.kotlin.inputs.GetKeysPlainArgs.

See also