Device trust terraform provider#801
Conversation
|
|
If you want the CI to pass, you must update the teleport dep in go.mod to point to current master's commit (or at least to a commit where your changes were made) Something like this: |
|
@marcoandredinis I've already updated the required API version in Also FYI, that those updates for |
|
Yeah, we should leave this PR until v13 gets released and during the non-production ready releases (alpha, beta, rc, ...) we should be able to update the API and the binary used to run tests The binary used to run the tests is under the |
nklaassen
left a comment
There was a problem hiding this comment.
I'm curious what the expected use case for this is? Will admins be able to define all resource asset tags in terraform and then end users will be able to enroll their device with tsh, or something like that?
|
@marcoandredinis @nklaassen Can you please take another look to this PR. Now that embedded fields are supported (see gravitational/protoc-gen-terraform#29), I have significantly updated this PR (no longer hacky injected fields).
@nklaassen, Yes that is the case. Basically |
|
We need this issue fixed for the tests to pass |
Co-authored-by: Marco André Dinis <marco.dinis@goteleport.com>
marcoandredinis
left a comment
There was a problem hiding this comment.
Can you please re-run the the terraform-gen-tfschema target?
I got some differences
Btw, after this gets merged and released (13.0.4 ?) we should update the Terraform Reference docs
Something like this:
gravitational/teleport#26502 (I have to fix a "typo" before I can merge that one)
|
This is scheduled for |
Terraform support for device trust.
Device type definition
Currently, there's two Device types implemented for Device Trust:
Provider implementation
Unlike other existing resources, DeviceV1 does not fully utilize the metadata fields such as
label,description, etc. Onlymetadata.nameis supported, specifically to be compatible with schema generation for terraform provider. Additionally, the DeviceV1 embeds theResourceHeaderfield. protoc-gen-terraform is updated to support such embedded fields.This PR adds a new fields to the template payload:
UUIDMetadataNamefield: used to generateMetadata.Nameas uuid value. Theplural_resource.go.tpltemplate is updated to accommodateUUIDMetadataNamefield.Supported device trust CRUD fields
As for supported fields, only
asset_tag,os_type, andenroll_statusare supported by this provider.asset_tag,os_type,enroll_status(optional as this value can be updated outside of Terraform and it won't be a good experience for our users to keep the.tffiles in sync with the state )enroll_status:enrolled -> not_enrolledCloses: https://github.com/gravitational/teleport.e/issues/939
Depends on gravitational/protoc-gen-terraform#29