Google Cloud (GCP) Classic

Pulumi Official
Package maintained by Pulumi
v6.34.0 published on Wednesday, Aug 17, 2022 by Pulumi

BackendBucketSignedUrlKey

A key for signing Cloud CDN signed URLs for BackendBuckets.

To get more information about BackendBucketSignedUrlKey, see:

Warning: All arguments including key_value will be stored in the raw state as plain-text.

Example Usage

Backend Bucket Signed Url Key

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;
using Random = Pulumi.Random;

return await Deployment.RunAsync(() => 
{
    var urlSignature = new Random.RandomId("urlSignature", new()
    {
        ByteLength = 16,
    });

    var bucket = new Gcp.Storage.Bucket("bucket", new()
    {
        Location = "EU",
    });

    var testBackend = new Gcp.Compute.BackendBucket("testBackend", new()
    {
        Description = "Contains beautiful images",
        BucketName = bucket.Name,
        EnableCdn = true,
    });

    var backendKey = new Gcp.Compute.BackendBucketSignedUrlKey("backendKey", new()
    {
        KeyValue = urlSignature.B64Url,
        BackendBucket = testBackend.Name,
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/compute"
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/storage"
	"github.com/pulumi/pulumi-random/sdk/v4/go/random"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		urlSignature, err := random.NewRandomId(ctx, "urlSignature", &random.RandomIdArgs{
			ByteLength: pulumi.Int(16),
		})
		if err != nil {
			return err
		}
		bucket, err := storage.NewBucket(ctx, "bucket", &storage.BucketArgs{
			Location: pulumi.String("EU"),
		})
		if err != nil {
			return err
		}
		testBackend, err := compute.NewBackendBucket(ctx, "testBackend", &compute.BackendBucketArgs{
			Description: pulumi.String("Contains beautiful images"),
			BucketName:  bucket.Name,
			EnableCdn:   pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = compute.NewBackendBucketSignedUrlKey(ctx, "backendKey", &compute.BackendBucketSignedUrlKeyArgs{
			KeyValue:      urlSignature.B64Url,
			BackendBucket: testBackend.Name,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.RandomId;
import com.pulumi.random.RandomIdArgs;
import com.pulumi.gcp.storage.Bucket;
import com.pulumi.gcp.storage.BucketArgs;
import com.pulumi.gcp.compute.BackendBucket;
import com.pulumi.gcp.compute.BackendBucketArgs;
import com.pulumi.gcp.compute.BackendBucketSignedUrlKey;
import com.pulumi.gcp.compute.BackendBucketSignedUrlKeyArgs;
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 urlSignature = new RandomId("urlSignature", RandomIdArgs.builder()        
            .byteLength(16)
            .build());

        var bucket = new Bucket("bucket", BucketArgs.builder()        
            .location("EU")
            .build());

        var testBackend = new BackendBucket("testBackend", BackendBucketArgs.builder()        
            .description("Contains beautiful images")
            .bucketName(bucket.name())
            .enableCdn(true)
            .build());

        var backendKey = new BackendBucketSignedUrlKey("backendKey", BackendBucketSignedUrlKeyArgs.builder()        
            .keyValue(urlSignature.b64Url())
            .backendBucket(testBackend.name())
            .build());

    }
}
import pulumi
import pulumi_gcp as gcp
import pulumi_random as random

url_signature = random.RandomId("urlSignature", byte_length=16)
bucket = gcp.storage.Bucket("bucket", location="EU")
test_backend = gcp.compute.BackendBucket("testBackend",
    description="Contains beautiful images",
    bucket_name=bucket.name,
    enable_cdn=True)
backend_key = gcp.compute.BackendBucketSignedUrlKey("backendKey",
    key_value=url_signature.b64_url,
    backend_bucket=test_backend.name)
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
import * as random from "@pulumi/random";

const urlSignature = new random.RandomId("urlSignature", {byteLength: 16});
const bucket = new gcp.storage.Bucket("bucket", {location: "EU"});
const testBackend = new gcp.compute.BackendBucket("testBackend", {
    description: "Contains beautiful images",
    bucketName: bucket.name,
    enableCdn: true,
});
const backendKey = new gcp.compute.BackendBucketSignedUrlKey("backendKey", {
    keyValue: urlSignature.b64Url,
    backendBucket: testBackend.name,
});
resources:
  urlSignature:
    type: random:RandomId
    properties:
      byteLength: 16
  backendKey:
    type: gcp:compute:BackendBucketSignedUrlKey
    properties:
      keyValue: ${urlSignature.b64Url}
      backendBucket: ${testBackend.name}
  testBackend:
    type: gcp:compute:BackendBucket
    properties:
      description: Contains beautiful images
      bucketName: ${bucket.name}
      enableCdn: true
  bucket:
    type: gcp:storage:Bucket
    properties:
      location: EU

Create a BackendBucketSignedUrlKey Resource

new BackendBucketSignedUrlKey(name: string, args: BackendBucketSignedUrlKeyArgs, opts?: CustomResourceOptions);
@overload
def BackendBucketSignedUrlKey(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              backend_bucket: Optional[str] = None,
                              key_value: Optional[str] = None,
                              name: Optional[str] = None,
                              project: Optional[str] = None)
@overload
def BackendBucketSignedUrlKey(resource_name: str,
                              args: BackendBucketSignedUrlKeyArgs,
                              opts: Optional[ResourceOptions] = None)
func NewBackendBucketSignedUrlKey(ctx *Context, name string, args BackendBucketSignedUrlKeyArgs, opts ...ResourceOption) (*BackendBucketSignedUrlKey, error)
public BackendBucketSignedUrlKey(string name, BackendBucketSignedUrlKeyArgs args, CustomResourceOptions? opts = null)
public BackendBucketSignedUrlKey(String name, BackendBucketSignedUrlKeyArgs args)
public BackendBucketSignedUrlKey(String name, BackendBucketSignedUrlKeyArgs args, CustomResourceOptions options)
type: gcp:compute:BackendBucketSignedUrlKey
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args BackendBucketSignedUrlKeyArgs
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 BackendBucketSignedUrlKeyArgs
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 BackendBucketSignedUrlKeyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args BackendBucketSignedUrlKeyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args BackendBucketSignedUrlKeyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

BackendBucketSignedUrlKey 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 BackendBucketSignedUrlKey resource accepts the following input properties:

BackendBucket string

The backend bucket this signed URL key belongs.

KeyValue string

128-bit key value used for signing the URL. The key value must be a valid RFC 4648 Section 5 base64url encoded string. Note: This property is sensitive and will not be displayed in the plan.

Name string

Name of the signed URL key.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

BackendBucket string

The backend bucket this signed URL key belongs.

KeyValue string

128-bit key value used for signing the URL. The key value must be a valid RFC 4648 Section 5 base64url encoded string. Note: This property is sensitive and will not be displayed in the plan.

Name string

Name of the signed URL key.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

backendBucket String

The backend bucket this signed URL key belongs.

keyValue String

128-bit key value used for signing the URL. The key value must be a valid RFC 4648 Section 5 base64url encoded string. Note: This property is sensitive and will not be displayed in the plan.

name String

Name of the signed URL key.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

backendBucket string

The backend bucket this signed URL key belongs.

keyValue string

128-bit key value used for signing the URL. The key value must be a valid RFC 4648 Section 5 base64url encoded string. Note: This property is sensitive and will not be displayed in the plan.

name string

Name of the signed URL key.

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

backend_bucket str

The backend bucket this signed URL key belongs.

key_value str

128-bit key value used for signing the URL. The key value must be a valid RFC 4648 Section 5 base64url encoded string. Note: This property is sensitive and will not be displayed in the plan.

name str

Name of the signed URL key.

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

backendBucket String

The backend bucket this signed URL key belongs.

keyValue String

128-bit key value used for signing the URL. The key value must be a valid RFC 4648 Section 5 base64url encoded string. Note: This property is sensitive and will not be displayed in the plan.

name String

Name of the signed URL key.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Outputs

All input properties are implicitly available as output properties. Additionally, the BackendBucketSignedUrlKey resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up an Existing BackendBucketSignedUrlKey Resource

Get an existing BackendBucketSignedUrlKey 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?: BackendBucketSignedUrlKeyState, opts?: CustomResourceOptions): BackendBucketSignedUrlKey
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        backend_bucket: Optional[str] = None,
        key_value: Optional[str] = None,
        name: Optional[str] = None,
        project: Optional[str] = None) -> BackendBucketSignedUrlKey
func GetBackendBucketSignedUrlKey(ctx *Context, name string, id IDInput, state *BackendBucketSignedUrlKeyState, opts ...ResourceOption) (*BackendBucketSignedUrlKey, error)
public static BackendBucketSignedUrlKey Get(string name, Input<string> id, BackendBucketSignedUrlKeyState? state, CustomResourceOptions? opts = null)
public static BackendBucketSignedUrlKey get(String name, Output<String> id, BackendBucketSignedUrlKeyState 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.
The following state arguments are supported:
BackendBucket string

The backend bucket this signed URL key belongs.

KeyValue string

128-bit key value used for signing the URL. The key value must be a valid RFC 4648 Section 5 base64url encoded string. Note: This property is sensitive and will not be displayed in the plan.

Name string

Name of the signed URL key.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

BackendBucket string

The backend bucket this signed URL key belongs.

KeyValue string

128-bit key value used for signing the URL. The key value must be a valid RFC 4648 Section 5 base64url encoded string. Note: This property is sensitive and will not be displayed in the plan.

Name string

Name of the signed URL key.

Project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

backendBucket String

The backend bucket this signed URL key belongs.

keyValue String

128-bit key value used for signing the URL. The key value must be a valid RFC 4648 Section 5 base64url encoded string. Note: This property is sensitive and will not be displayed in the plan.

name String

Name of the signed URL key.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

backendBucket string

The backend bucket this signed URL key belongs.

keyValue string

128-bit key value used for signing the URL. The key value must be a valid RFC 4648 Section 5 base64url encoded string. Note: This property is sensitive and will not be displayed in the plan.

name string

Name of the signed URL key.

project string

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

backend_bucket str

The backend bucket this signed URL key belongs.

key_value str

128-bit key value used for signing the URL. The key value must be a valid RFC 4648 Section 5 base64url encoded string. Note: This property is sensitive and will not be displayed in the plan.

name str

Name of the signed URL key.

project str

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

backendBucket String

The backend bucket this signed URL key belongs.

keyValue String

128-bit key value used for signing the URL. The key value must be a valid RFC 4648 Section 5 base64url encoded string. Note: This property is sensitive and will not be displayed in the plan.

name String

Name of the signed URL key.

project String

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Import

This resource does not support import.

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes

This Pulumi package is based on the google-beta Terraform Provider.