LocalUser

class LocalUser : KotlinCustomResource

Manages a Storage Account Local User.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.storage.Account;
import com.pulumi.azure.storage.AccountArgs;
import com.pulumi.azure.storage.Container;
import com.pulumi.azure.storage.ContainerArgs;
import com.pulumi.azure.storage.LocalUser;
import com.pulumi.azure.storage.LocalUserArgs;
import com.pulumi.azure.storage.inputs.LocalUserSshAuthorizedKeyArgs;
import com.pulumi.azure.storage.inputs.LocalUserPermissionScopeArgs;
import com.pulumi.azure.storage.inputs.LocalUserPermissionScopePermissionsArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("WestEurope")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.accountKind("StorageV2")
.accountTier("Standard")
.accountReplicationType("LRS")
.isHnsEnabled(true)
.build());
var exampleContainer = new Container("exampleContainer", ContainerArgs.builder()
.storageAccountName(exampleAccount.name())
.build());
var exampleLocalUser = new LocalUser("exampleLocalUser", LocalUserArgs.builder()
.storageAccountId(exampleAccount.id())
.sshKeyEnabled(true)
.sshPasswordEnabled(true)
.homeDirectory("example_path")
.sshAuthorizedKeys(
LocalUserSshAuthorizedKeyArgs.builder()
.description("key1")
.key(local.first_public_key())
.build(),
LocalUserSshAuthorizedKeyArgs.builder()
.description("key2")
.key(local.second_public_key())
.build())
.permissionScopes(LocalUserPermissionScopeArgs.builder()
.permissions(LocalUserPermissionScopePermissionsArgs.builder()
.read(true)
.create(true)
.build())
.service("blob")
.resourceName(exampleContainer.name())
.build())
.build());
}
}

Import

Storage Account Local Users can be imported using the resource id, e.g.

$ pulumi import azure:storage/localUser:LocalUser example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Storage/storageAccounts/storageAccount1/localUsers/user1

Properties

Link copied to clipboard
val homeDirectory: Output<String>?

The home directory of the Storage Account Local User.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val name: Output<String>

The name which should be used for this Storage Account Local User. Changing this forces a new Storage Account Local User to be created.

Link copied to clipboard
val password: Output<String>

The value of the password, which is only available when ssh_password_enabled is set to true.

Link copied to clipboard

One or more permission_scope blocks as defined below.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val sid: Output<String>

The unique Security Identifier of this Storage Account Local User.

Link copied to clipboard

One or more ssh_authorized_key blocks as defined below.

Link copied to clipboard
val sshKeyEnabled: Output<Boolean>?

Specifies whether SSH Key Authentication is enabled. Defaults to false.

Link copied to clipboard

Specifies whether SSH Password Authentication is enabled. Defaults to false.

Link copied to clipboard

The ID of the Storage Account that this Storage Account Local User resides in. Changing this forces a new Storage Account Local User to be created.

Link copied to clipboard
val urn: Output<String>