diff --git a/Third_Party_Code/NOTICES.md b/Third_Party_Code/NOTICES.md
index 41e77e64..61b08874 100644
--- a/Third_Party_Code/NOTICES.md
+++ b/Third_Party_Code/NOTICES.md
@@ -3004,6 +3004,381 @@ Exhibit B - “Incompatible With Secondary Licenses” Notice
```
+## github.com/hashicorp/go-retryablehttp
+
+* Name: github.com/hashicorp/go-retryablehttp
+* Version: v0.7.7
+* License: [MPL-2.0](https://github.com/hashicorp/go-retryablehttp/blob/v0.7.7/LICENSE)
+
+```
+Copyright (c) 2015 HashiCorp, Inc.
+
+Mozilla Public License, version 2.0
+
+1. Definitions
+
+1.1. "Contributor"
+
+ means each individual or legal entity that creates, contributes to the
+ creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+
+ means the combination of the Contributions of others (if any) used by a
+ Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+
+ means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+
+ means Source Code Form to which the initial Contributor has attached the
+ notice in Exhibit A, the Executable Form of such Source Code Form, and
+ Modifications of such Source Code Form, in each case including portions
+ thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+ means
+
+ a. that the initial Contributor has attached the notice described in
+ Exhibit B to the Covered Software; or
+
+ b. that the Covered Software was made available under the terms of
+ version 1.1 or earlier of the License, but not also under the terms of
+ a Secondary License.
+
+1.6. "Executable Form"
+
+ means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+
+ means a work that combines Covered Software with other material, in a
+ separate file or files, that is not Covered Software.
+
+1.8. "License"
+
+ means this document.
+
+1.9. "Licensable"
+
+ means having the right to grant, to the maximum extent possible, whether
+ at the time of the initial grant or subsequently, any and all of the
+ rights conveyed by this License.
+
+1.10. "Modifications"
+
+ means any of the following:
+
+ a. any file in Source Code Form that results from an addition to,
+ deletion from, or modification of the contents of Covered Software; or
+
+ b. any new file in Source Code Form that contains any Covered Software.
+
+1.11. "Patent Claims" of a Contributor
+
+ means any patent claim(s), including without limitation, method,
+ process, and apparatus claims, in any patent Licensable by such
+ Contributor that would be infringed, but for the grant of the License,
+ by the making, using, selling, offering for sale, having made, import,
+ or transfer of either its Contributions or its Contributor Version.
+
+1.12. "Secondary License"
+
+ means either the GNU General Public License, Version 2.0, the GNU Lesser
+ General Public License, Version 2.1, the GNU Affero General Public
+ License, Version 3.0, or any later versions of those licenses.
+
+1.13. "Source Code Form"
+
+ means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+
+ means an individual or a legal entity exercising rights under this
+ License. For legal entities, "You" includes any entity that controls, is
+ controlled by, or is under common control with You. For purposes of this
+ definition, "control" means (a) the power, direct or indirect, to cause
+ the direction or management of such entity, whether by contract or
+ otherwise, or (b) ownership of more than fifty percent (50%) of the
+ outstanding shares or beneficial ownership of such entity.
+
+
+2. License Grants and Conditions
+
+2.1. Grants
+
+ Each Contributor hereby grants You a world-wide, royalty-free,
+ non-exclusive license:
+
+ a. under intellectual property rights (other than patent or trademark)
+ Licensable by such Contributor to use, reproduce, make available,
+ modify, display, perform, distribute, and otherwise exploit its
+ Contributions, either on an unmodified basis, with Modifications, or
+ as part of a Larger Work; and
+
+ b. under Patent Claims of such Contributor to make, use, sell, offer for
+ sale, have made, import, and otherwise transfer either its
+ Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+ The licenses granted in Section 2.1 with respect to any Contribution
+ become effective for each Contribution on the date the Contributor first
+ distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+ The licenses granted in this Section 2 are the only rights granted under
+ this License. No additional rights or licenses will be implied from the
+ distribution or licensing of Covered Software under this License.
+ Notwithstanding Section 2.1(b) above, no patent license is granted by a
+ Contributor:
+
+ a. for any code that a Contributor has removed from Covered Software; or
+
+ b. for infringements caused by: (i) Your and any other third party's
+ modifications of Covered Software, or (ii) the combination of its
+ Contributions with other software (except as part of its Contributor
+ Version); or
+
+ c. under Patent Claims infringed by Covered Software in the absence of
+ its Contributions.
+
+ This License does not grant any rights in the trademarks, service marks,
+ or logos of any Contributor (except as may be necessary to comply with
+ the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+ No Contributor makes additional grants as a result of Your choice to
+ distribute the Covered Software under a subsequent version of this
+ License (see Section 10.2) or under the terms of a Secondary License (if
+ permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+ Each Contributor represents that the Contributor believes its
+ Contributions are its original creation(s) or it has sufficient rights to
+ grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+ This License is not intended to limit any rights You have under
+ applicable copyright doctrines of fair use, fair dealing, or other
+ equivalents.
+
+2.7. Conditions
+
+ Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
+ Section 2.1.
+
+
+3. Responsibilities
+
+3.1. Distribution of Source Form
+
+ All distribution of Covered Software in Source Code Form, including any
+ Modifications that You create or to which You contribute, must be under
+ the terms of this License. You must inform recipients that the Source
+ Code Form of the Covered Software is governed by the terms of this
+ License, and how they can obtain a copy of this License. You may not
+ attempt to alter or restrict the recipients' rights in the Source Code
+ Form.
+
+3.2. Distribution of Executable Form
+
+ If You distribute Covered Software in Executable Form then:
+
+ a. such Covered Software must also be made available in Source Code Form,
+ as described in Section 3.1, and You must inform recipients of the
+ Executable Form how they can obtain a copy of such Source Code Form by
+ reasonable means in a timely manner, at a charge no more than the cost
+ of distribution to the recipient; and
+
+ b. You may distribute such Executable Form under the terms of this
+ License, or sublicense it under different terms, provided that the
+ license for the Executable Form does not attempt to limit or alter the
+ recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+ You may create and distribute a Larger Work under terms of Your choice,
+ provided that You also comply with the requirements of this License for
+ the Covered Software. If the Larger Work is a combination of Covered
+ Software with a work governed by one or more Secondary Licenses, and the
+ Covered Software is not Incompatible With Secondary Licenses, this
+ License permits You to additionally distribute such Covered Software
+ under the terms of such Secondary License(s), so that the recipient of
+ the Larger Work may, at their option, further distribute the Covered
+ Software under the terms of either this License or such Secondary
+ License(s).
+
+3.4. Notices
+
+ You may not remove or alter the substance of any license notices
+ (including copyright notices, patent notices, disclaimers of warranty, or
+ limitations of liability) contained within the Source Code Form of the
+ Covered Software, except that You may alter any license notices to the
+ extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+ You may choose to offer, and to charge a fee for, warranty, support,
+ indemnity or liability obligations to one or more recipients of Covered
+ Software. However, You may do so only on Your own behalf, and not on
+ behalf of any Contributor. You must make it absolutely clear that any
+ such warranty, support, indemnity, or liability obligation is offered by
+ You alone, and You hereby agree to indemnify every Contributor for any
+ liability incurred by such Contributor as a result of warranty, support,
+ indemnity or liability terms You offer. You may include additional
+ disclaimers of warranty and limitations of liability specific to any
+ jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+
+ If it is impossible for You to comply with any of the terms of this License
+ with respect to some or all of the Covered Software due to statute,
+ judicial order, or regulation then You must: (a) comply with the terms of
+ this License to the maximum extent possible; and (b) describe the
+ limitations and the code they affect. Such description must be placed in a
+ text file included with all distributions of the Covered Software under
+ this License. Except to the extent prohibited by statute or regulation,
+ such description must be sufficiently detailed for a recipient of ordinary
+ skill to be able to understand it.
+
+5. Termination
+
+5.1. The rights granted under this License will terminate automatically if You
+ fail to comply with any of its terms. However, if You become compliant,
+ then the rights granted under this License from a particular Contributor
+ are reinstated (a) provisionally, unless and until such Contributor
+ explicitly and finally terminates Your grants, and (b) on an ongoing
+ basis, if such Contributor fails to notify You of the non-compliance by
+ some reasonable means prior to 60 days after You have come back into
+ compliance. Moreover, Your grants from a particular Contributor are
+ reinstated on an ongoing basis if such Contributor notifies You of the
+ non-compliance by some reasonable means, this is the first time You have
+ received notice of non-compliance with this License from such
+ Contributor, and You become compliant prior to 30 days after Your receipt
+ of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+ infringement claim (excluding declaratory judgment actions,
+ counter-claims, and cross-claims) alleging that a Contributor Version
+ directly or indirectly infringes any patent, then the rights granted to
+ You by any and all Contributors for the Covered Software under Section
+ 2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
+ license agreements (excluding distributors and resellers) which have been
+ validly granted by You or Your distributors under this License prior to
+ termination shall survive termination.
+
+6. Disclaimer of Warranty
+
+ Covered Software is provided under this License on an "as is" basis,
+ without warranty of any kind, either expressed, implied, or statutory,
+ including, without limitation, warranties that the Covered Software is free
+ of defects, merchantable, fit for a particular purpose or non-infringing.
+ The entire risk as to the quality and performance of the Covered Software
+ is with You. Should any Covered Software prove defective in any respect,
+ You (not any Contributor) assume the cost of any necessary servicing,
+ repair, or correction. This disclaimer of warranty constitutes an essential
+ part of this License. No use of any Covered Software is authorized under
+ this License except under this disclaimer.
+
+7. Limitation of Liability
+
+ Under no circumstances and under no legal theory, whether tort (including
+ negligence), contract, or otherwise, shall any Contributor, or anyone who
+ distributes Covered Software as permitted above, be liable to You for any
+ direct, indirect, special, incidental, or consequential damages of any
+ character including, without limitation, damages for lost profits, loss of
+ goodwill, work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses, even if such party shall have been
+ informed of the possibility of such damages. This limitation of liability
+ shall not apply to liability for death or personal injury resulting from
+ such party's negligence to the extent applicable law prohibits such
+ limitation. Some jurisdictions do not allow the exclusion or limitation of
+ incidental or consequential damages, so this exclusion and limitation may
+ not apply to You.
+
+8. Litigation
+
+ Any litigation relating to this License may be brought only in the courts
+ of a jurisdiction where the defendant maintains its principal place of
+ business and such litigation shall be governed by laws of that
+ jurisdiction, without reference to its conflict-of-law provisions. Nothing
+ in this Section shall prevent a party's ability to bring cross-claims or
+ counter-claims.
+
+9. Miscellaneous
+
+ This License represents the complete agreement concerning the subject
+ matter hereof. If any provision of this License is held to be
+ unenforceable, such provision shall be reformed only to the extent
+ necessary to make it enforceable. Any law or regulation which provides that
+ the language of a contract shall be construed against the drafter shall not
+ be used to construe this License against a Contributor.
+
+
+10. Versions of the License
+
+10.1. New Versions
+
+ Mozilla Foundation is the license steward. Except as provided in Section
+ 10.3, no one other than the license steward has the right to modify or
+ publish new versions of this License. Each version will be given a
+ distinguishing version number.
+
+10.2. Effect of New Versions
+
+ You may distribute the Covered Software under the terms of the version
+ of the License under which You originally received the Covered Software,
+ or under the terms of any subsequent version published by the license
+ steward.
+
+10.3. Modified Versions
+
+ If you create software not governed by this License, and you want to
+ create a new license for such software, you may create and use a
+ modified version of this License if you rename the license and remove
+ any references to the name of the license steward (except to note that
+ such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+ Licenses If You choose to distribute Source Code Form that is
+ Incompatible With Secondary Licenses under the terms of this version of
+ the License, the notice described in Exhibit B of this License must be
+ attached.
+
+Exhibit A - Source Code Form License Notice
+
+ This Source Code Form is subject to the
+ terms of the Mozilla Public License, v.
+ 2.0. If a copy of the MPL was not
+ distributed with this file, You can
+ obtain one at
+ http://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular file,
+then You may include the notice in a location (such as a LICENSE file in a
+relevant directory) where a recipient would be likely to look for such a
+notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+
+ This Source Code Form is "Incompatible
+ With Secondary Licenses", as defined by
+ the Mozilla Public License, v. 2.0.
+
+
+```
+
## github.com/hashicorp/go-uuid
* Name: github.com/hashicorp/go-uuid
@@ -3748,8 +4123,8 @@ Exhibit B - “Incompatible With Secondary Licenses” Notice
## github.com/hashicorp/hc-install
* Name: github.com/hashicorp/hc-install
-* Version: v0.6.4
-* License: [MPL-2.0](https://github.com/hashicorp/hc-install/blob/v0.6.4/LICENSE)
+* Version: v0.9.0
+* License: [MPL-2.0](https://github.com/hashicorp/hc-install/blob/v0.9.0/LICENSE)
```
Copyright (c) 2020 HashiCorp, Inc.
@@ -5247,8 +5622,8 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice
## github.com/hashicorp/terraform-json
* Name: github.com/hashicorp/terraform-json
-* Version: v0.22.1
-* License: [MPL-2.0](https://github.com/hashicorp/terraform-json/blob/v0.22.1/LICENSE)
+* Version: v0.23.0
+* License: [MPL-2.0](https://github.com/hashicorp/terraform-json/blob/v0.23.0/LICENSE)
```
Copyright (c) 2019 HashiCorp, Inc.
@@ -10370,8 +10745,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
## github.com/zclconf/go-cty/cty
* Name: github.com/zclconf/go-cty/cty
-* Version: v1.14.4
-* License: [MIT](https://github.com/zclconf/go-cty/blob/v1.14.4/LICENSE)
+* Version: v1.15.0
+* License: [MIT](https://github.com/zclconf/go-cty/blob/v1.15.0/LICENSE)
```
MIT License
@@ -10475,11 +10850,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
## golang.org/x/mod
* Name: golang.org/x/mod
-* Version: v0.19.0
-* License: [BSD-3-Clause](https://cs.opensource.google/go/x/mod/+/v0.19.0:LICENSE)
+* Version: v0.21.0
+* License: [BSD-3-Clause](https://cs.opensource.google/go/x/mod/+/v0.21.0:LICENSE)
```
-Copyright (c) 2009 The Go Authors. All rights reserved.
+Copyright 2009 The Go Authors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -10491,7 +10866,7 @@ notice, this list of conditions and the following disclaimer.
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
- * Neither the name of Google Inc. nor the names of its
+ * Neither the name of Google LLC nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
@@ -10549,8 +10924,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
## golang.org/x/text
* Name: golang.org/x/text
-* Version: v0.17.0
-* License: [BSD-3-Clause](https://cs.opensource.google/go/x/text/+/v0.17.0:LICENSE)
+* Version: v0.20.0
+* License: [BSD-3-Clause](https://cs.opensource.google/go/x/text/+/v0.20.0:LICENSE)
```
Copyright 2009 The Go Authors.
diff --git a/Third_Party_Code/github.com/hashicorp/go-retryablehttp/LICENSE b/Third_Party_Code/github.com/hashicorp/go-retryablehttp/LICENSE
new file mode 100644
index 00000000..f4f97ee5
--- /dev/null
+++ b/Third_Party_Code/github.com/hashicorp/go-retryablehttp/LICENSE
@@ -0,0 +1,365 @@
+Copyright (c) 2015 HashiCorp, Inc.
+
+Mozilla Public License, version 2.0
+
+1. Definitions
+
+1.1. "Contributor"
+
+ means each individual or legal entity that creates, contributes to the
+ creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+
+ means the combination of the Contributions of others (if any) used by a
+ Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+
+ means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+
+ means Source Code Form to which the initial Contributor has attached the
+ notice in Exhibit A, the Executable Form of such Source Code Form, and
+ Modifications of such Source Code Form, in each case including portions
+ thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+ means
+
+ a. that the initial Contributor has attached the notice described in
+ Exhibit B to the Covered Software; or
+
+ b. that the Covered Software was made available under the terms of
+ version 1.1 or earlier of the License, but not also under the terms of
+ a Secondary License.
+
+1.6. "Executable Form"
+
+ means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+
+ means a work that combines Covered Software with other material, in a
+ separate file or files, that is not Covered Software.
+
+1.8. "License"
+
+ means this document.
+
+1.9. "Licensable"
+
+ means having the right to grant, to the maximum extent possible, whether
+ at the time of the initial grant or subsequently, any and all of the
+ rights conveyed by this License.
+
+1.10. "Modifications"
+
+ means any of the following:
+
+ a. any file in Source Code Form that results from an addition to,
+ deletion from, or modification of the contents of Covered Software; or
+
+ b. any new file in Source Code Form that contains any Covered Software.
+
+1.11. "Patent Claims" of a Contributor
+
+ means any patent claim(s), including without limitation, method,
+ process, and apparatus claims, in any patent Licensable by such
+ Contributor that would be infringed, but for the grant of the License,
+ by the making, using, selling, offering for sale, having made, import,
+ or transfer of either its Contributions or its Contributor Version.
+
+1.12. "Secondary License"
+
+ means either the GNU General Public License, Version 2.0, the GNU Lesser
+ General Public License, Version 2.1, the GNU Affero General Public
+ License, Version 3.0, or any later versions of those licenses.
+
+1.13. "Source Code Form"
+
+ means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+
+ means an individual or a legal entity exercising rights under this
+ License. For legal entities, "You" includes any entity that controls, is
+ controlled by, or is under common control with You. For purposes of this
+ definition, "control" means (a) the power, direct or indirect, to cause
+ the direction or management of such entity, whether by contract or
+ otherwise, or (b) ownership of more than fifty percent (50%) of the
+ outstanding shares or beneficial ownership of such entity.
+
+
+2. License Grants and Conditions
+
+2.1. Grants
+
+ Each Contributor hereby grants You a world-wide, royalty-free,
+ non-exclusive license:
+
+ a. under intellectual property rights (other than patent or trademark)
+ Licensable by such Contributor to use, reproduce, make available,
+ modify, display, perform, distribute, and otherwise exploit its
+ Contributions, either on an unmodified basis, with Modifications, or
+ as part of a Larger Work; and
+
+ b. under Patent Claims of such Contributor to make, use, sell, offer for
+ sale, have made, import, and otherwise transfer either its
+ Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+ The licenses granted in Section 2.1 with respect to any Contribution
+ become effective for each Contribution on the date the Contributor first
+ distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+ The licenses granted in this Section 2 are the only rights granted under
+ this License. No additional rights or licenses will be implied from the
+ distribution or licensing of Covered Software under this License.
+ Notwithstanding Section 2.1(b) above, no patent license is granted by a
+ Contributor:
+
+ a. for any code that a Contributor has removed from Covered Software; or
+
+ b. for infringements caused by: (i) Your and any other third party's
+ modifications of Covered Software, or (ii) the combination of its
+ Contributions with other software (except as part of its Contributor
+ Version); or
+
+ c. under Patent Claims infringed by Covered Software in the absence of
+ its Contributions.
+
+ This License does not grant any rights in the trademarks, service marks,
+ or logos of any Contributor (except as may be necessary to comply with
+ the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+ No Contributor makes additional grants as a result of Your choice to
+ distribute the Covered Software under a subsequent version of this
+ License (see Section 10.2) or under the terms of a Secondary License (if
+ permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+ Each Contributor represents that the Contributor believes its
+ Contributions are its original creation(s) or it has sufficient rights to
+ grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+ This License is not intended to limit any rights You have under
+ applicable copyright doctrines of fair use, fair dealing, or other
+ equivalents.
+
+2.7. Conditions
+
+ Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
+ Section 2.1.
+
+
+3. Responsibilities
+
+3.1. Distribution of Source Form
+
+ All distribution of Covered Software in Source Code Form, including any
+ Modifications that You create or to which You contribute, must be under
+ the terms of this License. You must inform recipients that the Source
+ Code Form of the Covered Software is governed by the terms of this
+ License, and how they can obtain a copy of this License. You may not
+ attempt to alter or restrict the recipients' rights in the Source Code
+ Form.
+
+3.2. Distribution of Executable Form
+
+ If You distribute Covered Software in Executable Form then:
+
+ a. such Covered Software must also be made available in Source Code Form,
+ as described in Section 3.1, and You must inform recipients of the
+ Executable Form how they can obtain a copy of such Source Code Form by
+ reasonable means in a timely manner, at a charge no more than the cost
+ of distribution to the recipient; and
+
+ b. You may distribute such Executable Form under the terms of this
+ License, or sublicense it under different terms, provided that the
+ license for the Executable Form does not attempt to limit or alter the
+ recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+ You may create and distribute a Larger Work under terms of Your choice,
+ provided that You also comply with the requirements of this License for
+ the Covered Software. If the Larger Work is a combination of Covered
+ Software with a work governed by one or more Secondary Licenses, and the
+ Covered Software is not Incompatible With Secondary Licenses, this
+ License permits You to additionally distribute such Covered Software
+ under the terms of such Secondary License(s), so that the recipient of
+ the Larger Work may, at their option, further distribute the Covered
+ Software under the terms of either this License or such Secondary
+ License(s).
+
+3.4. Notices
+
+ You may not remove or alter the substance of any license notices
+ (including copyright notices, patent notices, disclaimers of warranty, or
+ limitations of liability) contained within the Source Code Form of the
+ Covered Software, except that You may alter any license notices to the
+ extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+ You may choose to offer, and to charge a fee for, warranty, support,
+ indemnity or liability obligations to one or more recipients of Covered
+ Software. However, You may do so only on Your own behalf, and not on
+ behalf of any Contributor. You must make it absolutely clear that any
+ such warranty, support, indemnity, or liability obligation is offered by
+ You alone, and You hereby agree to indemnify every Contributor for any
+ liability incurred by such Contributor as a result of warranty, support,
+ indemnity or liability terms You offer. You may include additional
+ disclaimers of warranty and limitations of liability specific to any
+ jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+
+ If it is impossible for You to comply with any of the terms of this License
+ with respect to some or all of the Covered Software due to statute,
+ judicial order, or regulation then You must: (a) comply with the terms of
+ this License to the maximum extent possible; and (b) describe the
+ limitations and the code they affect. Such description must be placed in a
+ text file included with all distributions of the Covered Software under
+ this License. Except to the extent prohibited by statute or regulation,
+ such description must be sufficiently detailed for a recipient of ordinary
+ skill to be able to understand it.
+
+5. Termination
+
+5.1. The rights granted under this License will terminate automatically if You
+ fail to comply with any of its terms. However, if You become compliant,
+ then the rights granted under this License from a particular Contributor
+ are reinstated (a) provisionally, unless and until such Contributor
+ explicitly and finally terminates Your grants, and (b) on an ongoing
+ basis, if such Contributor fails to notify You of the non-compliance by
+ some reasonable means prior to 60 days after You have come back into
+ compliance. Moreover, Your grants from a particular Contributor are
+ reinstated on an ongoing basis if such Contributor notifies You of the
+ non-compliance by some reasonable means, this is the first time You have
+ received notice of non-compliance with this License from such
+ Contributor, and You become compliant prior to 30 days after Your receipt
+ of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+ infringement claim (excluding declaratory judgment actions,
+ counter-claims, and cross-claims) alleging that a Contributor Version
+ directly or indirectly infringes any patent, then the rights granted to
+ You by any and all Contributors for the Covered Software under Section
+ 2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
+ license agreements (excluding distributors and resellers) which have been
+ validly granted by You or Your distributors under this License prior to
+ termination shall survive termination.
+
+6. Disclaimer of Warranty
+
+ Covered Software is provided under this License on an "as is" basis,
+ without warranty of any kind, either expressed, implied, or statutory,
+ including, without limitation, warranties that the Covered Software is free
+ of defects, merchantable, fit for a particular purpose or non-infringing.
+ The entire risk as to the quality and performance of the Covered Software
+ is with You. Should any Covered Software prove defective in any respect,
+ You (not any Contributor) assume the cost of any necessary servicing,
+ repair, or correction. This disclaimer of warranty constitutes an essential
+ part of this License. No use of any Covered Software is authorized under
+ this License except under this disclaimer.
+
+7. Limitation of Liability
+
+ Under no circumstances and under no legal theory, whether tort (including
+ negligence), contract, or otherwise, shall any Contributor, or anyone who
+ distributes Covered Software as permitted above, be liable to You for any
+ direct, indirect, special, incidental, or consequential damages of any
+ character including, without limitation, damages for lost profits, loss of
+ goodwill, work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses, even if such party shall have been
+ informed of the possibility of such damages. This limitation of liability
+ shall not apply to liability for death or personal injury resulting from
+ such party's negligence to the extent applicable law prohibits such
+ limitation. Some jurisdictions do not allow the exclusion or limitation of
+ incidental or consequential damages, so this exclusion and limitation may
+ not apply to You.
+
+8. Litigation
+
+ Any litigation relating to this License may be brought only in the courts
+ of a jurisdiction where the defendant maintains its principal place of
+ business and such litigation shall be governed by laws of that
+ jurisdiction, without reference to its conflict-of-law provisions. Nothing
+ in this Section shall prevent a party's ability to bring cross-claims or
+ counter-claims.
+
+9. Miscellaneous
+
+ This License represents the complete agreement concerning the subject
+ matter hereof. If any provision of this License is held to be
+ unenforceable, such provision shall be reformed only to the extent
+ necessary to make it enforceable. Any law or regulation which provides that
+ the language of a contract shall be construed against the drafter shall not
+ be used to construe this License against a Contributor.
+
+
+10. Versions of the License
+
+10.1. New Versions
+
+ Mozilla Foundation is the license steward. Except as provided in Section
+ 10.3, no one other than the license steward has the right to modify or
+ publish new versions of this License. Each version will be given a
+ distinguishing version number.
+
+10.2. Effect of New Versions
+
+ You may distribute the Covered Software under the terms of the version
+ of the License under which You originally received the Covered Software,
+ or under the terms of any subsequent version published by the license
+ steward.
+
+10.3. Modified Versions
+
+ If you create software not governed by this License, and you want to
+ create a new license for such software, you may create and use a
+ modified version of this License if you rename the license and remove
+ any references to the name of the license steward (except to note that
+ such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+ Licenses If You choose to distribute Source Code Form that is
+ Incompatible With Secondary Licenses under the terms of this version of
+ the License, the notice described in Exhibit B of this License must be
+ attached.
+
+Exhibit A - Source Code Form License Notice
+
+ This Source Code Form is subject to the
+ terms of the Mozilla Public License, v.
+ 2.0. If a copy of the MPL was not
+ distributed with this file, You can
+ obtain one at
+ http://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular file,
+then You may include the notice in a location (such as a LICENSE file in a
+relevant directory) where a recipient would be likely to look for such a
+notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+
+ This Source Code Form is "Incompatible
+ With Secondary Licenses", as defined by
+ the Mozilla Public License, v. 2.0.
+
diff --git a/Third_Party_Code/golang.org/x/mod/LICENSE b/Third_Party_Code/golang.org/x/mod/LICENSE
index 6a66aea5..2a7cf70d 100644
--- a/Third_Party_Code/golang.org/x/mod/LICENSE
+++ b/Third_Party_Code/golang.org/x/mod/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2009 The Go Authors. All rights reserved.
+Copyright 2009 The Go Authors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer.
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
- * Neither the name of Google Inc. nor the names of its
+ * Neither the name of Google LLC nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
diff --git a/apstra/authentication/token.go b/apstra/authentication/token.go
new file mode 100644
index 00000000..0bfc7928
--- /dev/null
+++ b/apstra/authentication/token.go
@@ -0,0 +1,107 @@
+package authentication
+
+import (
+ "context"
+ "encoding/base64"
+ "encoding/json"
+ "fmt"
+ "strings"
+ "time"
+
+ "github.com/Juniper/terraform-provider-apstra/apstra/private"
+ "github.com/hashicorp/terraform-plugin-framework-validators/int64validator"
+ "github.com/hashicorp/terraform-plugin-framework/diag"
+ ephemeralSchema "github.com/hashicorp/terraform-plugin-framework/ephemeral/schema"
+ "github.com/hashicorp/terraform-plugin-framework/schema/validator"
+ "github.com/hashicorp/terraform-plugin-framework/types"
+)
+
+const apiTokenDefaultWarning = 60
+
+type ApiToken struct {
+ Value types.String `tfsdk:"value"`
+ SessionId types.String `tfsdk:"session_id"`
+ UserName types.String `tfsdk:"user_name"`
+ WarnSeconds types.Int64 `tfsdk:"warn_seconds"`
+ ExpiresAt time.Time `tfsdk:"-"`
+ DoNotLogOut types.Bool `tfsdk:"do_not_log_out"`
+}
+
+func (o ApiToken) EphemeralAttributes() map[string]ephemeralSchema.Attribute {
+ return map[string]ephemeralSchema.Attribute{
+ "value": ephemeralSchema.StringAttribute{
+ Computed: true,
+ MarkdownDescription: "The API token value.",
+ },
+ "session_id": ephemeralSchema.StringAttribute{
+ Computed: true,
+ MarkdownDescription: "The API session ID associated with the token.",
+ },
+ "user_name": ephemeralSchema.StringAttribute{
+ Computed: true,
+ MarkdownDescription: "The user name associated with the session ID.",
+ },
+ "warn_seconds": ephemeralSchema.Int64Attribute{
+ Optional: true,
+ Computed: true,
+ MarkdownDescription: fmt.Sprintf("Terraform will produce a warning when the token value is "+
+ "referenced with less than this amount of time remaining before expiration. Note that "+
+ "determination of remaining token lifetime depends on clock sync between the Apstra server and "+
+ "the Terraform host. Value `0` disables warnings. Default value is `%d`.", apiTokenDefaultWarning),
+ Validators: []validator.Int64{int64validator.AtLeast(0)},
+ },
+ "do_not_log_out": ephemeralSchema.BoolAttribute{
+ Optional: true,
+ MarkdownDescription: "By default, API sessions are closed when Terraform's `Close` operation calls " +
+ "`logout`. Set this value to `true` to prevent ending the session when Terraform determines the " +
+ "API key is no longer in use.",
+ },
+ }
+}
+
+func (o *ApiToken) LoadApiData(_ context.Context, in string, diags *diag.Diagnostics) {
+ parts := strings.Split(in, ".")
+ if len(parts) != 3 {
+ diags.AddError("unexpected API response", fmt.Sprintf("JWT should have 3 parts, got %d", len(parts)))
+ return
+ }
+
+ claimsB64 := parts[1] + strings.Repeat("=", (4-len(parts[1])%4)%4) // pad the b64 part as necessary
+ claimsBytes, err := base64.StdEncoding.DecodeString(claimsB64)
+ if err != nil {
+ diags.AddError("failed base64 decoding token claims", err.Error())
+ return
+ }
+
+ var claims struct {
+ Username string `json:"username"`
+ UserSession string `json:"user_session"`
+ Expiration int64 `json:"exp"`
+ }
+ err = json.Unmarshal(claimsBytes, &claims)
+ if err != nil {
+ diags.AddError("failed unmarshaling token claims JSON payload", err.Error())
+ return
+ }
+
+ o.Value = types.StringValue(in)
+ o.UserName = types.StringValue(claims.Username)
+ o.SessionId = types.StringValue(claims.UserSession)
+ o.ExpiresAt = time.Unix(claims.Expiration, 0)
+}
+
+func (o *ApiToken) SetDefaults() {
+ if o.WarnSeconds.IsNull() {
+ o.WarnSeconds = types.Int64Value(apiTokenDefaultWarning)
+ }
+}
+
+func (o *ApiToken) SetPrivateState(ctx context.Context, ps private.State, diags *diag.Diagnostics) {
+ privateEphemeralApiToken := private.EphemeralApiToken{
+ Token: o.Value.ValueString(),
+ ExpiresAt: o.ExpiresAt,
+ WarnThreshold: time.Duration(o.WarnSeconds.ValueInt64()) * time.Second,
+ DoNotLogOut: o.DoNotLogOut.ValueBool(),
+ }
+ privateEphemeralApiToken.SetPrivateState(ctx, ps, diags)
+}
diff --git a/apstra/configure_data_source.go b/apstra/configure_data_source.go
index 62dd343f..41bb7a93 100644
--- a/apstra/configure_data_source.go
+++ b/apstra/configure_data_source.go
@@ -3,6 +3,7 @@ package tfapstra
import (
"context"
"fmt"
+
"github.com/Juniper/apstra-go-sdk/apstra"
"github.com/hashicorp/terraform-plugin-framework/datasource"
)
@@ -48,5 +49,4 @@ func configureDataSource(_ context.Context, ds datasource.DataSourceWithConfigur
if ds, ok := ds.(datasourceWithSetFfBpClientFunc); ok {
ds.setBpClientFunc(pd.getFreeformClient)
}
-
}
diff --git a/apstra/configure_ephemeral.go b/apstra/configure_ephemeral.go
new file mode 100644
index 00000000..a2d7c310
--- /dev/null
+++ b/apstra/configure_ephemeral.go
@@ -0,0 +1,52 @@
+package tfapstra
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/Juniper/apstra-go-sdk/apstra"
+ "github.com/hashicorp/terraform-plugin-framework/ephemeral"
+)
+
+type ephemeralWithSetClient interface {
+ ephemeral.EphemeralResourceWithConfigure
+ setClient(*apstra.Client)
+}
+
+type ephemeralWithSetDcBpClientFunc interface {
+ ephemeral.EphemeralResourceWithConfigure
+ setBpClientFunc(func(context.Context, string) (*apstra.TwoStageL3ClosClient, error))
+}
+
+type ephemeralWithSetFfBpClientFunc interface {
+ ephemeral.EphemeralResourceWithConfigure
+ setBpClientFunc(func(context.Context, string) (*apstra.FreeformClient, error))
+}
+
+func configureEphemeral(_ context.Context, ep ephemeral.EphemeralResourceWithConfigure, req ephemeral.ConfigureRequest, resp *ephemeral.ConfigureResponse) {
+ if req.ProviderData == nil {
+ return // cannot continue
+ }
+
+ var pd *providerData
+ var ok bool
+
+ if pd, ok = req.ProviderData.(*providerData); !ok {
+ resp.Diagnostics.AddError(
+ errDataSourceConfigureProviderDataSummary,
+ fmt.Sprintf(errDataSourceConfigureProviderDataDetail, *pd, req.ProviderData),
+ )
+ }
+
+ if ep, ok := ep.(ephemeralWithSetClient); ok {
+ ep.setClient(pd.client)
+ }
+
+ if ep, ok := ep.(ephemeralWithSetDcBpClientFunc); ok {
+ ep.setBpClientFunc(pd.getTwoStageL3ClosClient)
+ }
+
+ if ep, ok := ep.(ephemeralWithSetFfBpClientFunc); ok {
+ ep.setBpClientFunc(pd.getFreeformClient)
+ }
+}
diff --git a/apstra/constants.go b/apstra/constants.go
index 6cdd5a06..21c8e5fd 100644
--- a/apstra/constants.go
+++ b/apstra/constants.go
@@ -19,11 +19,12 @@ const (
errBpClientCreateSummary = "Failed to create client for Blueprint %s"
errBpNotFoundSummary = "Blueprint %s not found"
- docCategorySeparator = " --- "
- docCategoryDesign = "Design" + docCategorySeparator
- docCategoryResources = "Resource Pools" + docCategorySeparator
- docCategoryDatacenter = "Reference Design: Datacenter" + docCategorySeparator
- docCategoryFreeform = "Reference Design: Freeform" + docCategorySeparator
- docCategoryRefDesignAny = "Reference Design: Shared" + docCategorySeparator
- docCategoryDevices = "Devices" + docCategorySeparator
+ docCategorySeparator = " --- "
+ docCategoryAuthentication = "Authentication" + docCategorySeparator
+ docCategoryDatacenter = "Reference Design: Datacenter" + docCategorySeparator
+ docCategoryDesign = "Design" + docCategorySeparator
+ docCategoryDevices = "Devices" + docCategorySeparator
+ docCategoryFreeform = "Reference Design: Freeform" + docCategorySeparator
+ docCategoryRefDesignAny = "Reference Design: Shared" + docCategorySeparator
+ docCategoryResources = "Resource Pools" + docCategorySeparator
)
diff --git a/apstra/ephemeral_api_token.go b/apstra/ephemeral_api_token.go
new file mode 100644
index 00000000..33e29a5b
--- /dev/null
+++ b/apstra/ephemeral_api_token.go
@@ -0,0 +1,187 @@
+package tfapstra
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "time"
+
+ "github.com/Juniper/apstra-go-sdk/apstra"
+ "github.com/Juniper/terraform-provider-apstra/apstra/authentication"
+ "github.com/Juniper/terraform-provider-apstra/apstra/private"
+ "github.com/hashicorp/terraform-plugin-framework/ephemeral"
+ "github.com/hashicorp/terraform-plugin-framework/ephemeral/schema"
+)
+
+var (
+ _ ephemeral.EphemeralResource = (*ephemeralToken)(nil)
+ _ ephemeral.EphemeralResourceWithClose = (*ephemeralToken)(nil)
+ _ ephemeral.EphemeralResourceWithConfigure = (*ephemeralToken)(nil)
+ _ ephemeral.EphemeralResourceWithRenew = (*ephemeralToken)(nil)
+ _ ephemeralWithSetClient = (*ephemeralToken)(nil)
+)
+
+type ephemeralToken struct {
+ client *apstra.Client
+}
+
+func (o *ephemeralToken) Metadata(_ context.Context, req ephemeral.MetadataRequest, resp *ephemeral.MetadataResponse) {
+ resp.TypeName = req.ProviderTypeName + "_api_token"
+}
+
+func (o *ephemeralToken) Schema(_ context.Context, _ ephemeral.SchemaRequest, resp *ephemeral.SchemaResponse) {
+ resp.Schema = schema.Schema{
+ MarkdownDescription: docCategoryAuthentication + "This Ephemeral Resource retrieves a unique API token and (optionally) invalidates it on Close.",
+ Attributes: authentication.ApiToken{}.EphemeralAttributes(),
+ }
+}
+
+func (o *ephemeralToken) Configure(ctx context.Context, req ephemeral.ConfigureRequest, resp *ephemeral.ConfigureResponse) {
+ configureEphemeral(ctx, o, req, resp)
+}
+
+func (o *ephemeralToken) Open(ctx context.Context, req ephemeral.OpenRequest, resp *ephemeral.OpenResponse) {
+ var config authentication.ApiToken
+ resp.Diagnostics.Append(req.Config.Get(ctx, &config)...)
+ if resp.Diagnostics.HasError() {
+ return
+ }
+
+ // set default values
+ config.SetDefaults()
+
+ // create a new client using the credentials in the embedded client's config
+ client, err := o.client.Config().NewClient(ctx)
+ if err != nil {
+ resp.Diagnostics.AddError("error creating new client", err.Error())
+ return
+ }
+
+ // log in so that the new client fetches an API token
+ err = client.Login(ctx)
+ if err != nil {
+ resp.Diagnostics.AddError("error logging in new client", err.Error())
+ return
+ }
+
+ // extract the token
+ token := client.GetApiToken()
+ if token == "" {
+ resp.Diagnostics.AddError("requested API token is empty", "requested API token is empty")
+ return
+ }
+
+ // Destroy the new client without invalidating the API token we just collected.
+ // We call Logout() here only for the side effect of stopping the task monitor
+ // goroutine. This client *can't* invalidate the session because it no longer
+ // has an API token.
+ client.SetApiToken("")
+ err = client.Logout(ctx)
+ if err != nil {
+ resp.Diagnostics.AddError("error logging out client", err.Error())
+ return
+ }
+
+ config.LoadApiData(ctx, token, &resp.Diagnostics)
+ if resp.Diagnostics.HasError() {
+ return
+ }
+
+ // sanity check the token lifetime
+ now := time.Now()
+ if now.After(config.ExpiresAt) {
+ resp.Diagnostics.AddError(
+ "Just-fetched API token is expired",
+ fmt.Sprintf("Token expired at: %s. Current time is: %s", config.ExpiresAt, now),
+ )
+ return
+ }
+
+ // warn the user about imminent expiration
+ warn := time.Duration(config.WarnSeconds.ValueInt64()) * time.Second
+ if now.Add(warn).After(config.ExpiresAt) {
+ resp.Diagnostics.AddWarning(
+ fmt.Sprintf("API token expires within %d second warning threshold", config.WarnSeconds),
+ fmt.Sprintf("API token expires at %s. Current time: %s", config.ExpiresAt, now),
+ )
+ }
+
+ // save the private state
+ config.SetPrivateState(ctx, resp.Private, &resp.Diagnostics)
+ if resp.Diagnostics.HasError() {
+ return
+ }
+
+ // set the renew timestamp to the early warning time
+ resp.RenewAt = config.ExpiresAt.Add(-1 * warn)
+
+ // set the result
+ resp.Diagnostics.Append(resp.Result.Set(ctx, &config)...)
+}
+
+func (o *ephemeralToken) Renew(ctx context.Context, req ephemeral.RenewRequest, resp *ephemeral.RenewResponse) {
+ var privateEphemeralApiToken private.EphemeralApiToken
+ privateEphemeralApiToken.LoadPrivateState(ctx, req.Private, &resp.Diagnostics)
+ if resp.Diagnostics.HasError() {
+ return
+ }
+
+ now := time.Now()
+ if now.After(privateEphemeralApiToken.ExpiresAt) {
+ resp.Diagnostics.AddError(
+ "API token has expired",
+ fmt.Sprintf("Token expired at: %s. Current time is: %s", privateEphemeralApiToken.ExpiresAt, now),
+ )
+ return
+ }
+
+ if now.Add(privateEphemeralApiToken.WarnThreshold).After(privateEphemeralApiToken.ExpiresAt) {
+ resp.Diagnostics.AddWarning(
+ fmt.Sprintf("API token expires within %d second warning threshold", privateEphemeralApiToken.WarnThreshold),
+ fmt.Sprintf("API token expires at %s. Current time: %s", privateEphemeralApiToken.ExpiresAt, now),
+ )
+ }
+
+ // set the renew timestamp to the expiration time
+ resp.RenewAt = privateEphemeralApiToken.ExpiresAt
+}
+
+func (o *ephemeralToken) Close(ctx context.Context, req ephemeral.CloseRequest, resp *ephemeral.CloseResponse) {
+ // extract the private state data
+ var privateEphemeralApiToken private.EphemeralApiToken
+ privateEphemeralApiToken.LoadPrivateState(ctx, req.Private, &resp.Diagnostics)
+
+ if privateEphemeralApiToken.DoNotLogOut {
+ return // user doesn't want the token invalidated, so there's nothing to do
+ }
+
+ if time.Now().After(privateEphemeralApiToken.ExpiresAt) {
+ return // token has already expired, so there's nothing to do
+ }
+
+ // create a new client based on the embedded client's config
+ client, err := o.client.Config().NewClient(ctx)
+ if err != nil {
+ resp.Diagnostics.AddError("error creating new client", err.Error())
+ return
+ }
+
+ // copy the API token from private state into the new client
+ client.SetApiToken(privateEphemeralApiToken.Token)
+
+ // log out the client using the swapped-in token
+ err = client.Logout(ctx)
+ if err != nil {
+ var ace apstra.ClientErr
+ if errors.As(err, &ace) && ace.Type() == apstra.ErrAuthFail {
+ return // 401 is okay
+ }
+
+ resp.Diagnostics.AddError("Error while logging out the API key", err.Error())
+ return
+ }
+}
+
+func (o *ephemeralToken) setClient(client *apstra.Client) {
+ o.client = client
+}
diff --git a/apstra/private/ephemeral_api_token.go b/apstra/private/ephemeral_api_token.go
new file mode 100644
index 00000000..14f88775
--- /dev/null
+++ b/apstra/private/ephemeral_api_token.go
@@ -0,0 +1,40 @@
+package private
+
+import (
+ "context"
+ "encoding/json"
+ "time"
+
+ "github.com/hashicorp/terraform-plugin-framework/diag"
+)
+
+type EphemeralApiToken struct {
+ Token string `json:"token"`
+ ExpiresAt time.Time `json:"expires_at"`
+ WarnThreshold time.Duration `json:"warn_threshold"`
+ DoNotLogOut bool `json:"do_not_log_out"`
+}
+
+func (o *EphemeralApiToken) LoadPrivateState(ctx context.Context, ps State, diags *diag.Diagnostics) {
+ b, d := ps.GetKey(ctx, "EphemeralApiToken")
+ diags.Append(d...)
+ if diags.HasError() {
+ return
+ }
+
+ err := json.Unmarshal(b, &o)
+ if err != nil {
+ diags.AddError("failed to unmarshal private state", err.Error())
+ return
+ }
+}
+
+func (o *EphemeralApiToken) SetPrivateState(ctx context.Context, ps State, diags *diag.Diagnostics) {
+ b, err := json.Marshal(o)
+ if err != nil {
+ diags.AddError("failed to marshal private state", err.Error())
+ return
+ }
+
+ diags.Append(ps.SetKey(ctx, "EphemeralApiToken", b)...)
+}
diff --git a/apstra/provider.go b/apstra/provider.go
index 5fbe372e..7fd86d45 100644
--- a/apstra/provider.go
+++ b/apstra/provider.go
@@ -20,6 +20,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
"github.com/hashicorp/terraform-plugin-framework/datasource"
"github.com/hashicorp/terraform-plugin-framework/diag"
+ "github.com/hashicorp/terraform-plugin-framework/ephemeral"
"github.com/hashicorp/terraform-plugin-framework/provider"
"github.com/hashicorp/terraform-plugin-framework/provider/schema"
"github.com/hashicorp/terraform-plugin-framework/resource"
@@ -53,7 +54,10 @@ https://registry.terraform.io/providers/Juniper/apstra/%s/docs#tls_validation_di
var commit, tag string // populated by goreleaser
-var _ provider.Provider = &Provider{}
+var (
+ _ provider.Provider = (*Provider)(nil)
+ _ provider.ProviderWithEphemeralResources = (*Provider)(nil)
+)
// NewProvider instantiates the provider in main
func NewProvider() provider.Provider {
@@ -488,8 +492,8 @@ func (p *Provider) Configure(ctx context.Context, req provider.ConfigureRequest,
return freeformClient, nil
}
- // data passed to Resource and DataSource Configure() methods
- pd := &providerData{
+ // data passed to Resource, DataSource, and Ephemeral Configure() methods
+ pd := providerData{
client: client,
providerVersion: p.Version + "-" + p.Commit,
terraformVersion: req.TerraformVersion,
@@ -499,8 +503,9 @@ func (p *Provider) Configure(ctx context.Context, req provider.ConfigureRequest,
getFreeformClient: getFreeformClient,
experimental: config.Experimental.ValueBool(),
}
- resp.ResourceData = pd
- resp.DataSourceData = pd
+ resp.ResourceData = &pd
+ resp.DataSourceData = &pd
+ resp.EphemeralResourceData = &pd
}
// DataSources defines provider data sources
@@ -592,6 +597,13 @@ func (p *Provider) DataSources(_ context.Context) []func() datasource.DataSource
}
}
+// EphemeralResources defines provider ephemeral resources
+func (p *Provider) EphemeralResources(_ context.Context) []func() ephemeral.EphemeralResource {
+ return []func() ephemeral.EphemeralResource{
+ func() ephemeral.EphemeralResource { return &ephemeralToken{} },
+ }
+}
+
// Resources defines provider resources
func (p *Provider) Resources(_ context.Context) []func() resource.Resource {
return []func() resource.Resource{
diff --git a/docs/data-sources/rack_type.md b/docs/data-sources/rack_type.md
index 0640d43a..a700730b 100644
--- a/docs/data-sources/rack_type.md
+++ b/docs/data-sources/rack_type.md
@@ -125,7 +125,7 @@ Read-Only:
- `rows` (Number) Physical vertical dimension of the panel.
-### Nested Schema for `access_switches.logical_device.panels.rows`
+### Nested Schema for `access_switches.logical_device.panels.port_groups`
Read-Only:
@@ -204,7 +204,7 @@ Read-Only:
- `rows` (Number) Physical vertical dimension of the panel.
-### Nested Schema for `generic_systems.logical_device.panels.rows`
+### Nested Schema for `generic_systems.logical_device.panels.port_groups`
Read-Only:
@@ -259,7 +259,7 @@ Read-Only:
- `rows` (Number) Physical vertical dimension of the panel.
-### Nested Schema for `leaf_switches.logical_device.panels.rows`
+### Nested Schema for `leaf_switches.logical_device.panels.port_groups`
Read-Only:
diff --git a/docs/data-sources/template_collapsed.md b/docs/data-sources/template_collapsed.md
index 29f0b51a..f4001ae0 100644
--- a/docs/data-sources/template_collapsed.md
+++ b/docs/data-sources/template_collapsed.md
@@ -89,7 +89,7 @@ Read-Only:
- `target_switch_name` (String) The `name` of the switch in this Rack Type to which this Link connects.
-### Nested Schema for `rack_type.access_switches.links.target_switch_name`
+### Nested Schema for `rack_type.access_switches.links.tags`
Read-Only:
@@ -168,7 +168,7 @@ Read-Only:
- `target_switch_name` (String) The `name` of the switch in this Rack Type to which this Link connects.
-### Nested Schema for `rack_type.generic_systems.links.target_switch_name`
+### Nested Schema for `rack_type.generic_systems.links.tags`
Read-Only:
diff --git a/docs/data-sources/template_pod_based.md b/docs/data-sources/template_pod_based.md
index 5bc76ad0..60e7749f 100644
--- a/docs/data-sources/template_pod_based.md
+++ b/docs/data-sources/template_pod_based.md
@@ -94,7 +94,7 @@ Read-Only:
- `tags` (Attributes Set) Details any tags applied to this Access Switch. (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--access_switches--tags))
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.access_switches.tags`
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.access_switches.esi_lag_info`
Read-Only:
@@ -103,7 +103,7 @@ Read-Only:
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.access_switches.tags`
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.access_switches.links`
Read-Only:
@@ -112,11 +112,11 @@ Read-Only:
- `speed` (String) Speed of this Link.
- `switch_peer` (String) For non-LAG connections to redundant switch pairs, this field selects the target switch.
- `tag_ids` (Set of String) IDs will always be `` in data source contexts.
-- `tags` (Attributes Set) Details any tags applied to this Link. (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--access_switches--tags--tags))
+- `tags` (Attributes Set) Details any tags applied to this Link. (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--access_switches--links--tags))
- `target_switch_name` (String) The `name` of the switch in this Rack Type to which this Link connects.
-
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.access_switches.tags.target_switch_name`
+
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.access_switches.links.tags`
Read-Only:
@@ -127,25 +127,25 @@ Read-Only:
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.access_switches.tags`
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.access_switches.logical_device`
Read-Only:
- `id` (String) ID will always be `` in nested contexts.
- `name` (String) Logical device display name.
-- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--access_switches--tags--panels))
+- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--access_switches--logical_device--panels))
-
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.access_switches.tags.panels`
+
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.access_switches.logical_device.panels`
Read-Only:
- `columns` (Number) Physical horizontal dimension of the panel.
-- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--access_switches--tags--panels--port_groups))
+- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--access_switches--logical_device--panels--port_groups))
- `rows` (Number) Physical vertical dimension of the panel.
-
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.access_switches.tags.panels.rows`
+
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.access_switches.logical_device.panels.port_groups`
Read-Only:
@@ -182,7 +182,7 @@ Read-Only:
- `tags` (Attributes Set) Details any tags applied to this Generic System. (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--generic_systems--tags))
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.generic_systems.tags`
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.generic_systems.links`
Read-Only:
@@ -191,11 +191,11 @@ Read-Only:
- `speed` (String) Speed of this Link.
- `switch_peer` (String) For non-LAG connections to redundant switch pairs, this field selects the target switch.
- `tag_ids` (Set of String) IDs will always be `` in data source contexts.
-- `tags` (Attributes Set) Details any tags applied to this Link. (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--generic_systems--tags--tags))
+- `tags` (Attributes Set) Details any tags applied to this Link. (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--generic_systems--links--tags))
- `target_switch_name` (String) The `name` of the switch in this Rack Type to which this Link connects.
-
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.generic_systems.tags.target_switch_name`
+
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.generic_systems.links.tags`
Read-Only:
@@ -206,25 +206,25 @@ Read-Only:
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.generic_systems.tags`
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.generic_systems.logical_device`
Read-Only:
- `id` (String) ID will always be `` in nested contexts.
- `name` (String) Logical device display name.
-- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--generic_systems--tags--panels))
+- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--generic_systems--logical_device--panels))
-
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.generic_systems.tags.panels`
+
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.generic_systems.logical_device.panels`
Read-Only:
- `columns` (Number) Physical horizontal dimension of the panel.
-- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--generic_systems--tags--panels--port_groups))
+- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--generic_systems--logical_device--panels--port_groups))
- `rows` (Number) Physical vertical dimension of the panel.
-
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.generic_systems.tags.panels.rows`
+
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.generic_systems.logical_device.panels.port_groups`
Read-Only:
@@ -261,25 +261,25 @@ Read-Only:
- `tags` (Attributes Set) Details any tags applied to this Leaf Switch. (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--leaf_switches--tags))
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.leaf_switches.tags`
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.leaf_switches.logical_device`
Read-Only:
- `id` (String) ID will always be `` in nested contexts.
- `name` (String) Logical device display name.
-- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--leaf_switches--tags--panels))
+- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--leaf_switches--logical_device--panels))
-
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.leaf_switches.tags.panels`
+
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.leaf_switches.logical_device.panels`
Read-Only:
- `columns` (Number) Physical horizontal dimension of the panel.
-- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--leaf_switches--tags--panels--port_groups))
+- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--leaf_switches--logical_device--panels--port_groups))
- `rows` (Number) Physical vertical dimension of the panel.
-
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.leaf_switches.tags.panels.rows`
+
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.leaf_switches.logical_device.panels.port_groups`
Read-Only:
@@ -291,7 +291,7 @@ Read-Only:
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.leaf_switches.tags`
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.leaf_switches.mlag_info`
Read-Only:
@@ -331,25 +331,25 @@ Read-Only:
- `tags` (Attributes Set) Details any tags applied to the Spine Switches. (see [below for nested schema](#nestedatt--pod_infos--pod_type--spine--tags))
-### Nested Schema for `pod_infos.pod_type.spine.tags`
+### Nested Schema for `pod_infos.pod_type.spine.logical_device`
Read-Only:
- `id` (String) ID will always be `` in nested contexts.
- `name` (String) Logical device display name.
-- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--pod_infos--pod_type--spine--tags--panels))
+- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--pod_infos--pod_type--spine--logical_device--panels))
-
-### Nested Schema for `pod_infos.pod_type.spine.tags.panels`
+
+### Nested Schema for `pod_infos.pod_type.spine.logical_device.panels`
Read-Only:
- `columns` (Number) Physical horizontal dimension of the panel.
-- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--pod_infos--pod_type--spine--tags--panels--port_groups))
+- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--pod_infos--pod_type--spine--logical_device--panels--port_groups))
- `rows` (Number) Physical vertical dimension of the panel.
-
-### Nested Schema for `pod_infos.pod_type.spine.tags.panels.rows`
+
+### Nested Schema for `pod_infos.pod_type.spine.logical_device.panels.port_groups`
Read-Only:
@@ -404,7 +404,7 @@ Read-Only:
- `rows` (Number) Physical vertical dimension of the panel.
-### Nested Schema for `super_spine.logical_device.panels.rows`
+### Nested Schema for `super_spine.logical_device.panels.port_groups`
Read-Only:
diff --git a/docs/data-sources/template_rack_based.md b/docs/data-sources/template_rack_based.md
index dd336efb..7726b7bf 100644
--- a/docs/data-sources/template_rack_based.md
+++ b/docs/data-sources/template_rack_based.md
@@ -88,7 +88,7 @@ Read-Only:
- `tags` (Attributes Set) Details any tags applied to this Access Switch. (see [below for nested schema](#nestedatt--rack_infos--rack_type--access_switches--tags))
-### Nested Schema for `rack_infos.rack_type.access_switches.tags`
+### Nested Schema for `rack_infos.rack_type.access_switches.esi_lag_info`
Read-Only:
@@ -97,7 +97,7 @@ Read-Only:
-### Nested Schema for `rack_infos.rack_type.access_switches.tags`
+### Nested Schema for `rack_infos.rack_type.access_switches.links`
Read-Only:
@@ -106,11 +106,11 @@ Read-Only:
- `speed` (String) Speed of this Link.
- `switch_peer` (String) For non-LAG connections to redundant switch pairs, this field selects the target switch.
- `tag_ids` (Set of String) IDs will always be `` in data source contexts.
-- `tags` (Attributes Set) Details any tags applied to this Link. (see [below for nested schema](#nestedatt--rack_infos--rack_type--access_switches--tags--tags))
+- `tags` (Attributes Set) Details any tags applied to this Link. (see [below for nested schema](#nestedatt--rack_infos--rack_type--access_switches--links--tags))
- `target_switch_name` (String) The `name` of the switch in this Rack Type to which this Link connects.
-
-### Nested Schema for `rack_infos.rack_type.access_switches.tags.tags`
+
+### Nested Schema for `rack_infos.rack_type.access_switches.links.tags`
Read-Only:
@@ -121,25 +121,25 @@ Read-Only:
-### Nested Schema for `rack_infos.rack_type.access_switches.tags`
+### Nested Schema for `rack_infos.rack_type.access_switches.logical_device`
Read-Only:
- `id` (String) ID will always be `` in nested contexts.
- `name` (String) Logical device display name.
-- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--rack_infos--rack_type--access_switches--tags--panels))
+- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--rack_infos--rack_type--access_switches--logical_device--panels))
-
-### Nested Schema for `rack_infos.rack_type.access_switches.tags.panels`
+
+### Nested Schema for `rack_infos.rack_type.access_switches.logical_device.panels`
Read-Only:
- `columns` (Number) Physical horizontal dimension of the panel.
-- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--rack_infos--rack_type--access_switches--tags--panels--port_groups))
+- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--rack_infos--rack_type--access_switches--logical_device--panels--port_groups))
- `rows` (Number) Physical vertical dimension of the panel.
-
-### Nested Schema for `rack_infos.rack_type.access_switches.tags.panels.rows`
+
+### Nested Schema for `rack_infos.rack_type.access_switches.logical_device.panels.port_groups`
Read-Only:
@@ -176,7 +176,7 @@ Read-Only:
- `tags` (Attributes Set) Details any tags applied to this Generic System. (see [below for nested schema](#nestedatt--rack_infos--rack_type--generic_systems--tags))
-### Nested Schema for `rack_infos.rack_type.generic_systems.tags`
+### Nested Schema for `rack_infos.rack_type.generic_systems.links`
Read-Only:
@@ -185,11 +185,11 @@ Read-Only:
- `speed` (String) Speed of this Link.
- `switch_peer` (String) For non-LAG connections to redundant switch pairs, this field selects the target switch.
- `tag_ids` (Set of String) IDs will always be `` in data source contexts.
-- `tags` (Attributes Set) Details any tags applied to this Link. (see [below for nested schema](#nestedatt--rack_infos--rack_type--generic_systems--tags--tags))
+- `tags` (Attributes Set) Details any tags applied to this Link. (see [below for nested schema](#nestedatt--rack_infos--rack_type--generic_systems--links--tags))
- `target_switch_name` (String) The `name` of the switch in this Rack Type to which this Link connects.
-
-### Nested Schema for `rack_infos.rack_type.generic_systems.tags.tags`
+
+### Nested Schema for `rack_infos.rack_type.generic_systems.links.tags`
Read-Only:
@@ -200,25 +200,25 @@ Read-Only:
-### Nested Schema for `rack_infos.rack_type.generic_systems.tags`
+### Nested Schema for `rack_infos.rack_type.generic_systems.logical_device`
Read-Only:
- `id` (String) ID will always be `` in nested contexts.
- `name` (String) Logical device display name.
-- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--rack_infos--rack_type--generic_systems--tags--panels))
+- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--rack_infos--rack_type--generic_systems--logical_device--panels))
-
-### Nested Schema for `rack_infos.rack_type.generic_systems.tags.panels`
+
+### Nested Schema for `rack_infos.rack_type.generic_systems.logical_device.panels`
Read-Only:
- `columns` (Number) Physical horizontal dimension of the panel.
-- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--rack_infos--rack_type--generic_systems--tags--panels--port_groups))
+- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--rack_infos--rack_type--generic_systems--logical_device--panels--port_groups))
- `rows` (Number) Physical vertical dimension of the panel.
-
-### Nested Schema for `rack_infos.rack_type.generic_systems.tags.panels.rows`
+
+### Nested Schema for `rack_infos.rack_type.generic_systems.logical_device.panels.port_groups`
Read-Only:
@@ -255,25 +255,25 @@ Read-Only:
- `tags` (Attributes Set) Details any tags applied to this Leaf Switch. (see [below for nested schema](#nestedatt--rack_infos--rack_type--leaf_switches--tags))
-### Nested Schema for `rack_infos.rack_type.leaf_switches.tags`
+### Nested Schema for `rack_infos.rack_type.leaf_switches.logical_device`
Read-Only:
- `id` (String) ID will always be `` in nested contexts.
- `name` (String) Logical device display name.
-- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--rack_infos--rack_type--leaf_switches--tags--panels))
+- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--rack_infos--rack_type--leaf_switches--logical_device--panels))
-
-### Nested Schema for `rack_infos.rack_type.leaf_switches.tags.panels`
+
+### Nested Schema for `rack_infos.rack_type.leaf_switches.logical_device.panels`
Read-Only:
- `columns` (Number) Physical horizontal dimension of the panel.
-- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--rack_infos--rack_type--leaf_switches--tags--panels--port_groups))
+- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--rack_infos--rack_type--leaf_switches--logical_device--panels--port_groups))
- `rows` (Number) Physical vertical dimension of the panel.
-
-### Nested Schema for `rack_infos.rack_type.leaf_switches.tags.panels.rows`
+
+### Nested Schema for `rack_infos.rack_type.leaf_switches.logical_device.panels.port_groups`
Read-Only:
@@ -285,7 +285,7 @@ Read-Only:
-### Nested Schema for `rack_infos.rack_type.leaf_switches.tags`
+### Nested Schema for `rack_infos.rack_type.leaf_switches.mlag_info`
Read-Only:
@@ -343,7 +343,7 @@ Read-Only:
- `rows` (Number) Physical vertical dimension of the panel.
-### Nested Schema for `spine.logical_device.panels.rows`
+### Nested Schema for `spine.logical_device.panels.port_groups`
Read-Only:
diff --git a/docs/ephemeral-resources/api_token.md b/docs/ephemeral-resources/api_token.md
new file mode 100644
index 00000000..7a5a3efe
--- /dev/null
+++ b/docs/ephemeral-resources/api_token.md
@@ -0,0 +1,54 @@
+---
+page_title: "apstra_api_token Ephemeral Resource - terraform-provider-apstra"
+subcategory: "Authentication"
+description: |-
+ This Ephemeral Resource retrieves a unique API token and (optionally) invalidates it on Close.
+---
+
+# apstra_api_token (Ephemeral Resource)
+
+This Ephemeral Resource retrieves a unique API token and (optionally) invalidates it on Close.
+
+
+## Example Usage
+
+```terraform
+# This example runs uses the apstra_api_token ephemeral resource
+# to collect an API key which is then used in an arbitrary shell
+# command.
+locals {
+ url = "https://apstra.example.com"
+}
+
+provider "apstra" {
+ url = local.url
+ blueprint_mutex_enabled = false
+}
+
+// fetch an API token
+ephemeral "apstra_api_token" "example" {}
+
+resource "null_resource" "example" {
+ provisioner "local-exec" {
+ command = "curl -X OPTIONS $URL -H 'accept: application/json' -H \"Authtoken: $APIKEY\" > /tmp/local-exec.out"
+ environment = {
+ APIKEY = ephemeral.apstra_api_token.example.value
+ URL = format("%s/api/blueprints", local.url)
+ }
+ }
+}
+```
+
+
+## Schema
+
+### Optional
+
+- `do_not_log_out` (Boolean) By default, API sessions are closed when Terraform's `Close` operation calls `logout`. Set this value to `true` to prevent ending the session when Terraform determines the API key is no longer in use.
+- `warn_seconds` (Number) Terraform will produce a warning when the token value is referenced with less than this amount of time remaining before expiration. Note that determination of remaining token lifetime depends on clock sync between the Apstra server and the Terraform host. Value `0` disables warnings. Default value is `60`.
+
+### Read-Only
+
+- `session_id` (String) The API session ID associated with the token.
+- `user_name` (String) The user name associated with the session ID.
+- `value` (String) The API token value.
diff --git a/docs/resources/datacenter_connectivity_template_interface.md b/docs/resources/datacenter_connectivity_template_interface.md
index 53a1a013..a606a771 100644
--- a/docs/resources/datacenter_connectivity_template_interface.md
+++ b/docs/resources/datacenter_connectivity_template_interface.md
@@ -3,20 +3,13 @@ page_title: "apstra_datacenter_connectivity_template_interface Resource - terraf
subcategory: "Reference Design: Datacenter"
description: |-
This resource creates a Connectivity Template suitable for use with Application Points of type interface within a Datacenter Blueprint. interface Application Points use the following Connectivity Template Primitive hierarchy:
- - Virtual Network (Single)
- - Static Route
- - BGP Peering (Generic System)
- - Routing Policy
- - Virtual Network (Multiple)
- - IP Link
- - BGP Peering (Generic System)
- - Routing Policy
- - BGP Peering (IP Endpoint)
- - Routing Policy
- - Dynamic BGP Peering
- - Routing Policy
- - Static Route
- - Routing Zone Constraint
+ Virtual Network (Single)
+ Static RouteBGP Peering (Generic System)
+ Routing PolicyVirtual Network (Multiple)IP Link
+ BGP Peering (Generic System)
+ Routing PolicyBGP Peering (IP Endpoint)
+ Routing PolicyDynamic BGP Peering
+ Routing PolicyStatic RouteRouting Zone Constraint
---
# apstra_datacenter_connectivity_template_interface (Resource)
diff --git a/docs/resources/datacenter_connectivity_template_loopback.md b/docs/resources/datacenter_connectivity_template_loopback.md
index 5b98da32..4ee55d5b 100644
--- a/docs/resources/datacenter_connectivity_template_loopback.md
+++ b/docs/resources/datacenter_connectivity_template_loopback.md
@@ -3,8 +3,8 @@ page_title: "apstra_datacenter_connectivity_template_loopback Resource - terrafo
subcategory: "Reference Design: Datacenter"
description: |-
This resource creates a Connectivity Template suitable for use with Application Points of type loopback within a Datacenter Blueprint. loopback Application Points use the following Connectivity Template Primitive hierarchy:
- - BGP Peering (IP Endpoint)
- - Routing Policy
+ BGP Peering (IP Endpoint)
+ Routing Policy
---
# apstra_datacenter_connectivity_template_loopback (Resource)
diff --git a/docs/resources/datacenter_connectivity_template_svi.md b/docs/resources/datacenter_connectivity_template_svi.md
index c17e1b84..684e1901 100644
--- a/docs/resources/datacenter_connectivity_template_svi.md
+++ b/docs/resources/datacenter_connectivity_template_svi.md
@@ -3,10 +3,9 @@ page_title: "apstra_datacenter_connectivity_template_svi Resource - terraform-pr
subcategory: "Reference Design: Datacenter"
description: |-
This resource creates a Connectivity Template suitable for use with Application Points of type svi within a Datacenter Blueprint. svi Application Points use the following Connectivity Template Primitive hierarchy:
- - BGP Peering (IP Endpoint)
- - Routing Policy
- - Dynamic BGP Peering
- - Routing Policy
+ BGP Peering (IP Endpoint)
+ Routing PolicyDynamic BGP Peering
+ Routing Policy
---
# apstra_datacenter_connectivity_template_svi (Resource)
diff --git a/docs/resources/datacenter_connectivity_template_system.md b/docs/resources/datacenter_connectivity_template_system.md
index ed831385..93dd8e5d 100644
--- a/docs/resources/datacenter_connectivity_template_system.md
+++ b/docs/resources/datacenter_connectivity_template_system.md
@@ -3,7 +3,7 @@ page_title: "apstra_datacenter_connectivity_template_system Resource - terraform
subcategory: "Reference Design: Datacenter"
description: |-
This resource creates a Connectivity Template suitable for use with Application Points of type system within a Datacenter Blueprint. system Application Points use the following Connectivity Template Primitive hierarchy:
- - Custom Static Route
+ Custom Static Route
---
# apstra_datacenter_connectivity_template_system (Resource)
diff --git a/docs/resources/rack_type.md b/docs/resources/rack_type.md
index aafebf73..9ffed4a3 100644
--- a/docs/resources/rack_type.md
+++ b/docs/resources/rack_type.md
@@ -134,7 +134,7 @@ Read-Only:
- `rows` (Number) Physical vertical dimension of the panel.
-### Nested Schema for `leaf_switches.logical_device.panels.rows`
+### Nested Schema for `leaf_switches.logical_device.panels.port_groups`
Read-Only:
@@ -240,7 +240,7 @@ Read-Only:
- `rows` (Number) Physical vertical dimension of the panel.
-### Nested Schema for `access_switches.logical_device.panels.rows`
+### Nested Schema for `access_switches.logical_device.panels.port_groups`
Read-Only:
@@ -337,7 +337,7 @@ Read-Only:
- `rows` (Number) Physical vertical dimension of the panel.
-### Nested Schema for `generic_systems.logical_device.panels.rows`
+### Nested Schema for `generic_systems.logical_device.panels.port_groups`
Read-Only:
diff --git a/docs/resources/template_collapsed.md b/docs/resources/template_collapsed.md
index 85fc5011..855fb8b0 100644
--- a/docs/resources/template_collapsed.md
+++ b/docs/resources/template_collapsed.md
@@ -89,7 +89,7 @@ Read-Only:
- `target_switch_name` (String) The `name` of the switch in this Rack Type to which this Link connects.
-### Nested Schema for `rack_type.access_switches.links.target_switch_name`
+### Nested Schema for `rack_type.access_switches.links.tags`
Required:
@@ -174,7 +174,7 @@ Read-Only:
- `target_switch_name` (String) The `name` of the switch in this Rack Type to which this Link connects.
-### Nested Schema for `rack_type.generic_systems.links.target_switch_name`
+### Nested Schema for `rack_type.generic_systems.links.tags`
Required:
diff --git a/docs/resources/template_pod_based.md b/docs/resources/template_pod_based.md
index 9ddb0940..9eb00772 100644
--- a/docs/resources/template_pod_based.md
+++ b/docs/resources/template_pod_based.md
@@ -105,7 +105,7 @@ Read-Only:
- `tags` (Attributes Set) Set of Tags (Name + Description) applied to this Access Switch (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--access_switches--tags))
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.access_switches.tags`
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.access_switches.esi_lag_info`
Required:
@@ -114,7 +114,7 @@ Required:
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.access_switches.tags`
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.access_switches.links`
Read-Only:
@@ -123,11 +123,11 @@ Read-Only:
- `speed` (String) Speed of this Link.
- `switch_peer` (String) For non-lAG connections to redundant switch pairs, this field selects the target switch.
- `tag_ids` (Set of String) IDs will always be `` in nested contexts.
-- `tags` (Attributes Set) Set of Tags (Name + Description) applied to this Link (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--access_switches--tags--tags))
+- `tags` (Attributes Set) Set of Tags (Name + Description) applied to this Link (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--access_switches--links--tags))
- `target_switch_name` (String) The `name` of the switch in this Rack Type to which this Link connects.
-
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.access_switches.tags.target_switch_name`
+
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.access_switches.links.tags`
Required:
@@ -144,25 +144,25 @@ Read-Only:
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.access_switches.tags`
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.access_switches.logical_device`
Read-Only:
- `id` (String) ID will always be `` in nested contexts.
- `name` (String) Logical device display name.
-- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--access_switches--tags--panels))
+- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--access_switches--logical_device--panels))
-
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.access_switches.tags.panels`
+
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.access_switches.logical_device.panels`
Read-Only:
- `columns` (Number) Physical horizontal dimension of the panel.
-- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--access_switches--tags--panels--port_groups))
+- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--access_switches--logical_device--panels--port_groups))
- `rows` (Number) Physical vertical dimension of the panel.
-
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.access_switches.tags.panels.rows`
+
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.access_switches.logical_device.panels.port_groups`
Read-Only:
@@ -199,7 +199,7 @@ Read-Only:
- `tags` (Attributes Set) Set of Tags (Name + Description) applied to this Generic System (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--generic_systems--tags))
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.generic_systems.tags`
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.generic_systems.links`
Read-Only:
@@ -208,11 +208,11 @@ Read-Only:
- `speed` (String) Speed of this Link.
- `switch_peer` (String) For non-lAG connections to redundant switch pairs, this field selects the target switch.
- `tag_ids` (Set of String) IDs will always be `` in nested contexts.
-- `tags` (Attributes Set) Set of Tags (Name + Description) applied to this Link (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--generic_systems--tags--tags))
+- `tags` (Attributes Set) Set of Tags (Name + Description) applied to this Link (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--generic_systems--links--tags))
- `target_switch_name` (String) The `name` of the switch in this Rack Type to which this Link connects.
-
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.generic_systems.tags.target_switch_name`
+
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.generic_systems.links.tags`
Required:
@@ -229,25 +229,25 @@ Read-Only:
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.generic_systems.tags`
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.generic_systems.logical_device`
Read-Only:
- `id` (String) ID will always be `` in nested contexts.
- `name` (String) Logical device display name.
-- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--generic_systems--tags--panels))
+- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--generic_systems--logical_device--panels))
-
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.generic_systems.tags.panels`
+
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.generic_systems.logical_device.panels`
Read-Only:
- `columns` (Number) Physical horizontal dimension of the panel.
-- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--generic_systems--tags--panels--port_groups))
+- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--generic_systems--logical_device--panels--port_groups))
- `rows` (Number) Physical vertical dimension of the panel.
-
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.generic_systems.tags.panels.rows`
+
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.generic_systems.logical_device.panels.port_groups`
Read-Only:
@@ -284,25 +284,25 @@ Read-Only:
- `tags` (Attributes Set) Set of Tags (Name + Description) applied to this Leaf Switch (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--leaf_switches--tags))
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.leaf_switches.tags`
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.leaf_switches.logical_device`
Read-Only:
- `id` (String) ID will always be `` in nested contexts.
- `name` (String) Logical device display name.
-- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--leaf_switches--tags--panels))
+- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--leaf_switches--logical_device--panels))
-
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.leaf_switches.tags.panels`
+
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.leaf_switches.logical_device.panels`
Read-Only:
- `columns` (Number) Physical horizontal dimension of the panel.
-- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--leaf_switches--tags--panels--port_groups))
+- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--pod_infos--pod_type--rack_infos--rack_type--leaf_switches--logical_device--panels--port_groups))
- `rows` (Number) Physical vertical dimension of the panel.
-
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.leaf_switches.tags.panels.rows`
+
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.leaf_switches.logical_device.panels.port_groups`
Read-Only:
@@ -314,7 +314,7 @@ Read-Only:
-### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.leaf_switches.tags`
+### Nested Schema for `pod_infos.pod_type.rack_infos.rack_type.leaf_switches.mlag_info`
Required:
@@ -363,25 +363,25 @@ Read-Only:
- `tags` (Attributes Set) Set of Tags (Name + Description) applied to Spine Switches (see [below for nested schema](#nestedatt--pod_infos--pod_type--spine--tags))
-### Nested Schema for `pod_infos.pod_type.spine.tags`
+### Nested Schema for `pod_infos.pod_type.spine.logical_device`
Read-Only:
- `id` (String) ID will always be `` in nested contexts.
- `name` (String) Logical device display name.
-- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--pod_infos--pod_type--spine--tags--panels))
+- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--pod_infos--pod_type--spine--logical_device--panels))
-
-### Nested Schema for `pod_infos.pod_type.spine.tags.panels`
+
+### Nested Schema for `pod_infos.pod_type.spine.logical_device.panels`
Read-Only:
- `columns` (Number) Physical horizontal dimension of the panel.
-- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--pod_infos--pod_type--spine--tags--panels--port_groups))
+- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--pod_infos--pod_type--spine--logical_device--panels--port_groups))
- `rows` (Number) Physical vertical dimension of the panel.
-
-### Nested Schema for `pod_infos.pod_type.spine.tags.panels.rows`
+
+### Nested Schema for `pod_infos.pod_type.spine.logical_device.panels.port_groups`
Read-Only:
@@ -442,7 +442,7 @@ Read-Only:
- `rows` (Number) Physical vertical dimension of the panel.
-### Nested Schema for `super_spine.logical_device.panels.rows`
+### Nested Schema for `super_spine.logical_device.panels.port_groups`
Read-Only:
diff --git a/docs/resources/template_rack_based.md b/docs/resources/template_rack_based.md
index 20e0eb85..3e13e50a 100644
--- a/docs/resources/template_rack_based.md
+++ b/docs/resources/template_rack_based.md
@@ -96,7 +96,7 @@ Read-Only:
- `tags` (Attributes Set) Set of Tags (Name + Description) applied to this Access Switch (see [below for nested schema](#nestedatt--rack_infos--rack_type--access_switches--tags))
-### Nested Schema for `rack_infos.rack_type.access_switches.tags`
+### Nested Schema for `rack_infos.rack_type.access_switches.esi_lag_info`
Required:
@@ -105,7 +105,7 @@ Required:
-### Nested Schema for `rack_infos.rack_type.access_switches.tags`
+### Nested Schema for `rack_infos.rack_type.access_switches.links`
Read-Only:
@@ -114,11 +114,11 @@ Read-Only:
- `speed` (String) Speed of this Link.
- `switch_peer` (String) For non-lAG connections to redundant switch pairs, this field selects the target switch.
- `tag_ids` (Set of String) IDs will always be `` in nested contexts.
-- `tags` (Attributes Set) Set of Tags (Name + Description) applied to this Link (see [below for nested schema](#nestedatt--rack_infos--rack_type--access_switches--tags--tags))
+- `tags` (Attributes Set) Set of Tags (Name + Description) applied to this Link (see [below for nested schema](#nestedatt--rack_infos--rack_type--access_switches--links--tags))
- `target_switch_name` (String) The `name` of the switch in this Rack Type to which this Link connects.
-
-### Nested Schema for `rack_infos.rack_type.access_switches.tags.tags`
+
+### Nested Schema for `rack_infos.rack_type.access_switches.links.tags`
Required:
@@ -135,25 +135,25 @@ Read-Only:
-### Nested Schema for `rack_infos.rack_type.access_switches.tags`
+### Nested Schema for `rack_infos.rack_type.access_switches.logical_device`
Read-Only:
- `id` (String) ID will always be `` in nested contexts.
- `name` (String) Logical device display name.
-- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--rack_infos--rack_type--access_switches--tags--panels))
+- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--rack_infos--rack_type--access_switches--logical_device--panels))
-
-### Nested Schema for `rack_infos.rack_type.access_switches.tags.panels`
+
+### Nested Schema for `rack_infos.rack_type.access_switches.logical_device.panels`
Read-Only:
- `columns` (Number) Physical horizontal dimension of the panel.
-- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--rack_infos--rack_type--access_switches--tags--panels--port_groups))
+- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--rack_infos--rack_type--access_switches--logical_device--panels--port_groups))
- `rows` (Number) Physical vertical dimension of the panel.
-
-### Nested Schema for `rack_infos.rack_type.access_switches.tags.panels.rows`
+
+### Nested Schema for `rack_infos.rack_type.access_switches.logical_device.panels.port_groups`
Read-Only:
@@ -190,7 +190,7 @@ Read-Only:
- `tags` (Attributes Set) Set of Tags (Name + Description) applied to this Generic System (see [below for nested schema](#nestedatt--rack_infos--rack_type--generic_systems--tags))
-### Nested Schema for `rack_infos.rack_type.generic_systems.tags`
+### Nested Schema for `rack_infos.rack_type.generic_systems.links`
Read-Only:
@@ -199,11 +199,11 @@ Read-Only:
- `speed` (String) Speed of this Link.
- `switch_peer` (String) For non-lAG connections to redundant switch pairs, this field selects the target switch.
- `tag_ids` (Set of String) IDs will always be `` in nested contexts.
-- `tags` (Attributes Set) Set of Tags (Name + Description) applied to this Link (see [below for nested schema](#nestedatt--rack_infos--rack_type--generic_systems--tags--tags))
+- `tags` (Attributes Set) Set of Tags (Name + Description) applied to this Link (see [below for nested schema](#nestedatt--rack_infos--rack_type--generic_systems--links--tags))
- `target_switch_name` (String) The `name` of the switch in this Rack Type to which this Link connects.
-
-### Nested Schema for `rack_infos.rack_type.generic_systems.tags.tags`
+
+### Nested Schema for `rack_infos.rack_type.generic_systems.links.tags`
Required:
@@ -220,25 +220,25 @@ Read-Only:
-### Nested Schema for `rack_infos.rack_type.generic_systems.tags`
+### Nested Schema for `rack_infos.rack_type.generic_systems.logical_device`
Read-Only:
- `id` (String) ID will always be `` in nested contexts.
- `name` (String) Logical device display name.
-- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--rack_infos--rack_type--generic_systems--tags--panels))
+- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--rack_infos--rack_type--generic_systems--logical_device--panels))
-
-### Nested Schema for `rack_infos.rack_type.generic_systems.tags.panels`
+
+### Nested Schema for `rack_infos.rack_type.generic_systems.logical_device.panels`
Read-Only:
- `columns` (Number) Physical horizontal dimension of the panel.
-- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--rack_infos--rack_type--generic_systems--tags--panels--port_groups))
+- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--rack_infos--rack_type--generic_systems--logical_device--panels--port_groups))
- `rows` (Number) Physical vertical dimension of the panel.
-
-### Nested Schema for `rack_infos.rack_type.generic_systems.tags.panels.rows`
+
+### Nested Schema for `rack_infos.rack_type.generic_systems.logical_device.panels.port_groups`
Read-Only:
@@ -275,25 +275,25 @@ Read-Only:
- `tags` (Attributes Set) Set of Tags (Name + Description) applied to this Leaf Switch (see [below for nested schema](#nestedatt--rack_infos--rack_type--leaf_switches--tags))
-### Nested Schema for `rack_infos.rack_type.leaf_switches.tags`
+### Nested Schema for `rack_infos.rack_type.leaf_switches.logical_device`
Read-Only:
- `id` (String) ID will always be `` in nested contexts.
- `name` (String) Logical device display name.
-- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--rack_infos--rack_type--leaf_switches--tags--panels))
+- `panels` (Attributes List) Details physical layout of interfaces on the device. (see [below for nested schema](#nestedatt--rack_infos--rack_type--leaf_switches--logical_device--panels))
-
-### Nested Schema for `rack_infos.rack_type.leaf_switches.tags.panels`
+
+### Nested Schema for `rack_infos.rack_type.leaf_switches.logical_device.panels`
Read-Only:
- `columns` (Number) Physical horizontal dimension of the panel.
-- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--rack_infos--rack_type--leaf_switches--tags--panels--port_groups))
+- `port_groups` (Attributes List) Ordered logical groupings of interfaces by speed or purpose within a panel (see [below for nested schema](#nestedatt--rack_infos--rack_type--leaf_switches--logical_device--panels--port_groups))
- `rows` (Number) Physical vertical dimension of the panel.
-
-### Nested Schema for `rack_infos.rack_type.leaf_switches.tags.panels.rows`
+
+### Nested Schema for `rack_infos.rack_type.leaf_switches.logical_device.panels.port_groups`
Read-Only:
@@ -305,7 +305,7 @@ Read-Only:
-### Nested Schema for `rack_infos.rack_type.leaf_switches.tags`
+### Nested Schema for `rack_infos.rack_type.leaf_switches.mlag_info`
Required:
@@ -372,7 +372,7 @@ Read-Only:
- `rows` (Number) Physical vertical dimension of the panel.
-### Nested Schema for `spine.logical_device.panels.rows`
+### Nested Schema for `spine.logical_device.panels.port_groups`
Read-Only:
diff --git a/examples/ephemeral-resources/apstra_api_token/example.tf b/examples/ephemeral-resources/apstra_api_token/example.tf
new file mode 100644
index 00000000..367492e5
--- /dev/null
+++ b/examples/ephemeral-resources/apstra_api_token/example.tf
@@ -0,0 +1,24 @@
+# This example runs uses the apstra_api_token ephemeral resource
+# to collect an API key which is then used in an arbitrary shell
+# command.
+locals {
+ url = "https://apstra.example.com"
+}
+
+provider "apstra" {
+ url = local.url
+ blueprint_mutex_enabled = false
+}
+
+// fetch an API token
+ephemeral "apstra_api_token" "example" {}
+
+resource "null_resource" "example" {
+ provisioner "local-exec" {
+ command = "curl -X OPTIONS $URL -H 'accept: application/json' -H \"Authtoken: $APIKEY\" > /tmp/local-exec.out"
+ environment = {
+ APIKEY = ephemeral.apstra_api_token.example.value
+ URL = format("%s/api/blueprints", local.url)
+ }
+ }
+}
diff --git a/go.mod b/go.mod
index 14ae49fb..7eac6898 100644
--- a/go.mod
+++ b/go.mod
@@ -1,18 +1,20 @@
module github.com/Juniper/terraform-provider-apstra
-go 1.22.5
+go 1.22.7
+
+toolchain go1.22.10
//replace github.com/Juniper/apstra-go-sdk => ../apstra-go-sdk
require (
github.com/IBM/netaddr v1.5.0
- github.com/Juniper/apstra-go-sdk v0.0.0-20241214203041-f5275c3222f6
+ github.com/Juniper/apstra-go-sdk v0.0.0-20241218190445-7367e0b85e5f
github.com/chrismarget-j/go-licenses v0.0.0-20240224210557-f22f3e06d3d4
github.com/chrismarget-j/version-constraints v0.0.0-20240925155624-26771a0a6820
github.com/google/go-cmp v0.6.0
github.com/hashicorp/go-version v1.7.0
github.com/hashicorp/hcl/v2 v2.20.1
- github.com/hashicorp/terraform-plugin-docs v0.18.0
+ github.com/hashicorp/terraform-plugin-docs v0.20.1
github.com/hashicorp/terraform-plugin-framework v1.13.0
github.com/hashicorp/terraform-plugin-framework-jsontypes v0.1.0
github.com/hashicorp/terraform-plugin-framework-nettypes v0.1.0
@@ -41,6 +43,7 @@ require (
github.com/aws/aws-sdk-go-v2/config v1.27.24 // indirect
github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.28.2 // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect
+ github.com/bmatcuk/doublestar/v4 v4.7.1 // indirect
github.com/cloudflare/circl v1.3.9 // indirect
github.com/cyphar/filepath-securejoin v0.2.5 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
@@ -60,11 +63,12 @@ require (
github.com/hashicorp/go-hclog v1.6.3 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.6.2 // indirect
+ github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
- github.com/hashicorp/hc-install v0.6.4 // indirect
+ github.com/hashicorp/hc-install v0.9.0 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.21.0 // indirect
- github.com/hashicorp/terraform-json v0.22.1 // indirect
+ github.com/hashicorp/terraform-json v0.23.0 // indirect
github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect
github.com/hashicorp/terraform-plugin-sdk/v2 v2.33.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
@@ -87,7 +91,6 @@ require (
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/posener/complete v1.2.3 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
- github.com/russross/blackfriday v1.6.0 // indirect
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
@@ -96,17 +99,18 @@ require (
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
- github.com/yuin/goldmark v1.6.0 // indirect
+ github.com/yuin/goldmark v1.7.7 // indirect
github.com/yuin/goldmark-meta v1.1.0 // indirect
- github.com/zclconf/go-cty v1.14.4 // indirect
+ github.com/zclconf/go-cty v1.15.0 // indirect
+ go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a // indirect
- golang.org/x/mod v0.19.0 // indirect
+ golang.org/x/mod v0.21.0 // indirect
golang.org/x/net v0.28.0 // indirect
- golang.org/x/sync v0.8.0 // indirect
+ golang.org/x/sync v0.9.0 // indirect
golang.org/x/sys v0.24.0 // indirect
- golang.org/x/text v0.17.0 // indirect
+ golang.org/x/text v0.20.0 // indirect
golang.org/x/tools v0.23.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect
diff --git a/go.sum b/go.sum
index 1715cf4c..51c950d0 100644
--- a/go.sum
+++ b/go.sum
@@ -6,8 +6,8 @@ github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0
github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
github.com/IBM/netaddr v1.5.0 h1:IJlFZe1+nFs09TeMB/HOP4+xBnX2iM/xgiDOgZgTJq0=
github.com/IBM/netaddr v1.5.0/go.mod h1:DDBPeYgbFzoXHjSz9Jwk7K8wmWV4+a/Kv0LqRnb8we4=
-github.com/Juniper/apstra-go-sdk v0.0.0-20241214203041-f5275c3222f6 h1:uvEbqjejOZgxK6uJ4WoOoCmcU74k3e/ino30UhFLXXE=
-github.com/Juniper/apstra-go-sdk v0.0.0-20241214203041-f5275c3222f6/go.mod h1:j0XhEo0IoltyST4cqdLwrDUNLDHC7JWJxBPDVffeSCg=
+github.com/Juniper/apstra-go-sdk v0.0.0-20241218190445-7367e0b85e5f h1:BSj2IKyq61icff5YXzzHS2sDoAxd992QTx6LKZI5f/A=
+github.com/Juniper/apstra-go-sdk v0.0.0-20241218190445-7367e0b85e5f/go.mod h1:j0XhEo0IoltyST4cqdLwrDUNLDHC7JWJxBPDVffeSCg=
github.com/Kunde21/markdownfmt/v3 v3.1.0 h1:KiZu9LKs+wFFBQKhrZJrFZwtLnCCWJahL+S+E/3VnM0=
github.com/Kunde21/markdownfmt/v3 v3.1.0/go.mod h1:tPXN1RTyOzJwhfHoon9wUr4HGYmWgVxSQN6VBJDkrVc=
github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
@@ -58,6 +58,8 @@ github.com/aws/smithy-go v1.20.3 h1:ryHwveWzPV5BIof6fyDvor6V3iUL7nTfiTKXHiW05nE=
github.com/aws/smithy-go v1.20.3/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E=
github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
+github.com/bmatcuk/doublestar/v4 v4.7.1 h1:fdDeAqgT47acgwd9bd9HxJRDmc9UAmPpc+2m0CXv75Q=
+github.com/bmatcuk/doublestar/v4 v4.7.1/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc=
github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA=
github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
@@ -155,23 +157,25 @@ github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+l
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
github.com/hashicorp/go-plugin v1.6.2 h1:zdGAEd0V1lCaU0u+MxWQhtSDQmahpkwOun8U8EiRVog=
github.com/hashicorp/go-plugin v1.6.2/go.mod h1:CkgLQ5CZqNmdL9U9JzM532t8ZiYQ35+pj3b1FD37R0Q=
+github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU=
+github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk=
github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8=
github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY=
github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
-github.com/hashicorp/hc-install v0.6.4 h1:QLqlM56/+SIIGvGcfFiwMY3z5WGXT066suo/v9Km8e0=
-github.com/hashicorp/hc-install v0.6.4/go.mod h1:05LWLy8TD842OtgcfBbOT0WMoInBMUSHjmDx10zuBIA=
+github.com/hashicorp/hc-install v0.9.0 h1:2dIk8LcvANwtv3QZLckxcjyF5w8KVtiMxu6G6eLhghE=
+github.com/hashicorp/hc-install v0.9.0/go.mod h1:+6vOP+mf3tuGgMApVYtmsnDoKWMDcFXeTxCACYZ8SFg=
github.com/hashicorp/hcl/v2 v2.20.1 h1:M6hgdyz7HYt1UN9e61j+qKJBqR3orTWbI1HKBJEdxtc=
github.com/hashicorp/hcl/v2 v2.20.1/go.mod h1:TZDqQ4kNKCbh1iJp99FdPiUaVDDUPivbqxZulxDYqL4=
github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y=
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
github.com/hashicorp/terraform-exec v0.21.0 h1:uNkLAe95ey5Uux6KJdua6+cv8asgILFVWkd/RG0D2XQ=
github.com/hashicorp/terraform-exec v0.21.0/go.mod h1:1PPeMYou+KDUSSeRE9szMZ/oHf4fYUmB923Wzbq1ICg=
-github.com/hashicorp/terraform-json v0.22.1 h1:xft84GZR0QzjPVWs4lRUwvTcPnegqlyS7orfb5Ltvec=
-github.com/hashicorp/terraform-json v0.22.1/go.mod h1:JbWSQCLFSXFFhg42T7l9iJwdGXBYV8fmmD6o/ML4p3A=
-github.com/hashicorp/terraform-plugin-docs v0.18.0 h1:2bINhzXc+yDeAcafurshCrIjtdu1XHn9zZ3ISuEhgpk=
-github.com/hashicorp/terraform-plugin-docs v0.18.0/go.mod h1:iIUfaJpdUmpi+rI42Kgq+63jAjI8aZVTyxp3Bvk9Hg8=
+github.com/hashicorp/terraform-json v0.23.0 h1:sniCkExU4iKtTADReHzACkk8fnpQXrdD2xoR+lppBkI=
+github.com/hashicorp/terraform-json v0.23.0/go.mod h1:MHdXbBAbSg0GvzuWazEGKAn/cyNfIB7mN6y7KJN6y2c=
+github.com/hashicorp/terraform-plugin-docs v0.20.1 h1:Fq7E/HrU8kuZu3hNliZGwloFWSYfWEOWnylFhYQIoys=
+github.com/hashicorp/terraform-plugin-docs v0.20.1/go.mod h1:Yz6HoK7/EgzSrHPB9J/lWFzwl9/xep2OPnc5jaJDV90=
github.com/hashicorp/terraform-plugin-framework v1.13.0 h1:8OTG4+oZUfKgnfTdPTJwZ532Bh2BobF4H+yBiYJ/scw=
github.com/hashicorp/terraform-plugin-framework v1.13.0/go.mod h1:j64rwMGpgM3NYXTKuxrCnyubQb/4VKldEKlcG8cvmjU=
github.com/hashicorp/terraform-plugin-framework-jsontypes v0.1.0 h1:b8vZYB/SkXJT4YPbT3trzE6oJ7dPyMy68+9dEDKsJjE=
@@ -262,10 +266,8 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
-github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
-github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
-github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww=
-github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY=
+github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
+github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=
@@ -305,14 +307,16 @@ github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV
github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM=
github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
-github.com/yuin/goldmark v1.6.0 h1:boZcn2GTjpsynOsC0iJHnBWa4Bi0qzfJjthwauItG68=
-github.com/yuin/goldmark v1.6.0/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
+github.com/yuin/goldmark v1.7.7 h1:5m9rrB1sW3JUMToKFQfb+FGt1U7r57IHu5GrYrG2nqU=
+github.com/yuin/goldmark v1.7.7/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
github.com/yuin/goldmark-meta v1.1.0 h1:pWw+JLHGZe8Rk0EGsMVssiNb/AaPMHfSRszZeUeiOUc=
github.com/yuin/goldmark-meta v1.1.0/go.mod h1:U4spWENafuA7Zyg+Lj5RqK/MF+ovMYtBvXi1lBb2VP0=
-github.com/zclconf/go-cty v1.14.4 h1:uXXczd9QDGsgu0i/QFR/hzI5NYCHLf6NQw/atrbnhq8=
-github.com/zclconf/go-cty v1.14.4/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE=
+github.com/zclconf/go-cty v1.15.0 h1:tTCRWxsexYUmtt/wVxgDClUe+uQusuI443uL6e+5sXQ=
+github.com/zclconf/go-cty v1.15.0/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE=
github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b h1:FosyBZYxY34Wul7O/MSKey3txpPYyCqVO5ZyceuQJEI=
github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8=
+go.abhg.dev/goldmark/frontmatter v0.2.0 h1:P8kPG0YkL12+aYk2yU3xHv4tcXzeVnN+gU0tJ5JnxRw=
+go.abhg.dev/goldmark/frontmatter v0.2.0/go.mod h1:XqrEkZuM57djk7zrlRUB02x8I5J0px76YjkOzhB4YlU=
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
@@ -330,8 +334,8 @@ golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTk
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
-golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8=
-golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
+golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0=
+golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -349,8 +353,8 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
-golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
+golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ=
+golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -380,8 +384,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ=
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
-golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=
-golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
+golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug=
+golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
diff --git a/templates/ephemeral-resources.md.tmpl b/templates/ephemeral-resources.md.tmpl
new file mode 100644
index 00000000..a6a247e3
--- /dev/null
+++ b/templates/ephemeral-resources.md.tmpl
@@ -0,0 +1,28 @@
+---
+page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
+{{ if gt (len (split .Description " --- ")) 1 -}}
+subcategory: "{{ index (split .Description " --- ") 0 }}"
+{{- else -}}
+subcategory: ""
+{{- end }}
+description: |-
+{{ if gt (len (split .Description " --- ")) 1 -}}
+{{ index (split .Description " --- ") 1 | plainmarkdown | trimspace | prefixlines " " }}
+{{- else -}}
+{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
+{{- end }}
+---
+
+# {{.Name}} ({{.Type}})
+
+{{ if gt (len (split .Description " --- ")) 1 -}}
+{{ index (split .Description " --- ") 1 | trimspace }}
+{{ else }}
+{{ .Description | trimspace }}
+{{- end }}
+
+## Example Usage
+
+{{ tffile (printf "examples/ephemeral-resources/%s/example.tf" .Name)}}
+
+{{ .SchemaMarkdown | trimspace }}