-
Notifications
You must be signed in to change notification settings - Fork 630
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
Add SaaS Application support #1762
Add SaaS Application support #1762
Conversation
e9e7a47
to
c00507c
Compare
changelog detected ✅ |
76b30a7
to
282085e
Compare
@jacobbednarz here's a first draft. I'll do a bit more testing on our workspace.
|
282085e
to
6129ebf
Compare
@Justin-Holmes can i get your eyes on this too please? |
saasApp := convertSaasSchemaToStruct(d) | ||
newAccessApplication.SaasApplication = saasApp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given convertSaasSchemaToStruct
doesn't return an error, why not just assign this directly?
saasApp := convertSaasSchemaToStruct(d) | |
newAccessApplication.SaasApplication = saasApp | |
newAccessApplication.SaasApplication = convertSaasSchemaToStruct(d) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Looks great! And you're correct @ouranos, the Also, the |
Thanks,
So this is the correct way then? "domain": {
Type: schema.TypeString,
- Required: true,
+ Optional: true,
+ Computed: true,
...
} Let me know if you are happy with it or if it needs more change and I'll rebase/clean up/squash. |
|
Type: schema.TypeList, | ||
Optional: true, | ||
Description: "SaaS configuration for the Access Application. See below for reference structure.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type: schema.TypeList, | |
Optional: true, | |
Description: "SaaS configuration for the Access Application. See below for reference structure.", | |
Type: schema.TypeList, | |
Optional: true, | |
MaxItems: 1, | |
Description: "SaaS configuration for the Access Application.", |
don't forget to run
|
It's computed for SaaS apps (and returns a Cloudflare generated domain) but it's required for the other types (eg: self-hosted) |
2ec2c02
to
a609a34
Compare
So I think the only remaining points are:
|
internal/provider/resource_cloudflare_access_application_test.go
Outdated
Show resolved
Hide resolved
internal/provider/resource_cloudflare_access_application_test.go
Outdated
Show resolved
Hide resolved
898f48f
to
4b3f018
Compare
Great thanks 🙏 I've:
Let me know if I need to do anything else |
did you re-run |
4b3f018
to
db5d1d9
Compare
Nope 🤦♂️ |
cool! I'll run the acceptance tests again in the morning and we should be good, thanks! p.s for future PRs if you check the box to allow maintainers to make changes, we can limit the back and forth as I can provide a patch within the branch for you. |
This functionality has been released in v3.20.0 of the Terraform Cloudflare Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
Closes #1226
Added in cloudflare-go: cloudflare/cloudflare-go#900
I've tested in our environment which had a custom fork of the SDK previously and the plan is not showing any difference when using the new SDK. Opening a draft PR to get some feedback and I'll do more testing in the meantime.
I need a bit of help handling the
domain
attribute. From my research (before the doc was available), it seems that it is not required for SaaS applications and will be computed for them (eg:https://<organisation>.cloudflareaccess.com/cdn-cgi/access/sso/saml/<uuid>
.The updated documentation seems to confirm it: https://api.cloudflare.com/#access-applications-properties