Skip to content

Commit

Permalink
Update aws.lambda.Runtime to latest AWS support (#3261)
Browse files Browse the repository at this point in the history
Catches our enum up to date with the latest from
https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html.

Also updates the deprecated runtimes to latest, including some which
have been very recently deprecated (but in a few cases, are not yet
erroring on create/update - though those are coming in the next few
weeks).

Also fixes CallbackFunction in TS to ensure it can accept a normal
`string` as well, to ensure that users are not prevented from passing
not-yet-supported enum values in the future. This aligns with the
underlying `Function` type which accepts both.

Fixes #3260.
Fixes #2994.
  • Loading branch information
lukehoban committed Jan 17, 2024
1 parent 976def3 commit b3675bd
Show file tree
Hide file tree
Showing 8 changed files with 185 additions and 40 deletions.
49 changes: 39 additions & 10 deletions provider/cmd/pulumi-resource-aws/schema.json
Expand Up @@ -77728,23 +77728,31 @@
},
{
"name": "DotnetCore3d1",
"value": "dotnetcore3.1"
"value": "dotnetcore3.1",
"deprecationMessage": "This runtime is now deprecated"
},
{
"name": "Dotnet5d0",
"value": "dotnet5.0"
"value": "dotnet5.0",
"deprecationMessage": "This runtime is now deprecated"
},
{
"name": "Dotnet6",
"value": "dotnet6"
},
{
"name": "Dotnet7",
"value": "dotnet7"
},
{
"name": "Go1dx",
"value": "go1.x"
"value": "go1.x",
"deprecationMessage": "This runtime is now deprecated"
},
{
"name": "Java8",
"value": "java8"
"value": "java8",
"deprecationMessage": "This runtime is now deprecated"
},
{
"name": "Java8AL2",
Expand All @@ -77758,14 +77766,19 @@
"name": "Java17",
"value": "java17"
},
{
"name": "Java21",
"value": "java21"
},
{
"name": "Ruby2d5",
"value": "ruby2.5",
"deprecationMessage": "This runtime is now deprecated"
},
{
"name": "Ruby2d7",
"value": "ruby2.7"
"value": "ruby2.7",
"deprecationMessage": "This runtime is now deprecated"
},
{
"name": "Ruby3d2",
Expand All @@ -77778,11 +77791,13 @@
},
{
"name": "NodeJS12dX",
"value": "nodejs12.x"
"value": "nodejs12.x",
"deprecationMessage": "This runtime is now deprecated"
},
{
"name": "NodeJS14dX",
"value": "nodejs14.x"
"value": "nodejs14.x",
"deprecationMessage": "This runtime is now deprecated"
},
{
"name": "NodeJS16dX",
Expand All @@ -77792,6 +77807,10 @@
"name": "NodeJS18dX",
"value": "nodejs18.x"
},
{
"name": "NodeJS20dX",
"value": "nodejs20.x"
},
{
"name": "Python2d7",
"value": "python2.7",
Expand All @@ -77804,7 +77823,8 @@
},
{
"name": "Python3d7",
"value": "python3.7"
"value": "python3.7",
"deprecationMessage": "This runtime is now deprecated"
},
{
"name": "Python3d8",
Expand All @@ -77822,13 +77842,22 @@
"name": "Python3d11",
"value": "python3.11"
},
{
"name": "Python3d12",
"value": "python3.12"
},
{
"name": "Custom",
"value": "provided"
"value": "provided",
"deprecationMessage": "This runtime is now deprecated"
},
{
"name": "CustomAL2",
"value": "provided.al2"
},
{
"name": "CustomAL2023",
"value": "provided.al2023"
}
]
},
Expand Down Expand Up @@ -345698,7 +345727,7 @@
}
},
"aws:iot/getEndpoint:getEndpoint": {
"description": "Returns a unique endpoint specific to the AWS account making the call.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as kubernetes from \"@pulumi/kubernetes\";\n\nconst example = aws.iot.getEndpoint({});\nconst agent = new kubernetes.index.Kubernetes_pod(\"agent\", {\n metadata: [{\n name: \"my-device\",\n }],\n spec: [{\n container: [{\n image: \"gcr.io/my-project/image-name\",\n name: \"image-name\",\n env: [{\n name: \"IOT_ENDPOINT\",\n value: example.endpointAddress,\n }],\n }],\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_kubernetes as kubernetes\n\nexample = aws.iot.get_endpoint()\nagent = kubernetes.index.Kubernetes_pod(\"agent\",\n metadata=[{\n name: my-device,\n }],\n spec=[{\n container: [{\n image: gcr.io/my-project/image-name,\n name: image-name,\n env: [{\n name: IOT_ENDPOINT,\n value: example.endpoint_address,\n }],\n }],\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Kubernetes = Pulumi.Kubernetes;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Iot.GetEndpoint.Invoke();\n\n var agent = new Kubernetes.Index.Kubernetes_pod(\"agent\", new()\n {\n Metadata = new[]\n {\n \n {\n { \"name\", \"my-device\" },\n },\n },\n Spec = new[]\n {\n \n {\n { \"container\", new[]\n {\n \n {\n { \"image\", \"gcr.io/my-project/image-name\" },\n { \"name\", \"image-name\" },\n { \"env\", new[]\n {\n \n {\n { \"name\", \"IOT_ENDPOINT\" },\n { \"value\", example.Apply(getEndpointResult =\u003e getEndpointResult.EndpointAddress) },\n },\n } },\n },\n } },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iot\"\n\t\"github.com/pulumi/pulumi-kubernetes/sdk/v1/go/kubernetes\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\texample, err := iot.GetEndpoint(ctx, nil, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = index.NewKubernetes_pod(ctx, \"agent\", \u0026index.Kubernetes_podArgs{\n\t\t\tMetadata: []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"name\": \"my-device\",\n\t\t\t\t},\n\t\t\t},\n\t\t\tSpec: []map[string]interface{}{\n\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\"container\": []map[string]interface{}{\n\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\"image\": \"gcr.io/my-project/image-name\",\n\t\t\t\t\t\t\t\"name\": \"image-name\",\n\t\t\t\t\t\t\t\"env\": []map[string]interface{}{\n\t\t\t\t\t\t\t\tmap[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"name\": \"IOT_ENDPOINT\",\n\t\t\t\t\t\t\t\t\t\"value\": example.EndpointAddress,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iot.IotFunctions;\nimport com.pulumi.aws.iot.inputs.GetEndpointArgs;\nimport com.pulumi.kubernetes.kubernetes_pod;\nimport com.pulumi.kubernetes.Kubernetes_podArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = IotFunctions.getEndpoint();\n\n var agent = new Kubernetes_pod(\"agent\", Kubernetes_podArgs.builder() \n .metadata(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))\n .spec(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n agent:\n type: kubernetes:kubernetes_pod\n properties:\n metadata:\n - name: my-device\n spec:\n - container:\n - image: gcr.io/my-project/image-name\n name: image-name\n env:\n - name: IOT_ENDPOINT\n value: ${example.endpointAddress}\nvariables:\n example:\n fn::invoke:\n Function: aws:iot:getEndpoint\n Arguments: {}\n```\n{{% /example %}}\n{{% /examples %}}",
"description": "Returns a unique endpoint specific to the AWS account making the call.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as kubernetes from \"@pulumi/kubernetes\";\n\nconst example = aws.iot.getEndpoint({});\nconst agent = new kubernetes.index.Kubernetes_pod(\"agent\", {\n metadata: [{\n name: \"my-device\",\n }],\n spec: [{\n container: [{\n image: \"gcr.io/my-project/image-name\",\n name: \"image-name\",\n env: [{\n name: \"IOT_ENDPOINT\",\n value: example.endpointAddress,\n }],\n }],\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_kubernetes as kubernetes\n\nexample = aws.iot.get_endpoint()\nagent = kubernetes.index.Kubernetes_pod(\"agent\",\n metadata=[{\n name: my-device,\n }],\n spec=[{\n container: [{\n image: gcr.io/my-project/image-name,\n name: image-name,\n env: [{\n name: IOT_ENDPOINT,\n value: example.endpoint_address,\n }],\n }],\n }])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Kubernetes = Pulumi.Kubernetes;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var example = Aws.Iot.GetEndpoint.Invoke();\n\n var agent = new Kubernetes.Index.Kubernetes_pod(\"agent\", new()\n {\n Metadata = new[]\n {\n \n {\n { \"name\", \"my-device\" },\n },\n },\n Spec = new[]\n {\n \n {\n { \"container\", new[]\n {\n \n {\n { \"image\", \"gcr.io/my-project/image-name\" },\n { \"name\", \"image-name\" },\n { \"env\", new[]\n {\n \n {\n { \"name\", \"IOT_ENDPOINT\" },\n { \"value\", example.Apply(getEndpointResult =\u003e getEndpointResult.EndpointAddress) },\n },\n } },\n },\n } },\n },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.iot.IotFunctions;\nimport com.pulumi.aws.iot.inputs.GetEndpointArgs;\nimport com.pulumi.kubernetes.kubernetes_pod;\nimport com.pulumi.kubernetes.Kubernetes_podArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n final var example = IotFunctions.getEndpoint();\n\n var agent = new Kubernetes_pod(\"agent\", Kubernetes_podArgs.builder() \n .metadata(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))\n .spec(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n agent:\n type: kubernetes:kubernetes_pod\n properties:\n metadata:\n - name: my-device\n spec:\n - container:\n - image: gcr.io/my-project/image-name\n name: image-name\n env:\n - name: IOT_ENDPOINT\n value: ${example.endpointAddress}\nvariables:\n example:\n fn::invoke:\n Function: aws:iot:getEndpoint\n Arguments: {}\n```\n{{% /example %}}\n{{% /examples %}}",
"inputs": {
"description": "A collection of arguments for invoking getEndpoint.\n",
"properties": {
Expand Down
23 changes: 14 additions & 9 deletions provider/resources.go
Expand Up @@ -4771,31 +4771,36 @@ $ pulumi import aws:networkfirewall/resourcePolicy:ResourcePolicy example arn:aw
},
Enum: []schema.EnumValueSpec{
{Value: "dotnetcore2.1", Name: "DotnetCore2d1", DeprecationMessage: "This runtime is now deprecated"},
{Value: "dotnetcore3.1", Name: "DotnetCore3d1"},
{Value: "dotnet5.0", Name: "Dotnet5d0"},
{Value: "dotnetcore3.1", Name: "DotnetCore3d1", DeprecationMessage: "This runtime is now deprecated"},
{Value: "dotnet5.0", Name: "Dotnet5d0", DeprecationMessage: "This runtime is now deprecated"},
{Value: "dotnet6", Name: "Dotnet6"},
{Value: "go1.x", Name: "Go1dx"},
{Value: "java8", Name: "Java8"},
{Value: "dotnet7", Name: "Dotnet7"},
{Value: "go1.x", Name: "Go1dx", DeprecationMessage: "This runtime is now deprecated"},
{Value: "java8", Name: "Java8", DeprecationMessage: "This runtime is now deprecated"},
{Value: "java8.al2", Name: "Java8AL2"},
{Value: "java11", Name: "Java11"},
{Value: "java17", Name: "Java17"},
{Value: "java21", Name: "Java21"},
{Value: "ruby2.5", Name: "Ruby2d5", DeprecationMessage: "This runtime is now deprecated"},
{Value: "ruby2.7", Name: "Ruby2d7"},
{Value: "ruby2.7", Name: "Ruby2d7", DeprecationMessage: "This runtime is now deprecated"},
{Value: "ruby3.2", Name: "Ruby3d2"},
{Value: "nodejs10.x", Name: "NodeJS10dX", DeprecationMessage: "This runtime is now deprecated"},
{Value: "nodejs12.x", Name: "NodeJS12dX"},
{Value: "nodejs14.x", Name: "NodeJS14dX"},
{Value: "nodejs12.x", Name: "NodeJS12dX", DeprecationMessage: "This runtime is now deprecated"},
{Value: "nodejs14.x", Name: "NodeJS14dX", DeprecationMessage: "This runtime is now deprecated"},
{Value: "nodejs16.x", Name: "NodeJS16dX"},
{Value: "nodejs18.x", Name: "NodeJS18dX"},
{Value: "nodejs20.x", Name: "NodeJS20dX"},
{Value: "python2.7", Name: "Python2d7", DeprecationMessage: "This runtime is now deprecated"},
{Value: "python3.6", Name: "Python3d6", DeprecationMessage: "This runtime is now deprecated"},
{Value: "python3.7", Name: "Python3d7"},
{Value: "python3.7", Name: "Python3d7", DeprecationMessage: "This runtime is now deprecated"},
{Value: "python3.8", Name: "Python3d8"},
{Value: "python3.9", Name: "Python3d9"},
{Value: "python3.10", Name: "Python3d10"},
{Value: "python3.11", Name: "Python3d11"},
{Value: "provided", Name: "Custom"},
{Value: "python3.12", Name: "Python3d12"},
{Value: "provided", Name: "Custom", DeprecationMessage: "This runtime is now deprecated"},
{Value: "provided.al2", Name: "CustomAL2"},
{Value: "provided.al2023", Name: "CustomAL2023"},
},
},
"aws:rds/EngineMode:EngineMode": {
Expand Down
14 changes: 14 additions & 0 deletions sdk/dotnet/Lambda/Enums.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b3675bd

Please sign in to comment.