1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. PreviewFeature
Google Cloud v8.40.0 published on Monday, Aug 11, 2025 by Pulumi

gcp.compute.PreviewFeature

Explore with Pulumi AI

gcp logo
Google Cloud v8.40.0 published on Monday, Aug 11, 2025 by Pulumi

    Example Usage

    Preview Feature Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const gcePreviewFeature = new gcp.compute.PreviewFeature("gce_preview_feature", {
        name: "alpha-api-access",
        activationStatus: "DISABLED",
        rolloutOperation: {
            rolloutInput: {
                predefinedRolloutPlan: "ROLLOUT_PLAN_FAST_ROLLOUT",
            },
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    gce_preview_feature = gcp.compute.PreviewFeature("gce_preview_feature",
        name="alpha-api-access",
        activation_status="DISABLED",
        rollout_operation={
            "rollout_input": {
                "predefined_rollout_plan": "ROLLOUT_PLAN_FAST_ROLLOUT",
            },
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.NewPreviewFeature(ctx, "gce_preview_feature", &compute.PreviewFeatureArgs{
    			Name:             pulumi.String("alpha-api-access"),
    			ActivationStatus: pulumi.String("DISABLED"),
    			RolloutOperation: &compute.PreviewFeatureRolloutOperationArgs{
    				RolloutInput: &compute.PreviewFeatureRolloutOperationRolloutInputArgs{
    					PredefinedRolloutPlan: pulumi.String("ROLLOUT_PLAN_FAST_ROLLOUT"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var gcePreviewFeature = new Gcp.Compute.PreviewFeature("gce_preview_feature", new()
        {
            Name = "alpha-api-access",
            ActivationStatus = "DISABLED",
            RolloutOperation = new Gcp.Compute.Inputs.PreviewFeatureRolloutOperationArgs
            {
                RolloutInput = new Gcp.Compute.Inputs.PreviewFeatureRolloutOperationRolloutInputArgs
                {
                    PredefinedRolloutPlan = "ROLLOUT_PLAN_FAST_ROLLOUT",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.PreviewFeature;
    import com.pulumi.gcp.compute.PreviewFeatureArgs;
    import com.pulumi.gcp.compute.inputs.PreviewFeatureRolloutOperationArgs;
    import com.pulumi.gcp.compute.inputs.PreviewFeatureRolloutOperationRolloutInputArgs;
    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 gcePreviewFeature = new PreviewFeature("gcePreviewFeature", PreviewFeatureArgs.builder()
                .name("alpha-api-access")
                .activationStatus("DISABLED")
                .rolloutOperation(PreviewFeatureRolloutOperationArgs.builder()
                    .rolloutInput(PreviewFeatureRolloutOperationRolloutInputArgs.builder()
                        .predefinedRolloutPlan("ROLLOUT_PLAN_FAST_ROLLOUT")
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      gcePreviewFeature:
        type: gcp:compute:PreviewFeature
        name: gce_preview_feature
        properties:
          name: alpha-api-access
          activationStatus: DISABLED
          rolloutOperation:
            rolloutInput:
              predefinedRolloutPlan: ROLLOUT_PLAN_FAST_ROLLOUT
    

    Create PreviewFeature Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

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

    Parameters

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

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var previewFeatureResource = new Gcp.Compute.PreviewFeature("previewFeatureResource", new()
    {
        ActivationStatus = "string",
        Name = "string",
        Project = "string",
        RolloutOperation = new Gcp.Compute.Inputs.PreviewFeatureRolloutOperationArgs
        {
            RolloutInput = new Gcp.Compute.Inputs.PreviewFeatureRolloutOperationRolloutInputArgs
            {
                PredefinedRolloutPlan = "string",
            },
        },
    });
    
    example, err := compute.NewPreviewFeature(ctx, "previewFeatureResource", &compute.PreviewFeatureArgs{
    	ActivationStatus: pulumi.String("string"),
    	Name:             pulumi.String("string"),
    	Project:          pulumi.String("string"),
    	RolloutOperation: &compute.PreviewFeatureRolloutOperationArgs{
    		RolloutInput: &compute.PreviewFeatureRolloutOperationRolloutInputArgs{
    			PredefinedRolloutPlan: pulumi.String("string"),
    		},
    	},
    })
    
    var previewFeatureResource = new PreviewFeature("previewFeatureResource", PreviewFeatureArgs.builder()
        .activationStatus("string")
        .name("string")
        .project("string")
        .rolloutOperation(PreviewFeatureRolloutOperationArgs.builder()
            .rolloutInput(PreviewFeatureRolloutOperationRolloutInputArgs.builder()
                .predefinedRolloutPlan("string")
                .build())
            .build())
        .build());
    
    preview_feature_resource = gcp.compute.PreviewFeature("previewFeatureResource",
        activation_status="string",
        name="string",
        project="string",
        rollout_operation={
            "rollout_input": {
                "predefined_rollout_plan": "string",
            },
        })
    
    const previewFeatureResource = new gcp.compute.PreviewFeature("previewFeatureResource", {
        activationStatus: "string",
        name: "string",
        project: "string",
        rolloutOperation: {
            rolloutInput: {
                predefinedRolloutPlan: "string",
            },
        },
    });
    
    type: gcp:compute:PreviewFeature
    properties:
        activationStatus: string
        name: string
        project: string
        rolloutOperation:
            rolloutInput:
                predefinedRolloutPlan: string
    

    PreviewFeature Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The PreviewFeature resource accepts the following input properties:

    ActivationStatus string
    The activation status of the preview feature. Possible values are: ENABLED, DISABLED.
    Name string
    The name of the preview feature.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    RolloutOperation PreviewFeatureRolloutOperation
    The rollout operation of the feature. Structure is documented below.
    ActivationStatus string
    The activation status of the preview feature. Possible values are: ENABLED, DISABLED.
    Name string
    The name of the preview feature.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    RolloutOperation PreviewFeatureRolloutOperationArgs
    The rollout operation of the feature. Structure is documented below.
    activationStatus String
    The activation status of the preview feature. Possible values are: ENABLED, DISABLED.
    name String
    The name of the preview feature.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    rolloutOperation PreviewFeatureRolloutOperation
    The rollout operation of the feature. Structure is documented below.
    activationStatus string
    The activation status of the preview feature. Possible values are: ENABLED, DISABLED.
    name string
    The name of the preview feature.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    rolloutOperation PreviewFeatureRolloutOperation
    The rollout operation of the feature. Structure is documented below.
    activation_status str
    The activation status of the preview feature. Possible values are: ENABLED, DISABLED.
    name str
    The name of the preview feature.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    rollout_operation PreviewFeatureRolloutOperationArgs
    The rollout operation of the feature. Structure is documented below.
    activationStatus String
    The activation status of the preview feature. Possible values are: ENABLED, DISABLED.
    name String
    The name of the preview feature.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    rolloutOperation Property Map
    The rollout operation of the feature. Structure is documented below.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PreviewFeature 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 Existing PreviewFeature Resource

    Get an existing PreviewFeature 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?: PreviewFeatureState, opts?: CustomResourceOptions): PreviewFeature
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            activation_status: Optional[str] = None,
            name: Optional[str] = None,
            project: Optional[str] = None,
            rollout_operation: Optional[PreviewFeatureRolloutOperationArgs] = None) -> PreviewFeature
    func GetPreviewFeature(ctx *Context, name string, id IDInput, state *PreviewFeatureState, opts ...ResourceOption) (*PreviewFeature, error)
    public static PreviewFeature Get(string name, Input<string> id, PreviewFeatureState? state, CustomResourceOptions? opts = null)
    public static PreviewFeature get(String name, Output<String> id, PreviewFeatureState state, CustomResourceOptions options)
    resources:  _:    type: gcp:compute:PreviewFeature    get:      id: ${id}
    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:
    ActivationStatus string
    The activation status of the preview feature. Possible values are: ENABLED, DISABLED.
    Name string
    The name of the preview feature.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    RolloutOperation PreviewFeatureRolloutOperation
    The rollout operation of the feature. Structure is documented below.
    ActivationStatus string
    The activation status of the preview feature. Possible values are: ENABLED, DISABLED.
    Name string
    The name of the preview feature.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    RolloutOperation PreviewFeatureRolloutOperationArgs
    The rollout operation of the feature. Structure is documented below.
    activationStatus String
    The activation status of the preview feature. Possible values are: ENABLED, DISABLED.
    name String
    The name of the preview feature.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    rolloutOperation PreviewFeatureRolloutOperation
    The rollout operation of the feature. Structure is documented below.
    activationStatus string
    The activation status of the preview feature. Possible values are: ENABLED, DISABLED.
    name string
    The name of the preview feature.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    rolloutOperation PreviewFeatureRolloutOperation
    The rollout operation of the feature. Structure is documented below.
    activation_status str
    The activation status of the preview feature. Possible values are: ENABLED, DISABLED.
    name str
    The name of the preview feature.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    rollout_operation PreviewFeatureRolloutOperationArgs
    The rollout operation of the feature. Structure is documented below.
    activationStatus String
    The activation status of the preview feature. Possible values are: ENABLED, DISABLED.
    name String
    The name of the preview feature.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    rolloutOperation Property Map
    The rollout operation of the feature. Structure is documented below.

    Supporting Types

    PreviewFeatureRolloutOperation, PreviewFeatureRolloutOperationArgs

    RolloutInput PreviewFeatureRolloutOperationRolloutInput
    The input for the rollout operation. Structure is documented below.
    RolloutInput PreviewFeatureRolloutOperationRolloutInput
    The input for the rollout operation. Structure is documented below.
    rolloutInput PreviewFeatureRolloutOperationRolloutInput
    The input for the rollout operation. Structure is documented below.
    rolloutInput PreviewFeatureRolloutOperationRolloutInput
    The input for the rollout operation. Structure is documented below.
    rollout_input PreviewFeatureRolloutOperationRolloutInput
    The input for the rollout operation. Structure is documented below.
    rolloutInput Property Map
    The input for the rollout operation. Structure is documented below.

    PreviewFeatureRolloutOperationRolloutInput, PreviewFeatureRolloutOperationRolloutInputArgs

    PredefinedRolloutPlan string
    Predefined rollout plans. Possible values are: ROLLOUT_PLAN_FAST_ROLLOUT.
    PredefinedRolloutPlan string
    Predefined rollout plans. Possible values are: ROLLOUT_PLAN_FAST_ROLLOUT.
    predefinedRolloutPlan String
    Predefined rollout plans. Possible values are: ROLLOUT_PLAN_FAST_ROLLOUT.
    predefinedRolloutPlan string
    Predefined rollout plans. Possible values are: ROLLOUT_PLAN_FAST_ROLLOUT.
    predefined_rollout_plan str
    Predefined rollout plans. Possible values are: ROLLOUT_PLAN_FAST_ROLLOUT.
    predefinedRolloutPlan String
    Predefined rollout plans. Possible values are: ROLLOUT_PLAN_FAST_ROLLOUT.

    Import

    PreviewFeature can be imported using any of these accepted formats:

    • projects/{{project}}/global/previewFeatures/{{name}}

    • {{project}}/{{name}}

    • {{name}}

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

    $ pulumi import gcp:compute/previewFeature:PreviewFeature default projects/{{project}}/global/previewFeatures/{{name}}
    
    $ pulumi import gcp:compute/previewFeature:PreviewFeature default {{project}}/{{name}}
    
    $ pulumi import gcp:compute/previewFeature:PreviewFeature default {{name}}
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud v8.40.0 published on Monday, Aug 11, 2025 by Pulumi