Class Policy
A policy is a collection of DNS rules applied to one or more Virtual Private Cloud resources.
To get more information about Policy, see:
- API documentation
- How-to Guides
- Using DNS server policies
Inherited Members
Namespace: Pulumi.Gcp.Dns
Assembly: Pulumi.Gcp.dll
Syntax
public class Policy : CustomResource
Constructors
View SourcePolicy(String, PolicyArgs, CustomResourceOptions)
Create a Policy resource with the given unique name, arguments, and options.
Declaration
public Policy(string name, PolicyArgs args = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| PolicyArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAlternativeNameServerConfig
Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified. Structure is documented below.
Declaration
public Output<PolicyAlternativeNameServerConfig> AlternativeNameServerConfig { get; }
Property Value
| Type | Description |
|---|---|
| Output<PolicyAlternativeNameServerConfig> |
Description
A textual description field. Defaults to 'Managed by Pulumi'.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
EnableInboundForwarding
Allows networks bound to this policy to receive DNS queries sent by VMs or applications over VPN connections. When enabled, a virtual IP address will be allocated from each of the sub-networks that are bound to this policy.
Declaration
public Output<bool?> EnableInboundForwarding { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
EnableLogging
Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.
Declaration
public Output<bool?> EnableLogging { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Name
User assigned name for this policy.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Networks
List of network names specifying networks to which this policy is applied. Structure is documented below.
Declaration
public Output<ImmutableArray<PolicyNetwork>> Networks { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<PolicyNetwork>> |
Project
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Declaration
public Output<string> Project { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, PolicyState, CustomResourceOptions)
Get an existing Policy resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Policy Get(string name, Input<string> id, PolicyState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| PolicyState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Policy |