onelogin / terraform-provider-onelogin

GNU General Public License v3.0
27 stars 19 forks source link

Incomplete response on SAML app create #18

Closed gmlexx closed 4 years ago

gmlexx commented 4 years ago

After initial terragrunt apply, I'm getting only partial sso object in response

sso = {
"issuer" = "https://app.onelogin.com/saml/metadata/24c06fcc-a132-49d5-a52e-879608d5508f"
"sls_url" = "https://mydomain.onelogin.com/trust/saml2/http-redirect/slo/1239708"
}

Only by running terragrunt apply again, I can get full response

sso = {
"acs_url" = "https://mydomain.onelogin.com/trust/saml2/http-post/sso/24c06fcc-a132-49d5-a52e-879608d5508f"
"issuer" = "https://app.onelogin.com/saml/metadata/24c06fcc-a132-49d5-a52e-879608d5508f"
"metadata_url" = "https://app.onelogin.com/saml/metadata/24c06fcc-a132-49d5-a52e-879608d5508f"
"sls_url" = "https://mydomain.onelogin.com/trust/saml2/http-redirect/slo/1239708"
}
dcaponi commented 4 years ago

Hey @gmlexx, thanks for continuing to use the provider and helping us find these types of things! I'm sorry to see you're having this issue, this bug is a bit sneaky.

I know what the problem is and have documented it for prioritization/work. I'll follow up here when we've rolled out a fix.

dcaponi commented 4 years ago

@gmlexx try upgrading to v0.0.8 as this should resolve the issue. The problem was that the provider was set up so "sso" would be a typeMap but sso also had this certificate field that was a map[string]interface{} and terraform was looking for certificate field to be a string and not a map so that was causing inconsistent results when you'd save state. I noticed this when running terraform apply multiple times yielded different fields in sso each time.

If this resolves your issue please close the issue. If I don't hear back from you in 3 days, I'll consider this resolved and close.

gmlexx commented 4 years ago

@dcaponi Thanks a lot, seems to be resolved.