getEncryptionScope

Use this data source to access information about an existing Storage Encryption Scope.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.storage.getAccount({
name: "storageaccountname",
resourceGroupName: "resourcegroupname",
});
const exampleGetEncryptionScope = example.then(example => azure.storage.getEncryptionScope({
name: "existingStorageES",
storageAccountId: example.id,
}));
export const id = exampleGetEncryptionScope.then(exampleGetEncryptionScope => exampleGetEncryptionScope.id);
import pulumi
import pulumi_azure as azure
example = azure.storage.get_account(name="storageaccountname",
resource_group_name="resourcegroupname")
example_get_encryption_scope = azure.storage.get_encryption_scope(name="existingStorageES",
storage_account_id=example.id)
pulumi.export("id", example_get_encryption_scope.id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.Storage.GetAccount.Invoke(new()
{
Name = "storageaccountname",
ResourceGroupName = "resourcegroupname",
});
var exampleGetEncryptionScope = Azure.Storage.GetEncryptionScope.Invoke(new()
{
Name = "existingStorageES",
StorageAccountId = example.Apply(getAccountResult => getAccountResult.Id),
});
return new Dictionary<string, object?>
{
["id"] = exampleGetEncryptionScope.Apply(getEncryptionScopeResult => getEncryptionScopeResult.Id),
};
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := storage.LookupAccount(ctx, &storage.LookupAccountArgs{
Name: "storageaccountname",
ResourceGroupName: pulumi.StringRef("resourcegroupname"),
}, nil)
if err != nil {
return err
}
exampleGetEncryptionScope, err := storage.LookupEncryptionScope(ctx, &storage.LookupEncryptionScopeArgs{
Name: "existingStorageES",
StorageAccountId: example.Id,
}, nil)
if err != nil {
return err
}
ctx.Export("id", exampleGetEncryptionScope.Id)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.storage.StorageFunctions;
import com.pulumi.azure.storage.inputs.GetAccountArgs;
import com.pulumi.azure.storage.inputs.GetEncryptionScopeArgs;
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 example = StorageFunctions.getAccount(GetAccountArgs.builder()
.name("storageaccountname")
.resourceGroupName("resourcegroupname")
.build());
final var exampleGetEncryptionScope = StorageFunctions.getEncryptionScope(GetEncryptionScopeArgs.builder()
.name("existingStorageES")
.storageAccountId(example.applyValue(getAccountResult -> getAccountResult.id()))
.build());
ctx.export("id", exampleGetEncryptionScope.applyValue(getEncryptionScopeResult -> getEncryptionScopeResult.id()));
}
}
variables:
example:
fn::invoke:
function: azure:storage:getAccount
arguments:
name: storageaccountname
resourceGroupName: resourcegroupname
exampleGetEncryptionScope:
fn::invoke:
function: azure:storage:getEncryptionScope
arguments:
name: existingStorageES
storageAccountId: ${example.id}
outputs:
id: ${exampleGetEncryptionScope.id}

Return

A collection of values returned by getEncryptionScope.

Parameters

argument

A collection of arguments for invoking getEncryptionScope.


suspend fun getEncryptionScope(name: String, storageAccountId: String): GetEncryptionScopeResult

Return

A collection of values returned by getEncryptionScope.

Parameters

name

The name of this Storage Encryption Scope.

storageAccountId

The ID of the Storage Account where this Storage Encryption Scope exists.

See also


Return

A collection of values returned by getEncryptionScope.

Parameters

argument

Builder for com.pulumi.azure.storage.kotlin.inputs.GetEncryptionScopePlainArgs.

See also