Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Add rancher_registration_token resource type #3

Merged
merged 4 commits into from
Sep 26, 2016
Merged

Add rancher_registration_token resource type #3

merged 4 commits into from
Sep 26, 2016

Conversation

raphink
Copy link
Contributor

@raphink raphink commented Sep 26, 2016

Refactor config.go to allow for environment clients to be created

@blackjid
Copy link
Member

hey @raphink awesome! thanks!
I see you added a way to recreate the client for the environment specific resources... I was doing that in the registry branch, but I couldn't make the tests work for a while...

I think now I can rebase the registry branch from yours, and make it work.. :)

Refactor config.go to allow for environment clients to be created
@raphink
Copy link
Contributor Author

raphink commented Sep 26, 2016

@blackjid Ah, hadn't seen your registry branch, sorry! Reorganizing this client thing to get Environment-specific clients was a pain, but required anyway for most resource types (registry, registration_token, stack, etc.)

I just rebased the PR now that you merged the other one.


#### Example Usage

```
Copy link
Member

Choose a reason for hiding this comment

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

what about using the hcl highlighting now you proposed that on the rest of the docs ?

Copy link
Member

Choose a reason for hiding this comment

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

we'll this is done now :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I was waiting for you to merge the other PR first.

value = "${rancher_registration_token.registration_url}"
}

output "registration_token" {
Copy link
Member

Choose a reason for hiding this comment

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

do you think is necessary to add the outputs to the example??
If we do that will end up repeating all the attributes in the attributes references here in the example...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, I can remove those.

}

func resourceRancherRegistrationTokenDelete(d *schema.ResourceData, meta interface{}) error {
log.Printf("[INFO] Deleting RegistrationToken is not possible, simply removing its ID: %s", d.Id())
Copy link
Member

Choose a reason for hiding this comment

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

what do you mean with this line of log?
At the end you are effectively deleting the token right?? after deactivating it...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My bad. I couldn't get deleting to work at first, so I had put this. I've now found how to deactivate/remove, so I can remove this.

@blackjid
Copy link
Member

don't worry I had the branch, but some stuff were just in my computer, i've just push them...

@raphink
Copy link
Contributor Author

raphink commented Sep 26, 2016

@blackjid there you go, I fixed all your comments.

@blackjid blackjid merged commit c4f2726 into platanus:master Sep 26, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants