consul.getAgentConfig
Explore with Pulumi AI
Note: The
consul.getAgentConfig
resource differs fromconsul.getAgentSelf
, providing less information but utilizing stable APIs.consul.getAgentSelf
will be deprecated in a future release.
The consul.getAgentConfig
data source returns
configuration data
from the agent specified in the provider
.
Example Usage
using Pulumi;
using Consul = Pulumi.Consul;
class MyStack : Stack
{
public MyStack()
{
var remoteAgent = Output.Create(Consul.GetAgentConfig.InvokeAsync());
this.ConsulVersion = remoteAgent.Apply(remoteAgent => remoteAgent.Version);
}
[Output("consulVersion")]
public Output<string> ConsulVersion { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-consul/sdk/v3/go/consul"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
remoteAgent, err := consul.GetAgentConfig(ctx, nil, nil)
if err != nil {
return err
}
ctx.Export("consulVersion", remoteAgent.Version)
return nil
})
}
Coming soon!
import pulumi
import pulumi_consul as consul
remote_agent = consul.get_agent_config()
pulumi.export("consulVersion", remote_agent.version)
import * as pulumi from "@pulumi/pulumi";
import * as consul from "@pulumi/consul";
const remoteAgent = pulumi.output(consul.getAgentConfig());
export const consulVersion = remoteAgent.version;
Coming soon!
Using getAgentConfig
function getAgentConfig(opts?: InvokeOptions): Promise<GetAgentConfigResult>
def get_agent_config(opts: Optional[InvokeOptions] = None) -> GetAgentConfigResult
func GetAgentConfig(ctx *Context, opts ...InvokeOption) (*GetAgentConfigResult, error)
> Note: This function is named GetAgentConfig
in the Go SDK.
public static class GetAgentConfig
{
public static Task<GetAgentConfigResult> InvokeAsync(InvokeOptions? opts = null)
}
public static CompletableFuture<GetAgentConfigResult> getAgentConfig(InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: consul:index/getAgentConfig:getAgentConfig
arguments:
# arguments dictionary
getAgentConfig Result
The following output properties are available:
- Datacenter string
The datacenter the agent is running in
- Id string
The provider-assigned unique ID for this managed resource.
- Node
Id string The ID of the node the agent is running on
- Node
Name string The name of the node the agent is running on
- Revision string
The first 9 characters of the VCS revision of the build of Consul that is running
- Server bool
Boolean if the agent is a server or not
- Version string
The version of the build of Consul that is running
- Datacenter string
The datacenter the agent is running in
- Id string
The provider-assigned unique ID for this managed resource.
- Node
Id string The ID of the node the agent is running on
- Node
Name string The name of the node the agent is running on
- Revision string
The first 9 characters of the VCS revision of the build of Consul that is running
- Server bool
Boolean if the agent is a server or not
- Version string
The version of the build of Consul that is running
- datacenter String
The datacenter the agent is running in
- id String
The provider-assigned unique ID for this managed resource.
- node
Id String The ID of the node the agent is running on
- node
Name String The name of the node the agent is running on
- revision String
The first 9 characters of the VCS revision of the build of Consul that is running
- server Boolean
Boolean if the agent is a server or not
- version String
The version of the build of Consul that is running
- datacenter string
The datacenter the agent is running in
- id string
The provider-assigned unique ID for this managed resource.
- node
Id string The ID of the node the agent is running on
- node
Name string The name of the node the agent is running on
- revision string
The first 9 characters of the VCS revision of the build of Consul that is running
- server boolean
Boolean if the agent is a server or not
- version string
The version of the build of Consul that is running
- datacenter str
The datacenter the agent is running in
- id str
The provider-assigned unique ID for this managed resource.
- node_
id str The ID of the node the agent is running on
- node_
name str The name of the node the agent is running on
- revision str
The first 9 characters of the VCS revision of the build of Consul that is running
- server bool
Boolean if the agent is a server or not
- version str
The version of the build of Consul that is running
- datacenter String
The datacenter the agent is running in
- id String
The provider-assigned unique ID for this managed resource.
- node
Id String The ID of the node the agent is running on
- node
Name String The name of the node the agent is running on
- revision String
The first 9 characters of the VCS revision of the build of Consul that is running
- server Boolean
Boolean if the agent is a server or not
- version String
The version of the build of Consul that is running
Package Details
- Repository
- HashiCorp Consul pulumi/pulumi-consul
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
consul
Terraform Provider.