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.
typescript
let vpc = new aws.ec2.Vpc("vpc", {}, { version: "2.10.0" });python
vpc = ec2.Vpc("vpc", opts=ResourceOptions(version="2.10.0"))go
vpc, _ := ec2.NewVpc(ctx, "vpc", &ec2.VpcArgs{}, pulumi.Version("2.10.0"))csharp
var vpc = new Aws.Ec2.Vpc("vpc", new Aws.Ec2.VpcArgs(),
new CustomResourceOptions { Version = "2.10.0" });java
var vpc = new com.pulumi.aws.ec2.Vpc("vpc",
com.pulumi.aws.ec2.VpcArgs.Empty,
CustomResourceOptions.builder()
.version("2.10.0")
.build());yaml
resources:
vpc:
type: aws:ec2:Vpc
options:
version: "2.10.0"hcl
resource "aws_vpc" "vpc" {
# ...
pulumi {
version = "2.10.0"
}
}This pins the version of the Pulumi provider plugin that operates on the resource. To pin the version of a Terraform provider itself, use the standard required_providers block instead.