pulumi_wasm_providers_gcp_mini::storage

Module hmac_key

source
Expand description

The hmacKeys resource represents an HMAC key within Cloud Storage. The resource consists of a secret and HMAC key metadata. HMAC keys can be used as credentials for service accounts.

To get more information about HmacKey, see:

§Example Usage

§Storage Hmac Key

use pulumi_wasm_rust::Output;
use pulumi_wasm_rust::{add_export, pulumi_main};
#[pulumi_main]
fn test_main() -> Result<(), Error> {
    let key = hmac_key::create(
        "key",
        HmacKeyArgs::builder()
            .service_account_email("${serviceAccount.email}")
            .build_struct(),
    );
    let serviceAccount = account::create(
        "serviceAccount",
        AccountArgs::builder().account_id("my-svc-acc").build_struct(),
    );
}

§Import

HmacKey can be imported using any of these accepted formats:

  • projects/{{project}}/hmacKeys/{{access_id}}

  • {{project}}/{{access_id}}

  • {{access_id}}

When using the pulumi import command, HmacKey can be imported using one of the formats above. For example:

$ pulumi import gcp:storage/hmacKey:HmacKey default projects/{{project}}/hmacKeys/{{access_id}}
$ pulumi import gcp:storage/hmacKey:HmacKey default {{project}}/{{access_id}}
$ pulumi import gcp:storage/hmacKey:HmacKey default {{access_id}}

Structs§

Functions§

  • Registers a new resource with the given unique name and arguments