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

Add Admin Settings API #185

Merged
merged 18 commits into from
Mar 11, 2021
Merged

Add Admin Settings API #185

merged 18 commits into from
Mar 11, 2021

Conversation

omarismail
Copy link
Contributor

@omarismail omarismail commented Mar 4, 2021

Description

This PR adds all the Admin Settings API.

It implements the API for each Settings:

  • General.Read
  • General.Update
  • CostEstimation.Read
  • CostEstimation.Update
  • SAML.Read
  • SAML.Update
  • SAML.RevokeIdpCert
  • SMTP.Read
  • SMTP.Update
  • Twilio.Read
  • Twilio.Update
  • Twilio.Verify
  • Customization.Read
  • Customization.Update

Testing plan

  1. Pull down and run the tests

Output from tests

$ TFE_TOKEN=<token> TFE_ADDRESS=<address>  ENABLE_TFE=1 go test -v ./...  -timeout=30m
...
PASS
ok  	github.com/hashicorp/go-tfe	510.513s
?   	github.com/hashicorp/go-tfe/examples/organizations	[no test files]
?   	github.com/hashicorp/go-tfe/examples/workspaces	[no test files]

External links

@omarismail omarismail requested a review from a team March 4, 2021 13:44
@petems
Copy link
Contributor

petems commented Mar 5, 2021

Awesome, thanks @omarismail! 🤝

Copy link
Member

@chrisarcand chrisarcand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lookin' good!

I skimmed a lot and had enough feedback to stop and revisit in more detail a second time around; the biggest bit is to double check all these APIs to see if they're all covered in the structs; I think a lot of the documentation around these APIs is woefully out of date 😩

admin_organization_test.go Outdated Show resolved Hide resolved
admin_setting.go Outdated Show resolved Hide resolved
admin_setting.go Outdated Show resolved Hide resolved
admin_setting.go Outdated Show resolved Hide resolved
admin_setting.go Outdated Show resolved Hide resolved
Copy link
Member

@chrisarcand chrisarcand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two quick nits and this is ready to merge!

tfe.go Outdated Show resolved Hide resolved
admin_setting_smtp.go Outdated Show resolved Hide resolved
@omarismail omarismail merged commit 75327b9 into master Mar 11, 2021
@omarismail omarismail deleted the omarismail/admin-settings-api branch March 11, 2021 15:59
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 this pull request may close these issues.

3 participants