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

Remove terraform-plugin-mux dependency #254

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bbasata
Copy link

@bbasata bbasata commented Jan 25, 2025

This pull request proposes to remove the terraform-plugin-mux dependency.

This simplifies main.go, reaches parity with the acceptance test provider in TestAccProtoV6ProviderFactories, and means there is one less dependency to keep up with.

(Context: I 💟 DNSimple, I work in Terraform DevEx at HashiCorp, and I am always curious about how people are extending Terraform 😃)

Acceptance test run

This gives no signal on potential regressions, because main() is outside the reach of acceptance tests.

For completeness, here is an acceptance test run. Exactly 1 test fails, unrelated to this change. I imagine it may be something missing in my sandbox environment.

DNSIMPLE_CLEANUP_DOMAINS=true \
DNSIMPLE_ACCOUNT=... \
DNSIMPLE_SANDBOX=true \
DNSIMPLE_TOKEN=... \
DNSIMPLE_CONTACT_ID=... \
DNSIMPLE_REGISTRANT_CHANGE_CONTACT_ID=... \
DNSIMPLE_DOMAIN=... \
DNSIMPLE_REGISTRANT_CHANGE_DOMAIN=... \
  make testacc

=== RUN   TestAccDomainDelegationResource
    domain_delegation_resource_test.go:19: Step 1/4 error: Error running apply: exit status 1

        Error: API returned an error

          with dnsimple_domain_delegation.test,
          on terraform_plugin_test.tf line 12, in resource "dnsimple_domain_delegation" "test":
          12: resource "dnsimple_domain_delegation" "test" {

        Validation failed: missing glue records for ns-998.awsdns-60.net.
--- FAIL: TestAccDomainDelegationResource (1.66s)

Smoke test: build, install, apply

$ make build
==> Checking that code complies with gofmt requirements...
go install

$ cd example
$ terraform apply
╷
│ Warning: Provider development overrides are in effect
│
│ The following provider development overrides are set in the CLI configuration:
│  - dnsimple/dnsimple in /.../.../go/bin
│
│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to become incompatible with published releases.
╵
var.dnsimple_account
  DNSimple Account ID

  Enter a value: 

var.dnsimple_domain
  DNSimple Domain

  Enter a value: gopher.taxi

var.dnsimple_token
  DNSimple API Token

  Enter a value:


Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # dnsimple_zone_record.test-txt will be created
  + resource "dnsimple_zone_record" "test-txt" {
      + id               = (known after apply)
      + name             = "test-tf-txt"
      + name_normalized  = (known after apply)
      + priority         = (known after apply)
      + qualified_name   = (known after apply)
      + ttl              = 3600
      + type             = "TXT"
      + value            = "Hello Terraform!"
      + value_normalized = (known after apply)
      + zone_id          = (known after apply)
      + zone_name        = "gopher.taxi"
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

dnsimple_zone_record.test-txt: Creating...
dnsimple_zone_record.test-txt: Creation complete after 0s [name=test-tf-txt]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

@bbasata bbasata marked this pull request as ready for review January 29, 2025 04:15
@weppos
Copy link
Member

weppos commented Feb 13, 2025

Thanks a lot @bbasata. We'll verify the changes in our upcoming maintenance cycle.

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

Successfully merging this pull request may close these issues.

2 participants