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

grafana_datasource created on every puppet run #372

Open
dlucredativ opened this issue Jul 11, 2024 · 0 comments · May be fixed by #373
Open

grafana_datasource created on every puppet run #372

dlucredativ opened this issue Jul 11, 2024 · 0 comments · May be fixed by #373

Comments

@dlucredativ
Copy link

Given

['Foo', 'Bar'].each |$source| {
    grafana_datasource { $source:
      organization => $source,
      [...]
    }
}

Puppet "creates" those resources on every run.

Notice: /Stage[main]/Main/Grafana_datasource[Foo]/ensure: created
Notice: /Stage[main]/Main/Grafana_datasource[Bar]/ensure: created

Unlike #289, the provider does not see an existing datasource at all. This is because the API call in datasource_by_name only returns datasources for the current organization, but said method does not switch the current organization as flush does.

@dlucredativ dlucredativ linked a pull request Jul 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant