Terraform Cisco IOS-XE Provider

Overview

Tests

Terraform Provider IOS-XE

Requirements

Building The Provider

  1. Clone the repository
  2. Enter the repository directory
  3. Build the provider using the Go install command:
go install

Adding Dependencies

This provider uses Go modules. Please see the Go documentation for the most up to date information about using Go modules.

To add a new dependency github.com/author/dependency to your Terraform provider:

go get github.com/author/dependency
go mod tidy

Then commit the changes to go.mod and go.sum.

Using the provider

This Terraform Provider is available to install automatically via terraform init. If you're building the provider, follow the instructions to install it as a plugin. After placing it into your plugins directory, run terraform init to initialize it.

Additional documentation, including available resources and their arguments/attributes can be found on the Terraform documentation website.

Developing the Provider

If you wish to work on the provider, you'll first need Go installed on your machine (see Requirements above).

To compile the provider, run go install. This will build the provider and put the provider binary in the $GOPATH/bin directory.

To generate or update documentation, run go generate.

In order to run the full suite of Acceptance tests, run make testacc. Make sure the respective environment variables are set (e.g., IOSXE_USERNAME, IOSXE_PASSWORD, IOSXE_URL).

Note: Acceptance tests create real resources.

make testacc
Issues
  • Error: The terraform-provider-iosxe_v0.1.4 plugin crashed!

    Error: The terraform-provider-iosxe_v0.1.4 plugin crashed!

    Terraform Version

    $ terraform -v
    Terraform v1.1.8
    on darwin_amd64
    + provider registry.terraform.io/netascode/iosxe v0.1.4
    
    Your version of Terraform is out of date! The latest version
    is 1.1.9. You can update by downloading from https://www.terraform.io/downloads.html
    

    Go Version

    $ go version
    go version go1.18.2 darwin/amd64
    

    Affected Resource(s)

    Please list the resources as a list, for example:

    • iosxe_static_route

    If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

    Terraform Configuration Files

    https://github.com/muhammad-rafi/terraform-iosxe/blob/main/ntc_iosxe/static_routing.tf

    terraform {
      required_providers {
        iosxe = {
          source  = "netascode/iosxe"
          version = "0.1.4"
        }
      }
    }
    
    # Network To Code iosxe Provider Configuration
    provider "iosxe" {
      alias    = "cisco_sandbox"
      username = "developer"
      password = "C1sco12345"
      url      = "https://sandbox-iosxe-recomm-1.cisco.com"
    }
    
    resource "iosxe_static_route" "static_route" {
      provider   = iosxe.cisco_sandbox
      device = "sandbox-iosxe-recomm-1.cisco.com"
      prefix = "10.0.0.10"
      mask   = "255.255.255.0"
      next_hops = [
        {
          next_hop  = "10.0.0.1"
          metric    = 10
          global    = false
          name      = "terraform_route"
          permanent = true
          tag       = 100
        }
      ]
    }
    

    Debug Output

    https://gist.github.com/muhammad-rafi/8c2b8e6ef2fd74d596ed54694fc3991b

    Expected Behavior

    It should configure the static route on the iosxe device

    Actual Behavior

    Error: The terraform-provider-iosxe_v0.1.4 plugin crashed!

    Steps to Reproduce

    Please list the steps required to reproduce the issue, for example:

    1. terraform plan
    2. terraform apply -auto-approve
    opened by muhammad-rafi 3
  • bugfix: add missing Cisco-IOS-XE-ospf model

    bugfix: add missing Cisco-IOS-XE-ospf model

    Running generator on freshly pulled repo was getting panic. Traced to missing model in load models.

    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x98 pc=0x5cd507]
    
    goroutine 1 [running]:
    main.resolvePath(0xc018965080, {0xc000094854?, 0xc0000b0600?})
            /home/justinr/netascode/terraform-provider-iosxe/gen/generator.go:258 +0x1a7
    main.augmentConfig(0xc0001566e8, {0xc0000b0600, 0x1f, 0x20})
            /home/justinr/netascode/terraform-provider-iosxe/gen/generator.go:366 +0xeb
    main.main()
            /home/justinr/netascode/terraform-provider-iosxe/gen/generator.go:471 +0x333
    exit status 2
    
    opened by poroping 3
  • Bump github.com/hashicorp/terraform-plugin-docs from 0.8.0 to 0.8.1

    Bump github.com/hashicorp/terraform-plugin-docs from 0.8.0 to 0.8.1

    Bumps github.com/hashicorp/terraform-plugin-docs from 0.8.0 to 0.8.1.

    Release notes

    Sourced from github.com/hashicorp/terraform-plugin-docs's releases.

    v0.8.1

    BUG FIXES:

    Changelog

    Sourced from github.com/hashicorp/terraform-plugin-docs's changelog.

    0.8.1 (May 10, 2022)

    BUG FIXES:

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies go 
    opened by dependabot[bot] 0
  • Bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.15.0 to 2.16.0

    Bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.15.0 to 2.16.0

    Bumps github.com/hashicorp/terraform-plugin-sdk/v2 from 2.15.0 to 2.16.0.

    Release notes

    Sourced from github.com/hashicorp/terraform-plugin-sdk/v2's releases.

    v2.16.0

    ENHANCEMENTS:

    • helper/resource: Added error logging before failing tests, so errors are visible in test output and any separate log file (#958)

    BUG FIXES:

    Changelog

    Sourced from github.com/hashicorp/terraform-plugin-sdk/v2's changelog.

    2.16.0 (May 10, 2022)

    ENHANCEMENTS:

    • helper/resource: Added error logging before failing tests, so errors are visible in test output and any separate log file (#958)

    BUG FIXES:

    Commits
    • 6d1ca8f CHANGELOG for 2.16.0 (#961)
    • 6f07704 build(deps): Bump github.com/hashicorp/hc-install from 0.3.1 to 0.3.2 (#960)
    • c31391d website: Migrate documentation from terraform-website to project repository (...
    • 48310fc Add team-tw-packer-and-terraform to CODEOWNERS for website page changes (#959)
    • 0f5a544 helper/resource: Added error logging before failing tests (#958)
    • 68ff107 internal/logging: Add unit testing (#957)
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies go 
    opened by dependabot[bot] 0
  • Bump github.com/hashicorp/terraform-plugin-framework from 0.7.0 to 0.8.0

    Bump github.com/hashicorp/terraform-plugin-framework from 0.7.0 to 0.8.0

    Bumps github.com/hashicorp/terraform-plugin-framework from 0.7.0 to 0.8.0.

    Release notes

    Sourced from github.com/hashicorp/terraform-plugin-framework's releases.

    v0.8.0

    BREAKING CHANGES:

    • diag: Removed Diagnostics type ToTfprotov6Diagnostics() method. This was not intended for usage by provider developers. (#313)
    • tfsdk: The ModifySchemaPlanRequest, ModifySchemaPlanResponse, ValidateSchemaRequest, and ValidateSchemaResponse types have been removed. These were not intended for provider developer usage. (#310)
    • tfsdk: The NewProtocol6Server() function, Serve() function, and ServeOpts type have been removed. Use the providerserver package instead. (#310)
    • tfsdk: The ResourceImportStateNotImplemented() function has been removed. Remove the Resource type ImportState method instead for resources that should not support import. (#312)

    ENHANCEMENTS:

    • tfsdk: Propagated tf_data_source_type, tf_req_id, tf_resource_type, and tf_rpc fields in log entries (#315)

    BUG FIXES:

    • all: Prevented This log was generated by an SDK subsystem logger that wasn't created before being used. warning messages in logging (#314)
    • tfsdk: Prevented Unable to create logging subsystem with AdditionalLocationOffset due to missing root logger options warning logs during acceptance testing (#315)
    Changelog

    Sourced from github.com/hashicorp/terraform-plugin-framework's changelog.

    0.8.0 (May 6, 2022)

    BREAKING CHANGES:

    • diag: Removed Diagnostics type ToTfprotov6Diagnostics() method. This was not intended for usage by provider developers. (#313)
    • tfsdk: The ModifySchemaPlanRequest, ModifySchemaPlanResponse, ValidateSchemaRequest, and ValidateSchemaResponse types have been removed. These were not intended for provider developer usage. (#310)
    • tfsdk: The NewProtocol6Server() function, Serve() function, and ServeOpts type have been removed. Use the providerserver package instead. (#310)
    • tfsdk: The ResourceImportStateNotImplemented() function has been removed. Remove the Resource type ImportState method instead for resources that should not support import. (#312)

    ENHANCEMENTS:

    • tfsdk: Propagated tf_data_source_type, tf_req_id, tf_resource_type, and tf_rpc fields in log entries (#315)

    BUG FIXES:

    • all: Prevented This log was generated by an SDK subsystem logger that wasn't created before being used. warning messages in logging (#314)
    • tfsdk: Prevented Unable to create logging subsystem with AdditionalLocationOffset due to missing root logger options warning logs during acceptance testing (#315)
    Commits
    • 5c07e07 Update CHANGELOG for 0.8.0
    • 555a882 Introduce internal/fwserver package and migrate GetProviderSchema (#319)
    • 93ea6d3 website: Migrate documentation from terraform-website to project repository (...
    • f2848e9 Add team-tw-packer-and-terraform to CODEOWNERS for website page changes (#317)
    • 2abaedc internal: Introduce logging unit testing (#316)
    • 90bffba build(deps): Bump github.com/hashicorp/terraform-plugin-log from 0.3.0 to 0.4...
    • 2529cb0 internal/proto6server: Ensure logging.InitContext is called before any RPC lo...
    • 12176c9 diag: Move (Diagnostics).ToTfprotov6Diagnostics() method to internal/toproto6...
    • 72e4d38 tfsdk: Remove ResourceImportStateNotImplemented() function (#312)
    • 09acc68 tfsdk: Migrate server to internal/proto6server package (#310)
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies go 
    opened by dependabot[bot] 0
  • Bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.14.0 to 2.15.0

    Bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.14.0 to 2.15.0

    Bumps github.com/hashicorp/terraform-plugin-sdk/v2 from 2.14.0 to 2.15.0.

    Release notes

    Sourced from github.com/hashicorp/terraform-plugin-sdk/v2's releases.

    v2.15.0

    FEATURES:

    • helper/resource: New TestCheckResourceAttrWith test helper, that simplifies checking of attribute values via custom functions (#950)

    ENHANCEMENTS:

    • helper/schema: Propagated tf_data_source_type, tf_req_id, tf_resource_type, and tf_rpc fields in log entries (#955)

    BUG FIXES:

    • helper/resource: Prevented Unable to create logging subsystem with AdditionalLocationOffset due to missing root logger options warning logs during acceptance testing (#955)
    Changelog

    Sourced from github.com/hashicorp/terraform-plugin-sdk/v2's changelog.

    2.15.0 (May 4, 2022)

    FEATURES:

    • helper/resource: New TestCheckResourceAttrWith test helper, that simplifies checking of attribute values via custom functions (#950)

    ENHANCEMENTS:

    • helper/schema: Propagated tf_data_source_type, tf_req_id, tf_resource_type, and tf_rpc fields in log entries (#955)

    BUG FIXES:

    • helper/resource: Prevented Unable to create logging subsystem with AdditionalLocationOffset due to missing root logger options warning logs during acceptance testing (#955)
    Commits
    • 790d730 Update CHANGELOG for 2.15.0
    • e952c37 build(deps): bump github.com/hashicorp/terraform-plugin-log from 0.3.0 to 0.4...
    • 5adf5f1 Adding resource.TestCheckResourceAttrWith test utility (#950)
    • bb44c87 build(deps): bump github.com/google/go-cmp from 0.5.7 to 0.5.8 (#947)
    • eebce9f build(deps): bump github.com/hashicorp/hcl/v2 from 2.11.1 to 2.12.0 (#946)
    • 0a0476e build(deps): bump github.com/mitchellh/mapstructure from 1.4.3 to 1.5.0 (#945)
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies go 
    opened by dependabot[bot] 0
  • Bump github.com/hashicorp/terraform-plugin-log from 0.3.0 to 0.4.0

    Bump github.com/hashicorp/terraform-plugin-log from 0.3.0 to 0.4.0

    Bumps github.com/hashicorp/terraform-plugin-log from 0.3.0 to 0.4.0.

    Release notes

    Sourced from github.com/hashicorp/terraform-plugin-log's releases.

    v0.4.0

    NOTES:

    • This Go module has been updated to Go 1.17 per the Go support policy. Any consumers building on earlier Go versions may experience errors. (#51)

    FEATURES:

    • Added tflogtest package, which provides functionality for unit testing of provider logging (#62)
    • Added tfsdklogtest package, which provides functionality for unit testing of SDK logging (#62)

    ENHANCEMENTS:

    • tflog: Added WithRootFields() function, which can copy root logger fields to a new subsystem logger during NewSubsystem() (#60)
    • tfsdklog: Added WithRootFields() function, which can copy root logger fields to a new subsystem logger during NewSubsystem() (#60)

    BUG FIXES:

    • tflog+tfsdklog: Prevented Unable to create logging subsystem with AdditionalLocationOffset due to missing root logger options warning logs during acceptance testing (#58)
    Changelog

    Sourced from github.com/hashicorp/terraform-plugin-log's changelog.

    0.4.0 (May 4, 2022)

    NOTES:

    • This Go module has been updated to Go 1.17 per the Go support policy. Any consumers building on earlier Go versions may experience errors. (#51)

    FEATURES:

    • Added tflogtest package, which provides functionality for unit testing of provider logging (#62)
    • Added tfsdklogtest package, which provides functionality for unit testing of SDK logging (#62)

    ENHANCEMENTS:

    • tflog: Added WithRootFields() function, which can copy root logger fields to a new subsystem logger during NewSubsystem() (#60)
    • tfsdklog: Added WithRootFields() function, which can copy root logger fields to a new subsystem logger during NewSubsystem() (#60)

    BUG FIXES:

    • tflog+tfsdklog: Prevented Unable to create logging subsystem with AdditionalLocationOffset due to missing root logger options warning logs during acceptance testing (#58)
    Commits
    • 40a5980 Update CHANGELOG for 0.4.0
    • f5284c7 Introduce tflogtest and tfsdklogtest packages (#62)
    • 1d9ce94 tflog+tfsdklog: Added WithRootFields() function (#60)
    • 0a383c3 tfsdklog: Ensure sink logger options are propagated to SDK and provider root ...
    • 1d1c445 Bump github.com/google/go-cmp from 0.5.7 to 0.5.8 (#53)
    • 94541a8 Bump Expected Minimum Go Version to 1.17 (#51)
    • 49f9236 Bump actions/setup-go from 2 to 3 (#49)
    • 8062654 Bump actions/upload-artifact from 2 to 3 (#48)
    • 1b8e9d3 Update v0.3.0 CHANGELOG to include other dependency update requirements
    • 1583d7b Update CODEOWNERS with new team name: @​hashicorp/terraform-devex (#45)
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies go 
    opened by dependabot[bot] 0
  • Bump github.com/hashicorp/terraform-plugin-docs from 0.7.0 to 0.8.0

    Bump github.com/hashicorp/terraform-plugin-docs from 0.7.0 to 0.8.0

    Bumps github.com/hashicorp/terraform-plugin-docs from 0.7.0 to 0.8.0.

    Release notes

    Sourced from github.com/hashicorp/terraform-plugin-docs's releases.

    v0.8.0

    ENHANCEMENTS:

    • template functions: Added split to help separating a string into substrings (#70).

    BUG FIXES:

    • cmd/tflugindocs: Support for schemas containing empty nested attributes or empty nested blocks (#99, #134).
    • schemamd: Attribute ID is considered "Read Only", unless there's a description defined, in which case it's handled like any other attribute in the schema (#46, #134).
    Changelog

    Sourced from github.com/hashicorp/terraform-plugin-docs's changelog.

    0.8.0 (May 3, 2022)

    ENHANCEMENTS:

    • template functions: Added split to help separating a string into substrings (#70).

    BUG FIXES:

    • cmd/tflugindocs: Support for schemas containing empty nested attributes or empty nested blocks (#99, #134).
    • schemamd: Attribute ID is considered "Read Only", unless there's a description defined, in which case it's handled like any other attribute in the schema (#46, #134).
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies go 
    opened by dependabot[bot] 0
  • Bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.13.0 to 2.14.0

    Bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.13.0 to 2.14.0

    Bumps github.com/hashicorp/terraform-plugin-sdk/v2 from 2.13.0 to 2.14.0.

    Release notes

    Sourced from github.com/hashicorp/terraform-plugin-sdk/v2's releases.

    v2.14.0

    NOTES:

    • This Go module has been updated to Go 1.17 per the Go support policy. Any consumers building on earlier Go versions may experience errors. (#934)

    BUG FIXES:

    • helper/resource: Ensured Terraform CLI logs are written to TF_LOG_PATH_MASK environment variable value when both TF_ACC_LOG_PATH and TF_LOG_PATH_MASK are set (#938)
    • helper/resource: Ensured @caller in SDK logging entries accurately reflected calling code location (#939)
    • helper/resource: Prevented regression since 2.13.0 with the removal of environment variables, including TF_VAR_*, when calling Terraform CLI commands (#937)
    • helper/schema: Ensured @caller in SDK logging entries accurately reflected calling code location (#939)
    • helper/schema: Prevented missing SDK logging entries and confusing provider.stdio TRACE logging entries (#936)
    Changelog

    Sourced from github.com/hashicorp/terraform-plugin-sdk/v2's changelog.

    2.14.0 (April 14, 2022)

    NOTES:

    • This Go module has been updated to Go 1.17 per the Go support policy. Any consumers building on earlier Go versions may experience errors. (#934)

    BUG FIXES:

    • helper/resource: Ensured Terraform CLI logs are written to TF_LOG_PATH_MASK environment variable value when both TF_ACC_LOG_PATH and TF_LOG_PATH_MASK are set (#938)
    • helper/resource: Ensured @caller in SDK logging entries accurately reflected calling code location (#939)
    • helper/resource: Prevented regression since 2.13.0 with the removal of environment variables, including TF_VAR_*, when calling Terraform CLI commands (#937)
    • helper/schema: Ensured @caller in SDK logging entries accurately reflected calling code location (#939)
    • helper/schema: Prevented missing SDK logging entries and confusing provider.stdio TRACE logging entries (#936)
    Commits
    • 4681738 Update CHANGELOG for 2.14.0
    • ea02348 internal/logging: Ensure @caller in SDK subsystem logging entries accuratel...
    • b8263cd helper/resource: Ensure Terraform CLI logs are written to TF_LOG_PATH_MASK ...
    • 5d701f2 all: Replace various log.Printf calls with tfsdklog calls (#940)
    • 466cbe5 build(deps): bump github.com/hashicorp/terraform-exec (#942)
    • c021dfb build(deps): bump github.com/hashicorp/terraform-plugin-go (#941)
    • 08f695a helper/resource: Improve "unsupported test mode" message (#925)
    • 3d0fec0 Update CHANGELOG for #937
    • 85b9ee9 helper/resource: Set CHECKPOINT_DISABLE environment variable outside terrafor...
    • fd9ac3c helper/schema: Prevent missing SDK logging entries and confusing provider.std...
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies go 
    opened by dependabot[bot] 0
  • Bump actions/setup-go from 2 to 3

    Bump actions/setup-go from 2 to 3

    Bumps actions/setup-go from 2 to 3.

    Release notes

    Sourced from actions/setup-go's releases.

    v3.0.0

    What's Changed

    Breaking Changes

    With the update to Node 16, all scripts will now be run with Node 16 rather than Node 12.

    This new major release removes the stable input, so there is no need to specify additional input to use pre-release versions. This release also corrects the pre-release versions syntax to satisfy the SemVer notation (1.18.0-beta1 -> 1.18.0-beta.1, 1.18.0-rc1 -> 1.18.0-rc.1).

    steps:
      - uses: actions/[email protected]
      - uses: actions/[email protected]
        with:
          go-version: '1.18.0-rc.1' 
      - run: go version
    

    Add check-latest input

    In scope of this release we add the check-latest input. If check-latest is set to true, the action first checks if the cached version is the latest one. If the locally cached version is not the most up-to-date, a Go version will then be downloaded from go-versions repository. By default check-latest is set to false. Example of usage:

    steps:
      - uses: actions/[email protected]
      - uses: actions/[email protected]
        with:
          go-version: '1.16'
          check-latest: true
      - run: go version
    

    Moreover, we updated @actions/core from 1.2.6 to 1.6.0

    v2.1.5

    In scope of this release we updated matchers.json to improve the problem matcher pattern. For more information please refer to this pull request

    v2.1.4

    What's Changed

    New Contributors

    Full Changelog: https://github.com/actions/setup-go/compare/v2.1.3...v2.1.4

    v2.1.3

    • Updated communication with runner to use environment files rather then workflow commands

    v2.1.2

    This release includes vendored licenses for this action's npm dependencies.

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 0
  • Bump hashicorp/setup-terraform from 1 to 2

    Bump hashicorp/setup-terraform from 1 to 2

    Bumps hashicorp/setup-terraform from 1 to 2.

    Release notes

    Sourced from hashicorp/setup-terraform's releases.

    v2.0.0

    What's Changed

    NOTES

    ENHANCEMENTS

    INTERNAL

    New Contributors

    Full Changelog: https://github.com/hashicorp/setup-terraform/compare/v1...v2.0.0

    v1.4.0

    What's Changed

    NOTES

    ENHANCEMENTS

    INTERNAL

    ... (truncated)

    Changelog

    Sourced from hashicorp/setup-terraform's changelog.

    [2.0.0] (2022-04-18)

    BREAKING CHANGES:

    NOTES:

    INTERNAL:

    [1.4.0] (2022-04-04)

    NOTES:

    ENHANCEMENTS:

    INTERNAL:

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 0
  • Bug: Ethernet interfaces with / in name

    Bug: Ethernet interfaces with / in name

    Terraform Version

    Terraform v1.1.7

    Affected Resource(s)

    • iosxe_interface_ethernet

    Terraform Configuration Files

    resource "iosxe_interface_ethernet" "example" {
      name = "1/0/21"
      type = "TwentyFiveGigE"
      description = "foobar"
    }
    

    Debug Output

    2022-05-11T13:38:26.249Z [DEBUG] provider.terraform-provider-iosxe: 2022/05/11 13:38:26 [DEBUG] HTTP Request: PATCH, https://172.21.142.23/restconf/data/Cisco-IOS-XE-native:native/interface/TwentyFiveGigE=1/0/21, {{"Cisco-IOS-XE-native:21":{"name":"1/0/21","description":"foobar"}}}
    2022-05-11T13:38:26.256Z [DEBUG] provider.terraform-provider-iosxe: 2022/05/11 13:38:26 [DEBUG] HTTP Response: {
    2022-05-11T13:38:26.256Z [DEBUG] provider.terraform-provider-iosxe:   "ietf-restconf:errors": {
    2022-05-11T13:38:26.256Z [DEBUG] provider.terraform-provider-iosxe:     "error": [
    2022-05-11T13:38:26.256Z [DEBUG] provider.terraform-provider-iosxe:       {
    2022-05-11T13:38:26.256Z [DEBUG] provider.terraform-provider-iosxe:         "error-type": "application",
    2022-05-11T13:38:26.256Z [DEBUG] provider.terraform-provider-iosxe:         "error-tag": "invalid-value",
    2022-05-11T13:38:26.256Z [DEBUG] provider.terraform-provider-iosxe:         "error-message": "uri keypath not found"
    2022-05-11T13:38:26.256Z [DEBUG] provider.terraform-provider-iosxe:       }
    2022-05-11T13:38:26.256Z [DEBUG] provider.terraform-provider-iosxe:     ]
    2022-05-11T13:38:26.256Z [DEBUG] provider.terraform-provider-iosxe:   }
    2022-05-11T13:38:26.256Z [DEBUG] provider.terraform-provider-iosxe: }
    2022-05-11T13:38:26.256Z [DEBUG] provider.terraform-provider-iosxe: 2022/05/11 13:38:26 [ERROR] HTTP Request failed: StatusCode 404, RESTCONF errors {Error:[]} {PatchId: GlobalStatus:{Ok:false Errors:{Error:[]}} EditStatus:{Edit:[]}}
    2022-05-11T13:38:26.256Z [DEBUG] provider.terraform-provider-iosxe: 2022/05/11 13:38:26 [DEBUG] Exit from Do method
    

    Expected Behavior

    Configure TwentyFiveGigE=1/0/21 interface

    Actual Behavior

    iosxe_interface_ethernet.example: Creating...
    ╷
    │ Error: Client Error
    │ 
    │   with iosxe_interface_ethernet.example,
    │   on main.tf line 24, in resource "iosxe_interface_ethernet" "example":
    │   24: resource "iosxe_interface_ethernet" "example" {
    │ 
    │ Failed to configure object (PATCH), got error: HTTP Request failed: StatusCode 404, RESTCONF errors {Error:[]} {PatchId: GlobalStatus:{Ok:false Errors:{Error:[]}} EditStatus:{Edit:[]}}
    

    So there are 2 separate issues that having / in the name causes.

    Path escaping is required in the URL:

    https://172.21.142.23/restconf/data/Cisco-IOS-XE-native:native/interface/TwentyFiveGigE=1/0/21 needs to be https://172.21.142.23/restconf/data/Cisco-IOS-XE-native:native/interface/TwentyFiveGigE=1%2F0%2F21

    I attempted to resolve the path escaping by escaping the value going into the getPath function however this caused issues downstream as this function is used heavily through the resources.

    Incorrect payload:

    {"Cisco-IOS-XE-native:21":{"name":"1/0/21","description":"foobar"}}
    

    should be

    {"Cisco-IOS-XE-native:TwentyFiveGigE":{"name":"1/0/21","description":"foobar"}}
    

    This is an issue with the helpers.LastElement function splitting on the "/".

    opened by poroping 8
Releases(v0.1.4)
Terraform provider to help with various AWS automation tasks (mostly all that stuff we cannot accomplish with the official AWS terraform provider)

terraform-provider-awsutils Terraform provider for performing various tasks that cannot be performed with the official AWS Terraform Provider from Has

Cloud Posse 17 Apr 18, 2022
Terraform Provider for Azure (Resource Manager)Terraform Provider for Azure (Resource Manager)

Terraform Provider for Azure (Resource Manager) Version 2.x of the AzureRM Provider requires Terraform 0.12.x and later, but 1.0 is recommended. Terra

null 0 Oct 16, 2021
Terraform-provider-mailcow - Terraform provider for Mailcow

Terraform Provider Scaffolding (Terraform Plugin SDK) This template repository i

Owen Valentine 0 Dec 31, 2021
Terraform-provider-buddy - Terraform Buddy provider For golang

Terraform Provider for Buddy Documentation Requirements Terraform >= 1.0.11 Go >

Buddy 1 Jan 5, 2022
Terraform-provider-vercel - Terraform Vercel Provider With Golang

Vercel Terraform Provider Website: https://www.terraform.io Documentation: https

Vercel 46 May 11, 2022
Terraform-provider-age - Age Terraform Provider with golang

Age Terraform Provider This provider lets you generate an Age key pair. Using th

ConsenSys Software 0 Feb 15, 2022
kube-champ 33 Apr 21, 2022
Terraform utility provider for constructing bash scripts that use data from a Terraform module

Terraform Bash Provider This is a Terraform utility provider which aims to robustly generate Bash scripts which refer to data that originated in Terra

Martin Atkins 31 Apr 7, 2022
Quick start repository for creating a Terraform provider using terraform-plugin-framework

Terraform Provider Scaffolding (Terraform Plugin Framework) This template repository is built on the Terraform Plugin Framework. The template reposito

HashiCorp 26 May 14, 2022
Terraform Provider Scaffolding (Terraform Plugin SDK)

Terraform Provider Scaffolding (Terraform Plugin SDK) This template repository is built on the Terraform Plugin SDK. The template repository built on

Brian Flad 0 Feb 8, 2022
OpenAPI Terraform Provider that configures itself at runtime with the resources exposed by the service provider (defined in a swagger file)

Terraform Provider OpenAPI This terraform provider aims to minimise as much as possible the efforts needed from service providers to create and mainta

Daniel I. Khan Ramiro 199 May 14, 2022
Hashicups-tf-provider - HashiCups Terraform Provider Tutorial

Terraform Provider HashiCups Run the following command to build the provider go

Andrew Xie 1 Jan 10, 2022
Terraform-grafana-dashboard - Grafana dashboard Terraform module

terraform-grafana-dashboard terraform-grafana-dashboard for project Requirements

hadenlabs 1 May 2, 2022
Puccini-terraform - Enable TOSCA for Terraform using Puccini

(work in progress) TOSCA for Terraform Enable TOSCA for Terraform using Puccini.

Tal Liron 3 Mar 30, 2022
Terraform-ncloud-docs - Terraform-ncloud-docs

terraform-ncloud-docs Overview This docs help to use terraform creation server C

Naver Cloud Platform 1 Mar 4, 2022
Terraform-house - Golang Based terraform automation example using tf.json

Terraform House Manage your own terraform workflow using go language, with the b

Bayu Rizky Ramadhan 0 Feb 17, 2022
LTF is a minimal, transparent Terraform wrapper. It makes Terraform projects easier to work with.

LTF Status: alpha LTF is a minimal, transparent Terraform wrapper. It makes Terraform projects easier to work with. In standard Terraform projects, th

Raymond Butcher 6 Apr 28, 2022
Dredger is a utility to help convert helm charts to Terraform modules using kubernetes provider.

dredger Dredger is a utility to help convert helm charts to Terraform modules using kubernetes provider. Dredger is made of dark magic and cannot full

Synchronoss 12 Apr 19, 2022
Terraform provider for Confluent Platform

Terraform Confluent Platform Provider This is provider for Confluent Platform, not Confluent Cloud. If you're seeking the Confluent Cloud provider, pl

Wayarmy 0 Oct 11, 2021