Skip to content
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

Provider failing with validation errors: Field name may only contain lowercase alphanumeric characters & underscores. #56

Closed
taylor opened this issue Sep 5, 2018 · 4 comments

Comments

@taylor
Copy link

taylor commented Sep 5, 2018

Repeated validation errors: Field name may only contain lowercase alphanumeric characters & underscores.

Steps to recreate:

  1. Install Terraform version 0.10

  2. Follow instructions from https://github.com/rackn/terraform-provider-drp#building-the-provider

  3. mkdir -p $GOPATH/src/github.com/hashicorp

  4. cd $GOPATH/src/github.com/hashicorp

  5. git clone git@github.com:hashicorp/terraform-provider-drp

  6. cd $GOPATH/src/github.com/hashicorp/terraform-provider-drp

  7. make build

References:

Video walk through does not show building the Terraform provider so we followed the instructions on the github repo:
https://github.com/rackn/terraform-provider-drp


bash-4.4# terraform apply
1 error(s) occurred:

* provider.drp: Internal validation of the provider failed! This is always a bug
with the provider itself, and not a user issue. Please report
this bug:

30 error(s) occurred:

* resource drp_machine: Name: Field name may only contain lowercase alphanumeric characters & underscores.
* resource drp_raw_machine: Workflow: Field name may only contain lowercase alphanumeric characters & underscores.
* resource drp_user: Meta: Field name may only contain lowercase alphanumeric characters & underscores.
* resource drp_workflow: Meta: Field name may only contain lowercase alphanumeric characters & underscores.
* resource drp_tenant: Name: Field name may only contain lowercase alphanumeric characters & underscores.
* resource drp_reservation: Scoped: Field name may only contain lowercase alphanumeric characters & underscores.
* resource drp_stage: Meta: Field name may only contain lowercase alphanumeric characters & underscores.
* resource drp_subnet: OnlyReservations: Field name may only contain lowercase alphanumeric characters & underscores.
* resource drp_plugin: PluginErrors: Field name may only contain lowercase alphanumeric characters & underscores.
* resource drp_role: Documentation: Field name may only contain lowercase alphanumeric characters & underscores.
* resource drp_bootenv: OptionalParams: Field name may only contain lowercase alphanumeric characters & underscores.
* resource drp_param: Schema: Field name may only contain lowercase alphanumeric characters & underscores.
* resource drp_profile: Meta: Field name may only contain lowercase alphanumeric characters & underscores.
* resource drp_task: Description: Field name may only contain lowercase alphanumeric characters & underscores.
* resource drp_template: Contents: Field name may only contain lowercase alphanumeric characters & underscores.
* data source drp_role: Meta: Field name may only contain lowercase alphanumeric characters & underscores.
* data source drp_workflow: Description: Field name may only contain lowercase alphanumeric characters & underscores.
* data source drp_machine: Name: Field name may only contain lowercase alphanumeric characters & underscores.
* data source drp_param: Name: Field name may only contain lowercase alphanumeric characters & underscores.
* data source drp_profile: Name: Field name may only contain lowercase alphanumeric characters & underscores.
* data source drp_bootenv: Meta: Field name may only contain lowercase alphanumeric characters & underscores.
* data source drp_tenant: Meta: Field name may only contain lowercase alphanumeric characters & underscores.
* data source drp_plugin: Description: Field name may only contain lowercase alphanumeric characters & underscores.
* data source drp_reservation: Meta: Field name may only contain lowercase alphanumeric characters & underscores.
* data source drp_stage: RequiredParams: Field name may only contain lowercase alphanumeric characters & underscores.
* data source drp_template: Meta: Field name may only contain lowercase alphanumeric characters & underscores.
* data source drp_user: Meta: Field name may only contain lowercase alphanumeric characters & underscores.
* data source drp_raw_machine: Runnable: Field name may only contain lowercase alphanumeric characters & underscores.
* data source drp_subnet: Name: Field name may only contain lowercase alphanumeric characters & underscores.
* data source drp_task: Meta: Field name may only contain lowercase alphanumeric characters & underscores.
@taylor
Copy link
Author

taylor commented Sep 5, 2018

We also tried v0.11 with the same results.

@zehicle
Copy link
Contributor

zehicle commented Sep 5, 2018

Have you tried it with the release provider from https://github.com/rackn/terraform-provider-drp/releases?

The release versions should work correctly.

I cannot resolve: github.com/hashicorp/terraform-provider-drp so there is a doc issue to address.

@zehicle zehicle mentioned this issue Sep 5, 2018
@zehicle
Copy link
Contributor

zehicle commented Sep 5, 2018

I was not able to duplicate the issue; however, I found errors in the README and updated the links.

You should not need to build the provider to test it. Please see the link above.

@zehicle zehicle closed this as completed Sep 5, 2018
@denverwilliams
Copy link

We can now successfully build and use the terraform drp provider using the Dockerfile below (Using the updated paths from #57) - The release is also working.

# Build the Go binaries using a multi-stage build phase named "golang"
FROM golang:1.10.3-alpine3.7 as golang
LABEL maintainer="Denver Williams <denver@debian.nz>"

RUN apk add git make bash 

RUN mkdir -p $GOPATH/src/github.com/rackn; cd $GOPATH/src/github.com/rackn; git clone https://github.com/rackn/terraform-provider-drp.git && cd $GOPATH/src/github.com/rackn/terraform-provider-drp && make build


FROM alpine:3.7
LABEL maintainer="Denver Williams <denver@debian.nz>"
# PIN to Commit on Master
ENV TERRAFORM_VERSION=0.11.8
ENV ARC=amd64

# Install the common dependencies.
RUN apk --no-cache add \
    bash \
    ca-certificates \
    curl \
    git \
    jq \
    less \
    libc6-compat \
    openssh-client \
    tar \
    unzip \
    util-linux

# Install the terraform binary
RUN curl -sSLO https://releases.hashicorp.com/terraform/$TERRAFORM_VERSION/terraform_"${TERRAFORM_VERSION}"_linux_$ARC.zip && \
    unzip terraform_"${TERRAFORM_VERSION}"_linux_${ARC}.zip -d /usr/bin

# Copy the Terraform providers from the golang build stage
COPY --from=golang /go/bin/terraform-provider-* /usr/local/bin/

# Write the configuration file Terraform uses to query available providers
# and their binaries
RUN echo providers { >> ~/.terraformrc && \
  echo '    drp = "/usr/local/bin/terraform-provider-drp"' >> ~/.terraformrc && \
  echo } >> ~/.terraformrc


WORKDIR /cncf/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants