-
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 cloudflare_account_member
resource
#78
Add cloudflare_account_member
resource
#78
Conversation
This adds a new resource `cloudflare_account_member` which is used to manage account members.
) | ||
|
||
// This needs to be hooked up to the provider schema instead. | ||
var cloudflareOrgID = os.Getenv("CLOUDFLARE_ORG_ID") |
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.
Need to work out why d.GetOk("org_id")
isn't working in the methods below.
Using org_id
also changes a bunch of functionality to be managed since it overrides user_owner_from_zone
which isn't used in the account member resource but changing any behaviour to include it may break other things.
Required: true, | ||
}, | ||
|
||
"role_ids": { |
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.
Decided to use IDs over Names here as the name could change but the IDs are pretty unique and won't trigger a bunch of extra updates.
@@ -42,7 +42,7 @@ If you wish to work on the provider, you'll first need [Go](http://www.golang.or | |||
To compile the provider, run `make build`. This will build the provider and put the provider binary in the `$GOPATH/bin` directory. | |||
|
|||
```sh | |||
$ make bin |
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.
I'll throw up a PR soon that will expand on the "how to develop the provider" section since I've had a few people ask me and the documentation is lacking.
#101 brings in the required functionality for this PR. |
Ok, I've broke the PR 🤦🏻♂️. Sorry! Need to revert it back. |
@jacobbednarz do you want to make any additional changes to this PR or are we good to go? |
We do need to look at https://github.com/terraform-providers/terraform-provider-cloudflare/pull/78/files/2da08fc70772bb4073470055e5ec3886309c10bd#diff-2e16a4318cb61e160f7ac9dc64bca334 otherwise the account number doesn't get applied correctly. I haven't quite found the link for this yet but can have another peek. |
This landed in f1d2944 so we can use it instead of the janky OS lookups.
@patryk This should be good to rock and roll now. You've already updated the vendored version of |
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.
👍
Looking forward to this landing!
Awesome stuff, guys! Thanks so much! |
Thanks @patryk 🌮 |
This adds a new resource
cloudflare_account_member
which is used tomanage account members.
There is a caveat here, which is noted in the README but I'll reiterate,
that once an account member is created, the user object (which is where
the email address is defined) becomes read only and cannot be
updated using the account member endpoints.
This resource does rely on cloudflare/cloudflare-go#196 which in turn
relies on a few PRs in the
cloudflare-go
library. Would be good to getthose merged and then update the vendored version before merging this to
confirm everything works as expected.
Tests are still outstanding while I get a test account fully setup.
Screenshots (website)
Sidebar navigation
Main page