This repository has been archived by the owner on Jan 21, 2020. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #406
This PR introduces a schema change to the terraform instance plugins'
Properties
. Previously we have an abstraction that supports only 1 resource (the vm) per Properties. Now we support multiple. In fact, the abstraction has been removed. You can just use any valid tf.json like this:Note that there is only one member named
host
under thesoftlayer_virtual_guest
section. The namehost
will be replaced by the plugin with a generated name so that the user doesn't have to track hostnames. However, it's possible to have a hostname prefix via the@hostnamePrefix
field if supported. There is a check to ensure that zero or at most one vm resource is specified. You can't have multiple vm instances per Properties because the accounting between Terraform and Infrakit will be off.The example above will be transformed to
In essence, the plugin is now smarter as it looks for the only supported vm instance spec and injects userdata and tags appropriately. Everything else the user specified is left intact.
This makes it possible to create dependent resources that need to be provisioned and attach to the vm instance, like the storage volume in the above example.
Other in this PR:
@ndegory @kaufers @JacobFrericks @craigyam