Hello
I am a newbie here (sorry).
I have two providers set in the cdktf.json file :
"terraformProviders": ["google@~> 3.84.0", "google-beta@~> 3.84.0"],
For both my google-beta resources I need to specify the provider within the setting :
#!/usr/bin/env python
from constructs import Construct
from cdktf import App, TerraformStack
from imports.google import FirestoreDocument
from imports.google_beta import GoogleDataCatalogTaxonomy, GoogleDataCatalogPolicyTag
class MyStack(TerraformStack):
def __init__(self, scope: Construct, ns: str):
super().__init__(scope, ns)
FirestoreDocument(self,'cdktf_test_classification', project='dev', collection='taxonomies',document_id='cdktf_test_classification', fields='')
GoogleDataCatalogTaxonomy(self, 'cdktf_test_taxonomy', provider='google-beta', project='dev', region='europe-west2', display_name='cdktf_test_classification', description='my description', activated_policy_types=['FINE_GRAINED_ACCESS_CONTROL'])
GoogleDataCatalogPolicyTag(self, 'cdktf_test_unclassified_policy_tag', provider='google-beta', taxonomy='1234', display_name='cdktf_test_Unclassified', description='my description')
app = App()
MyStack(app, "hello-terraform")
app.synth()
When I run this however I get an error :
[2021-09-16T15:25:16.267] [ERROR] default - jsii.errors.JavaScriptError:
Error: Expected object reference, got "google-beta"
at Object.deserialize .....
If I remove the provider and proceed through to run a terrafrom plan I end up with a provider error as the plan tries to use the google provider not google-beta ?
β Error: Invalid resource type
β
β on cdk.tf.json line 37, in resource:
β 37: "google_data_catalog_taxonomy": {
β
β The provider hashicorp/google does not support resource type "google_data_catalog_taxonomy".
β΅
β·
β Error: Invalid resource type
β
β on cdk.tf.json line 67, in resource:
β 67: "google_data_catalog_policy_tag": {
β
β The provider hashicorp/google does not support resource type "google_data_catalog_policy_tag".
How do I point to the google-beta resource here ?