Expand description
Manages a Storage Account Local User.
§Example Usage
ⓘ
use pulumi_wasm_rust::Output;
use pulumi_wasm_rust::{add_export, pulumi_main};
#[pulumi_main]
fn test_main() -> Result<(), Error> {
let example = resource_group::create(
"example",
ResourceGroupArgs::builder()
.location("WestEurope")
.name("example-rg")
.build_struct(),
);
let exampleAccount = account::create(
"exampleAccount",
AccountArgs::builder()
.account_kind("StorageV2")
.account_replication_type("LRS")
.account_tier("Standard")
.is_hns_enabled(true)
.location("${example.location}")
.name("example-account")
.resource_group_name("${example.name}")
.build_struct(),
);
let exampleContainer = container::create(
"exampleContainer",
ContainerArgs::builder()
.name("example-container")
.storage_account_name("${exampleAccount.name}")
.build_struct(),
);
let exampleLocalUser = local_user::create(
"exampleLocalUser",
LocalUserArgs::builder()
.home_directory("example_path")
.name("user1")
.permission_scopes(
vec![
LocalUserPermissionScope::builder()
.permissions(LocalUserPermissionScopePermissions::builder()
.create(true).read(true).build_struct())
.resourceName("${exampleContainer.name}").service("blob")
.build_struct(),
],
)
.ssh_authorized_keys(
vec![
LocalUserSshAuthorizedKey::builder().description("key1")
.key("${firstPublicKey}").build_struct(),
LocalUserSshAuthorizedKey::builder().description("key2")
.key("${secondPublicKey}").build_struct(),
],
)
.ssh_key_enabled(true)
.ssh_password_enabled(true)
.storage_account_id("${exampleAccount.id}")
.build_struct(),
);
}
§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
Structs§
- Use builder syntax to set the inputs and finish with
build_struct()
.
Functions§
- Registers a new resource with the given unique name and arguments