Skip to content

Commit

Permalink
Enable Plugin Framework based resources and functions for pulumi-gcp (#…
Browse files Browse the repository at this point in the history
…1075)

New function:

firebase/getAndroidAppConfig.getAndroidAppConfig

This change starts using Plugin Framework bridge to serve functions that are implemented against the Plugin Framework APIs upstream. Besides the new function above, in total 8 data sources are now served in this way:

```
                NewGoogleClientConfigDataSource,
		NewGoogleClientOpenIDUserinfoDataSource,
		NewGoogleDnsManagedZoneDataSource,
		NewGoogleDnsRecordSetDataSource,
		NewGoogleDnsKeysDataSource,
		NewGoogleFirebaseAndroidAppConfigDataSource,
		NewGoogleFirebaseAppleAppConfigDataSource,
		NewGoogleFirebaseWebAppConfigDataSource
```

---------

Co-authored-by: Anton Tayanovskyy <[email protected]>
  • Loading branch information
iwahbe and t0yv0 authored May 30, 2023
1 parent d963554 commit 6e90538
Show file tree
Hide file tree
Showing 60 changed files with 18,021 additions and 266 deletions.
17,227 changes: 17,227 additions & 0 deletions provider/cmd/pulumi-resource-gcp/bridge-metadata.json

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions provider/cmd/pulumi-resource-gcp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@
package main

import (
"context"
_ "embed"

gcp "github.com/pulumi/pulumi-gcp/provider/v6"
"github.com/pulumi/pulumi-gcp/provider/v6/pkg/version"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge"
"github.com/pulumi/pulumi-terraform-bridge/pf/tfbridge"
)

//go:embed schema-embed.json
var pulumiSchema []byte

func main() {
tfbridge.Main("gcp", version.Version, gcp.Provider(), pulumiSchema)
tfbridge.MainWithMuxer(context.Background(), "gcp",
gcp.Provider(), pulumiSchema)
}
109 changes: 82 additions & 27 deletions provider/cmd/pulumi-resource-gcp/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -55294,7 +55294,16 @@
"description": "Specifies the algorithm used to calculate this digest. Possible values are `sha1`, `sha256` and `sha384`\n"
}
},
"type": "object"
"type": "object",
"required": [
"digest",
"type"
],
"language": {
"nodejs": {
"requiredInputs": []
}
}
},
"gcp:dns/getKeysZoneSigningKey:getKeysZoneSigningKey": {
"properties": {
Expand Down Expand Up @@ -55367,7 +55376,16 @@
"description": "Specifies the algorithm used to calculate this digest. Possible values are `sha1`, `sha256` and `sha384`\n"
}
},
"type": "object"
"type": "object",
"required": [
"digest",
"type"
],
"language": {
"nodejs": {
"requiredInputs": []
}
}
},
"gcp:endpoints/ConsumersIamBindingCondition:ConsumersIamBindingCondition": {
"properties": {
Expand Down Expand Up @@ -181000,8 +181018,7 @@
},
"project": {
"type": "string",
"description": "The ID of the project in which the resource belongs. If `project` is not provided, the provider project is used.\n",
"willReplaceOnChanges": true
"description": "The ID of the project in which the resource belongs. If `project` is not provided, the provider project is used.\n"
}
},
"type": "object",
Expand All @@ -181014,7 +181031,7 @@
"properties": {
"id": {
"type": "string",
"description": "The provider-assigned unique ID for this managed resource.\n"
"description": "Unique identifier for the resource; defined by the server.\n"
},
"keySigningKeys": {
"type": "array",
Expand All @@ -181039,11 +181056,11 @@
},
"type": "object",
"required": [
"id",
"keySigningKeys",
"managedZone",
"project",
"zoneSigningKeys",
"id"
"zoneSigningKeys"
]
}
},
Expand Down Expand Up @@ -181078,8 +181095,7 @@
"description": "The fully qualified DNS name of this zone, e.g. `example.io.`.\n"
},
"id": {
"type": "string",
"description": "The provider-assigned unique ID for this managed resource.\n"
"type": "string"
},
"managedZoneId": {
"type": "integer"
Expand All @@ -181106,11 +181122,11 @@
"required": [
"description",
"dnsName",
"id",
"managedZoneId",
"name",
"nameServers",
"visibility",
"id"
"visibility"
]
}
},
Expand Down Expand Up @@ -181147,8 +181163,7 @@
"description": "A collection of values returned by getRecordSet.\n",
"properties": {
"id": {
"type": "string",
"description": "The provider-assigned unique ID for this managed resource.\n"
"type": "string"
},
"managedZone": {
"type": "string"
Expand Down Expand Up @@ -181176,12 +181191,12 @@
},
"type": "object",
"required": [
"id",
"managedZone",
"name",
"rrdatas",
"ttl",
"type",
"id"
"type"
]
}
},
Expand Down Expand Up @@ -181265,6 +181280,50 @@
]
}
},
"gcp:firebase/getAndroidAppConfig:getAndroidAppConfig": {
"inputs": {
"description": "A collection of arguments for invoking getAndroidAppConfig.\n",
"properties": {
"appId": {
"type": "string"
},
"project": {
"type": "string"
}
},
"type": "object",
"required": [
"appId"
]
},
"outputs": {
"description": "A collection of values returned by getAndroidAppConfig.\n",
"properties": {
"appId": {
"type": "string"
},
"configFileContents": {
"type": "string"
},
"configFilename": {
"type": "string"
},
"id": {
"type": "string"
},
"project": {
"type": "string"
}
},
"type": "object",
"required": [
"appId",
"configFileContents",
"configFilename",
"id"
]
}
},
"gcp:firebase/getAppleApp:getAppleApp": {
"inputs": {
"description": "A collection of arguments for invoking getAppleApp.\n",
Expand Down Expand Up @@ -181367,8 +181426,7 @@
"description": "The filename that the configuration artifact for the IosApp is typically saved as.\n"
},
"id": {
"type": "string",
"description": "The provider-assigned unique ID for this managed resource.\n"
"type": "string"
},
"project": {
"type": "string"
Expand Down Expand Up @@ -181544,8 +181602,7 @@
"description": "The default Firebase Realtime Database URL.\n"
},
"id": {
"type": "string",
"description": "The provider-assigned unique ID for this managed resource.\n"
"type": "string"
},
"locationId": {
"type": "string",
Expand Down Expand Up @@ -181575,12 +181632,12 @@
"apiKey",
"authDomain",
"databaseUrl",
"id",
"locationId",
"measurementId",
"messagingSenderId",
"storageBucket",
"webAppId",
"id"
"webAppId"
]
}
},
Expand Down Expand Up @@ -183175,8 +183232,7 @@
"secret": true
},
"id": {
"type": "string",
"description": "The provider-assigned unique ID for this managed resource.\n"
"type": "string"
},
"project": {
"type": "string",
Expand All @@ -183194,10 +183250,10 @@
"type": "object",
"required": [
"accessToken",
"id",
"project",
"region",
"zone",
"id"
"zone"
]
}
},
Expand All @@ -183211,8 +183267,7 @@
"description": "The email of the account used by the provider to authenticate with GCP.\n"
},
"id": {
"type": "string",
"description": "The provider-assigned unique ID for this managed resource.\n"
"type": "string"
}
},
"type": "object",
Expand Down
5 changes: 2 additions & 3 deletions provider/cmd/pulumi-tfgen-gcp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ package main

import (
gcp "github.com/pulumi/pulumi-gcp/provider/v6"
"github.com/pulumi/pulumi-gcp/provider/v6/pkg/version"
"github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfgen"
"github.com/pulumi/pulumi-terraform-bridge/pf/tfgen"
)

func main() {
tfgen.Main("gcp", version.Version, gcp.Provider())
tfgen.MainWithMuxer("gcp", gcp.Provider())
}
8 changes: 4 additions & 4 deletions provider/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ go 1.19

require (
github.com/hashicorp/terraform-provider-google-beta v1.20.1-0.20210315160117-642085ce9b99
github.com/pulumi/pulumi-terraform-bridge/pf v0.9.2
github.com/pulumi/pulumi-terraform-bridge/v3 v3.47.3
github.com/pulumi/pulumi/pkg/v3 v3.66.0
github.com/pulumi/pulumi/sdk v1.14.1
github.com/pulumi/pulumi/sdk/v3 v3.66.0
)

replace (
github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20220824175045-450992f2f5b9
github.com/hashicorp/terraform-provider-google-beta => github.com/pulumi/terraform-provider-google-beta v1.20.1-0.20230517161408-560c7d4d4a5d
github.com/hashicorp/terraform-provider-google-beta => github.com/pulumi/terraform-provider-google-beta v1.20.1-0.20230526192629-e22b067c5b69
github.com/hashicorp/vault => github.com/hashicorp/vault v1.2.0
)

Expand Down Expand Up @@ -152,7 +152,7 @@ require (
github.com/hashicorp/terraform-exec v0.17.3 // indirect
github.com/hashicorp/terraform-json v0.14.0 // indirect
github.com/hashicorp/terraform-plugin-framework v1.1.1 // indirect
github.com/hashicorp/terraform-plugin-framework-validators v0.9.0 // indirect
github.com/hashicorp/terraform-plugin-framework-validators v0.10.0 // indirect
github.com/hashicorp/terraform-plugin-go v0.14.3 // indirect
github.com/hashicorp/terraform-plugin-log v0.7.0 // indirect
github.com/hashicorp/terraform-plugin-mux v0.8.0 // indirect
Expand Down Expand Up @@ -203,7 +203,7 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/posener/complete v1.2.3 // indirect
github.com/pulumi/pulumi-java/pkg v0.9.2 // indirect
github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.3 // indirect
github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.4 // indirect
github.com/pulumi/pulumi-yaml v1.1.1 // indirect
github.com/pulumi/schema-tools v0.1.2 // indirect
github.com/pulumi/terraform-diff-reader v0.0.0-20201211191010-ad4715e9285e // indirect
Expand Down
Loading

0 comments on commit 6e90538

Please sign in to comment.