Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use vars in Schema Owner #175

Open
toadies opened this issue Dec 17, 2024 · 4 comments
Open

Unable to use vars in Schema Owner #175

toadies opened this issue Dec 17, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@toadies
Copy link

toadies commented Dec 17, 2024

Building a template for our schemas and trying to use vars on owner. The vars works with name to create the role.

schemas:
  - name: "{{ var.schema }}"
    managed_access: true
    owner: "{{ var.database }}_{{ var.schema }}_R_AR"
    comment: AUTO-PROVISION BY TITAN

results in following error

venv/lib/python3.10/site-packages/titan/identifiers.py", line 236, in parse_identifier
    raise pp.ParseException(f"Failed to parse identifier: {identifier}")
pyparsing.exceptions.ParseException: Failed to parse identifier: {{ var.database }}_{{ var.schema }}_R_AR  (at char 0), (line:1, col:1)
@toadies
Copy link
Author

toadies commented Dec 17, 2024

Same issue trying to use variables with database_roles

database_roles:
  - name: "{{ var.database }}_{{ var.schema }}_FULL_AR"
    database: "DV_SOURCES_DB"
    owner: USERADMIN
    comment: AUTO-PROVISION BY TITAN

error emssage

venv/lib/python3.10/site-packages/titan/blueprint.py", line 456, in _merge_pointers
    if resource_id in namespace:
TypeError: unhashable type: 'VarString'

CLI works when hard coding a value in database.

@toadies toadies closed this as completed Dec 17, 2024
@toadies toadies reopened this Dec 17, 2024
@teej teej added the bug Something isn't working label Dec 18, 2024
@teej
Copy link
Collaborator

teej commented Dec 18, 2024

Fixed in v0.11.1

@teej teej closed this as completed Dec 18, 2024
@toadies
Copy link
Author

toadies commented Dec 18, 2024

Similar error still on using variable in database for database_roles

database_roles:
  - name: "{{ var.database }}_{{ var.schema }}_FULL_AR"
    database: "{{ var.database }}"
    owner: USERADMIN

error

venv/lib/python3.10/site-packages/titan/blueprint.py", line 456, in _merge_pointers
    if resource_id in namespace:
TypeError: unhashable type: 'VarString'

@teej teej reopened this Dec 18, 2024
@teej
Copy link
Collaborator

teej commented Dec 18, 2024

I'll retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants