Class Intention
Intentions are used to define rules for which services may connect to one another when using Consul Connect.
It is appropriate to either reference existing services or specify non-existent services
that will be created in the future when creating intentions. This resource can be used
in conjunction with the consul..Service datasource when referencing services
registered on nodes that have a running Consul agent.
Example Usage
using Pulumi;
using Consul = Pulumi.Consul;
class MyStack : Stack
{
public MyStack()
{
var database = new Consul.Intention("database", new Consul.IntentionArgs
{
Action = "allow",
DestinationName = "db",
SourceName = "api",
});
}
}
Inherited Members
Namespace: Pulumi.Consul
Assembly: Pulumi.Consul.dll
Syntax
public class Intention : CustomResource
Constructors
View SourceIntention(String, IntentionArgs, CustomResourceOptions)
Create a Intention resource with the given unique name, arguments, and options.
Declaration
public Intention(string name, IntentionArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| IntentionArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAction
The intention action. Must be one of allow or deny.
Declaration
public Output<string> Action { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Description
Optional description that can be used by Consul tooling, but is not used internally.
Declaration
public Output<string> Description { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DestinationName
The name of the destination service for the intention. This service does not have to exist.
Declaration
public Output<string> DestinationName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DestinationNamespace
The destination namespace of the intention.
Declaration
public Output<string> DestinationNamespace { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Meta
Key/value pairs that are opaque to Consul and are associated with the intention.
Declaration
public Output<ImmutableDictionary<string, string>> Meta { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.String>> |
SourceName
The name of the source service for the intention. This service does not have to exist.
Declaration
public Output<string> SourceName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SourceNamespace
The source namespace of the intention.
Declaration
public Output<string> SourceNamespace { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, IntentionState, CustomResourceOptions)
Get an existing Intention resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Intention Get(string name, Input<string> id, IntentionState 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. |
| IntentionState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Intention |