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

testing: format of datasource.yaml files #9

Closed
sergenyalcin opened this issue Jul 5, 2022 · 2 comments
Closed

testing: format of datasource.yaml files #9

sergenyalcin opened this issue Jul 5, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@sergenyalcin
Copy link
Member

What problem are you facing?

In some example manifests, we need to inject some values e.g tenantID, accountID, objectID. This injection values usually corresponds to Data Sources of Terraform. Please see the following example:

tenantId: ${data.azurerm_client_config.current.tenant_id}

This convention is from the Terraform registry documentation. So we use a regular expression to extract the key of the tenantID value. For this example ,the key is: azurerm_client_config.current.tenant_id

And our source yaml file has the following format:

azurerm_client_config.current.tenant_id: ***
azurerm_client_config.current.object_id: ***

@muvaf suggested two formats for data source yaml in this PR: https://github.com/upbound/official-providers/pull/299#discussion_r910804037

data:
  azurerm_client_config:
    current:
      object_id: 847c7043-b0a5-4fdf-9285-ee084c94a206
azure:
  tenantId: b9925bc4-8383-4c37-b9d2-fa456d1bb1c7
  objectId: 847c7043-b0a5-4fdf-9285-ee084c94a206

How could Official Providers help solve your problem?

Let's discuss the possible formats and decide that a best one.

@sergenyalcin sergenyalcin added the enhancement New feature or request label Jul 5, 2022
@muvaf
Copy link
Contributor

muvaf commented Jul 5, 2022

FWIW, I think the simple find&replace approach we took is perfectly fine for small number of entries. So this issue is about tracking whether it's going to stay like that or grow to many that we'll want to implement fully-structured YAML.

@jeanduplessis jeanduplessis transferred this issue from another repository Oct 11, 2022
@sergenyalcin
Copy link
Member Author

Because of switching the different data sources and also supporting the repo secrets, this issue was resolved. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants