Closed noah-troncoso closed 4 months ago
Thanks for raising this @noah-troncoso . We will look into this, but equally if you'd like to submit a PR we'd be happy to receive it. Thanks!
@matthewelwell I could take a stab at it. Only thing I'm not sure about is how to run the tests. The README says I need these variables:
FLAGSMITH_MASTER_API_KEY
FLAGSMITH_ENVIRONMENT_KEY
FLAGSMITH_ENVIRONMENT_ID
FLAGSMITH_FEATURE_ID
FLAGSMITH_PROJECT_UUID
but what instance is it pointing to? Am I expected to be running flagsmith locally? Also, there isn't a contributions doc or anything. Do I need to create a fork?
@noah-troncoso No need to run Flagsmith locally - by default the provider points to public Flagsmith, so you can set it up with your own API key and environment details: https://github.com/Flagsmith/terraform-provider-flagsmith/blob/36b042476b9920f0bb5b89e211e026750e491e52/flagsmith/provider.go#L17
You can run the acceptance tests with make testacc
as mentioned in the README: https://github.com/Flagsmith/terraform-provider-flagsmith/tree/main?tab=readme-ov-file#developing-the-provider
You should create a fork if you want to send a pull request to this repo, since you do not have write access for it. Thanks!
Created a PR
I updated the Flagsmith provider from 0.5.1 to 0.7.0 and now I get this error:
The resource in question looks like this:
It seems to be failing because of the empty
string_value
, which the documentation says is acceptable.It looks like this has to do with the change in this PR:
https://github.com/Flagsmith/terraform-provider-flagsmith/commit/ff955e429f0556035295616a9d1735f43708e2e9#diff-44a743db94f8f4f2a687c1e9ff96d4c28682cfb086ac11f7c301a49f98e40c28
There is no test here for an empty string, so I can see how this got missed.