Skip to main content
  1. Docs
  2. Infrastructure as Code
  3. Concepts
  4. Resources
  5. Resource options
  6. version

Resource option: version

    The version resource option specifies a provider version to use when operating on a resource. This version overrides the version information inferred from the current package. This option was built to be used directly by the Pulumi SDK. version should not be used directly during normal operations.

    Applies to custom resources only. The version resource option has no direct effect on component resources. It is defined on the base resource-options type in every Pulumi SDK, so no SDK rejects it at compile time — passing it to a component resource has no direct effect at runtime.
    let vpc = new aws.ec2.Vpc("vpc", {}, { version: "2.10.0" });
    
    vpc = ec2.Vpc("vpc", opts=ResourceOptions(version="2.10.0"))
    
    vpc, _ := ec2.NewVpc(ctx, "vpc", &ec2.VpcArgs{}, pulumi.Version("2.10.0"))
    
    var vpc = new Aws.Ec2.Vpc("vpc", new Aws.Ec2.VpcArgs(),
        new CustomResourceOptions { Version = "2.10.0" });
    
    var vpc = new com.pulumi.aws.ec2.Vpc("vpc",
        com.pulumi.aws.ec2.VpcArgs.Empty,
        CustomResourceOptions.builder()
            .version("2.10.0" )
            .build();
    
    resources:
      vpc:
        type: aws:ec2:Vpc
        options:
          version: "2.10.0"