equinix.networkedge.SshUser
Explore with Pulumi AI
Resource equinix.networkedge.SshUser
allows creation and management of Equinix Network
Edge SSH users.
Example Usage
using System.Collections.Generic;
using Pulumi;
using Equinix = Pulumi.Equinix;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var device1Id = config.Require("device1Id");
var device2Id = config.Require("device2Id");
var sshUser = new Equinix.NetworkEdge.SshUser("sshUser", new()
{
Username = "johnKent",
DeviceIds = new[]
{
device1Id,
device2Id,
},
});
return new Dictionary<string, object?>
{
["sshUserId"] = sshUser.Id,
};
});
package main
import (
"github.com/equinix/pulumi-equinix/sdk/go/equinix/networkedge"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
device1Id := cfg.Require("device1Id")
device2Id := cfg.Require("device2Id")
sshUser, err := networkedge.NewSshUser(ctx, "sshUser", &networkedge.SshUserArgs{
Username: pulumi.String("johnKent"),
DeviceIds: pulumi.StringArray{
pulumi.String(device1Id),
pulumi.String(device2Id),
},
})
if err != nil {
return err
}
ctx.Export("sshUserId", sshUser.ID())
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.equinix.pulumi.networkedge.SshUser;
import com.equinix.pulumi.networkedge.SshUserArgs;
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) {
final var config = ctx.config();
final var device1Id = config.get("device1Id").get();
final var device2Id = config.get("device2Id").get();
var sshUser = new SshUser("sshUser", SshUserArgs.builder()
.username("johnKent")
.deviceIds(
device1Id,
device2Id)
.build());
ctx.export("sshUserId", sshUser.id());
}
}
import pulumi
import pulumi_equinix as equinix
config = pulumi.Config()
device1_id = config.require("device1Id")
device2_id = config.require("device2Id")
ssh_user = equinix.networkedge.SshUser("sshUser",
username="johnKent",
device_ids=[
device1_id,
device2_id,
])
pulumi.export("sshUserId", ssh_user.id)
import * as pulumi from "@pulumi/pulumi";
import * as equinix from "@equinix-labs/pulumi-equinix";
const config = new pulumi.Config();
const device1Id = config.require("device1Id");
const device2Id = config.require("device2Id");
const sshUser = new equinix.networkedge.SshUser("sshUser", {
username: "johnKent",
deviceIds: [
device1Id,
device2Id,
],
});
export const sshUserId = sshUser.id;
config:
device1Id:
type: string
device2Id:
type: string
resources:
sshUser:
type: equinix:networkedge:SshUser
properties:
username: johnKent
deviceIds:
- ${device1Id}
- ${device2Id}
outputs:
sshUserId: ${sshUser.id}
Create SshUser Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SshUser(name: string, args: SshUserArgs, opts?: CustomResourceOptions);
@overload
def SshUser(resource_name: str,
args: SshUserArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SshUser(resource_name: str,
opts: Optional[ResourceOptions] = None,
device_ids: Optional[Sequence[str]] = None,
password: Optional[str] = None,
username: Optional[str] = None)
func NewSshUser(ctx *Context, name string, args SshUserArgs, opts ...ResourceOption) (*SshUser, error)
public SshUser(string name, SshUserArgs args, CustomResourceOptions? opts = null)
public SshUser(String name, SshUserArgs args)
public SshUser(String name, SshUserArgs args, CustomResourceOptions options)
type: equinix:networkedge:SshUser
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SshUserArgs
- 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 SshUserArgs
- 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 SshUserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SshUserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SshUserArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var sshUserResource = new Equinix.NetworkEdge.SshUser("sshUserResource", new()
{
DeviceIds = new[]
{
"string",
},
Password = "string",
Username = "string",
});
example, err := networkedge.NewSshUser(ctx, "sshUserResource", &networkedge.SshUserArgs{
DeviceIds: pulumi.StringArray{
pulumi.String("string"),
},
Password: pulumi.String("string"),
Username: pulumi.String("string"),
})
var sshUserResource = new SshUser("sshUserResource", SshUserArgs.builder()
.deviceIds("string")
.password("string")
.username("string")
.build());
ssh_user_resource = equinix.networkedge.SshUser("sshUserResource",
device_ids=["string"],
password="string",
username="string")
const sshUserResource = new equinix.networkedge.SshUser("sshUserResource", {
deviceIds: ["string"],
password: "string",
username: "string",
});
type: equinix:networkedge:SshUser
properties:
deviceIds:
- string
password: string
username: string
SshUser 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 SshUser resource accepts the following input properties:
- device_
ids Sequence[str] - list of device identifiers to which user will have access.
- password str
- SSH user password.
- username str
- SSH user login name.
Outputs
All input properties are implicitly available as output properties. Additionally, the SshUser resource produces the following output properties:
Look up Existing SshUser Resource
Get an existing SshUser 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?: SshUserState, opts?: CustomResourceOptions): SshUser
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
device_ids: Optional[Sequence[str]] = None,
password: Optional[str] = None,
username: Optional[str] = None,
uuid: Optional[str] = None) -> SshUser
func GetSshUser(ctx *Context, name string, id IDInput, state *SshUserState, opts ...ResourceOption) (*SshUser, error)
public static SshUser Get(string name, Input<string> id, SshUserState? state, CustomResourceOptions? opts = null)
public static SshUser get(String name, Output<String> id, SshUserState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- device_
ids Sequence[str] - list of device identifiers to which user will have access.
- password str
- SSH user password.
- username str
- SSH user login name.
- uuid str
- SSH user unique identifier.
Package Details
- Repository
- equinix equinix/pulumi-equinix
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
equinix
Terraform Provider.