Terraform Configuration error in Learn Boundary section

In the Configure Boundary using Terraform page there is a Terraform plan to configure Boundary. I attempted to run this and got the following errors:

Error: Unsupported argument

  on main.tf line 41, in resource "boundary_scope" "global":
  41:   auto_create_role = true

An argument named "auto_create_role" is not expected here.

---

Error: Unsupported argument

  on main.tf line 48, in resource "boundary_scope" "corp":
  48:   auto_create_role = true

An argument named "auto_create_role" is not expected here.

---

Error: Unsupported argument

  on main.tf line 111, in resource "boundary_scope" "core_infra":
 111:   auto_create_role = true

An argument named "auto_create_role" is not expected here.

I believe this is due to the fact that auto_create_role is not a valid variable according to the documentation for the provider. However, I’m not sure if auto_create_admin_role or auto_create_default_role was intended.

I did try just commenting those entries and the terraform plan worked. However, the apply failed with several:

Error: error creating user: <nil>

To help with troubleshooting, I’m using the latest versions of TF and the provider:
terraform version
Terraform v0.13.4
+ provider registry.terraform.io/hashicorp/boundary v0.1.0

We’re on it – thanks for pointing us to that!

If you don’t want to use auto creation there are some extra steps required, which I do not believe are currently in the Learn guides. So for the purposes of the basics, use auto_create_admin_role and auto_create_default_role when creating an org, and only admin is necessary for projects.

1 Like

Changing the auto entries as described worked.

For clarity:

  • In ‘boundary_scope.global’ I commented the auto_create_role entirely
  • In ‘boundary_scope.corp’ I switched auto_create_role=true for:
    auto_create_admin_role=true
    auto_create_default_role=true
  • In ‘boundary_scope.core_infra’ I switched auto_create_role=true for:
    auto_create_admin_role=true
1 Like

I’m so sorry about that. I just published the fix. And thank you so much for reporting this! :pray:

1 Like