depends_on usage in Python version
See original GitHub issueHi,
CDKTF version: 0.11.2
I have got the need to specify that a resource depends_on on other. This is what I am trying to do:
created_schema = Schema(self,
id_=schema["name"],
database=schema["database"],
name=schema["name"])
snowflake_table = SnowflakeTableModule(self,
id_=f"{schema}_{table['name']}",
columns=table_columns,
database_name=database,
schema_name=schema,
table_name=table["name"],
change_tracking=table["change_tracking"],
data_retention_days=table["data_retention_days"])
snowflake_table.add_override("depends_on", [Token.as_any(created_schema.fqn)])
It does not create errors during synth and indeed I see the following in the generated json:
"depends_on": [
"${snowflake_schema.snowflake_schemas_DEMO2_BAZAARVOICE_STANDARD_CLIENT_FEED_07181D8A}"
],
But then, when trying to run terraform plan, I get:
│ Error: Invalid expression
│
│ on cdk.tf.json line 37, in module.snowflake_schemas_test_table_1_044C1F2F.depends_on:
│ 37: "${snowflake_schema.snowflake_schemas_test_07181D8A}"
│
│ A single static variable reference is required: only attribute access and
│ indexing with constant keys. No calculations, function calls, template
│ expressions, etc are allowed here.
Anyone knows how to fix this?
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Python Dependencies - Everything You Need to Know
Dependency Resolution – automatically ensures that all dependencies pulled in by a package are compatible with the rest of your Python ...
Read more >Managing Application Dependencies
This tutorial walks you through the use of Pipenv to manage dependencies for an application. It will show you how to install and...
Read more >Identifying the dependency relationship for python packages ...
Secondly Python packages do contain the information about dependent packages as well as required versions. You can see the dependencies of particular pkg ......
Read more >Azure Pipelines with Python - by example - Anthony Shaw
In this tutorial, I'll show you -by example- how to use Azure ... UsePythonVersion@0 — Use a specific Python version (like a virtual ......
Read more >Jobs in Azure Pipelines and TFS - Microsoft Learn
Understand jobs in Azure Pipelines, Azure DevOps Server, and Team Foundation Server (TFS)
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jsteinich this is custom module but weirdly it doesn’t have
depends_on
in the constructor parameters when module bindings are generated, anything specific needs to be done to add it in constructor while generation or creation of module ?I’m going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues. If you’ve found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.