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

Support non-cloud, no CNA #51

Closed
afallucc opened this issue Jan 8, 2020 · 6 comments
Closed

Support non-cloud, no CNA #51

afallucc opened this issue Jan 8, 2020 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@afallucc
Copy link

afallucc commented Jan 8, 2020

This provider still depends on cloud ea (tenantid and other attributes), will this provider support non-cloud? Can we have a option to omit cloud attributes and not be required? I know this would be a change to the dependent go infoblox client as well, is this something that can be enhanced from both the go client and this provider?

@saiprasannasastry saiprasannasastry added the enhancement New feature or request label Jan 9, 2020
@CultClassik
Copy link

We would like to see this as well. I just wrote a bunch of HCL and then realized that this is required - we do not have it nor am I aware of any need for it here. Currently we're doing everything with the wapi that we need via rest calls.

@midacts
Copy link

midacts commented Jan 23, 2020

Same. We aren't using extensible attributes in Infoblox.

I had to comment out the EA references in the code to get it to work in our environment.

@saiprasannasastry
Copy link
Contributor

The thing is all our plugins written in go uses our go library and if we change the library , it will break the other plugins. you can just manually create those 4-5 EA's in NIOS instead of making changes in NIOS

@midacts
Copy link

midacts commented Jan 24, 2020

The thing is all our plugins written in go uses our go library and if we change the library , it will break the other plugins.

It would be great to make those conditional. Kind of a poor design without that in mind.

you can just manually create those 4-5 EA's in NIOS instead of making changes in NIOS

I don't like the names you guys used. Not everything is for a VM or cloud related.

  • VM Name
  • VM ID
  • Cloud API Owned
  • CMP Type
  • Tenant ID

Currently i am commenting these lines out to bypass your EA restrictions (I'm only using IPAllocation, A & PTR records currently).

RUN mkdir -p /go/src/github.com/infobloxopen
WORKDIR /go/src/github.com/infobloxopen
RUN git clone --progress --verbose https://github.com/infobloxopen/terraform-provider-infoblox
WORKDIR /go/src/github.com/infobloxopen/terraform-provider-infoblox
RUN sed -i 's/ea\["VM Name"\] = vmName/\/\/ ea["VM Name"] = vmName/g' /go/src/github.com/infobloxopen/terraform-provider-infoblox/infoblox/resourceARecord.go
RUN sed -i 's/ea\["VM ID"\] = vmID/\/\/ ea["VM ID"] = vmID/g' /go/src/github.com/infobloxopen/terraform-provider-infoblox/infoblox/resourceARecord.go
RUN sed -i 's/vmName := /\/\/ vmName := /g' /go/src/github.com/infobloxopen/terraform-provider-infoblox/infoblox/resourceARecord.go
RUN sed -i 's/ea\["VM Name"\] = vmName/\/\/ ea["VM Name"] = vmName/g' /go/src/github.com/infobloxopen/terraform-provider-infoblox/infoblox/resourcePTRRecord.go
RUN sed -i 's/ea\["VM ID"\] = vmID/\/\/ ea["VM ID"] = vmID/g' /go/src/github.com/infobloxopen/terraform-provider-infoblox/infoblox/resourcePTRRecord.go
RUN sed -i 's/vmName := /\/\/ vmName := /g' /go/src/github.com/infobloxopen/terraform-provider-infoblox/infoblox/resourcePTRRecord.go
RUN sed -i 's/ea\["VM Name"\] = vmName/\/\/ ea["VM Name"] = vmName/g' /go/src/github.com/infobloxopen/terraform-provider-infoblox/infoblox/resourceIPAllocation.go
RUN sed -i 's/ea\["VM ID"\] = vmID/\/\/ ea["VM ID"] = vmID/g' /go/src/github.com/infobloxopen/terraform-provider-infoblox/infoblox/resourceIPAllocation.go
RUN sed -i 's/ea\["Cloud API Owned"\]/\/\/ ea["Cloud API Owned"]/g' /go/src/github.com/infobloxopen/terraform-provider-infoblox/vendor/github.com/infobloxopen/infoblox-go-client/object_manager.go
RUN sed -i 's/ea\["CMP Type"\]/\/\/ ea["CMP Type"]/g' /go/src/github.com/infobloxopen/terraform-provider-infoblox/vendor/github.com/infobloxopen/infoblox-go-client/object_manager.go
RUN sed -i 's/ea\["Tenant ID"\]/\/\/ ea["Tenant ID"]/g' /go/src/github.com/infobloxopen/terraform-provider-infoblox/vendor/github.com/infobloxopen/infoblox-go-client/object_manager.go
RUN export GO111MODULE="on"
RUN env GOOS=windows GOARCH=amd64 go build -o terraform-provider-infoblox.exe -mod=vendor

In the future, if this project becomes an official Terraform provider, I would hope to not have to make these changes.

@richardsonky
Copy link

I still had some problems after commenting out those lines. Turns out i was able to get this to work by adding the required extensible attributes into infoblox. Go to Administration > Extensible Attributes and then add these as strings:
VM Name
VM ID
Cloud API Owned
CMP Type
Tenant ID

Then i rebuilt the provider using a new copy (no changes) and it successfully worked.

@somashekhar
Copy link
Contributor

Now the feature is available at master branch. Will be available as part of v2.0.0
Will be updating the required documentation on using the same.

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

No branches or pull requests

7 participants