Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: MVE Palo Alto Config #148

Merged
merged 5 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/resources/mve.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Optional:
- `account_key` (String) The account key for the vendor config. Enter the Account Key from Aruba Orchestrator. The key is linked to the Account Name. Required for Aruba MVE.
- `account_name` (String) The account name for the vendor config. Enter the Account Name from Aruba Orchestrator. To view your Account Name, log in to Orchestrator and choose Orchestrator > Licensing | Cloud Portal. Required for Aruba MVE.
- `admin_password_hash` (String) The admin password hash for the vendor config. Required for Palo Alto MVE.
- `admin_ssh_public_key` (String) The admin SSH public key for the vendor config. Required for Cisco, Fortinet, Palo Alto, and Vmware MVEs.
- `admin_ssh_public_key` (String) The admin SSH public key for the vendor config. Required for Cisco, Fortinet, and Vmware MVEs.
- `cloud_init` (String) The cloud init for the vendor config. The bootstrap configuration file. Download this for your device from vManage. Required for Cisco MVE.
- `controller_address` (String) The controldler address for the vendor config. A FQDN (Fully Qualified Domain Name) or IPv4 address of your Versa Controller. Required for Versa MVE.
- `director_address` (String) The director address for the vendor config. A FQDN (Fully Qualified Domain Name) or IPv4 address of your Versa Director. Required for Versa MVE.
Expand All @@ -114,7 +114,7 @@ Optional:
- `mve_label` (String) The MVE label for the vendor config.
- `remote_auth` (String) The remote auth for the vendor config. Enter the Remote Auth string as configured in your Versa Director. Required for Versa MVE.
- `serial_number` (String) The serial number for the vendor config. Enter the serial number that you specified when creating the device in Versa Director. Required for Versa MVE.
- `ssh_public_key` (String) The SSH public key for the vendor config. Required for VMWare and Fortinet MVEs. Megaport supports the 2048-bit RSA key type.
- `ssh_public_key` (String) The SSH public key for the vendor config. Required for VMWare, Palo Alto, and Fortinet MVEs. Megaport supports the 2048-bit RSA key type.
- `system_tag` (String) The system tag for the vendor config. Aruba Orchestrator System Tags and preconfiguration templates register the EC-V with the Cloud Portal and Orchestrator, and enable Orchestrator to automatically accept and configure newly discovered EC-V appliances. If you created a preconfiguration template in Orchestrator, enter the System Tag you specified here. Required for Aruba MVE.
- `token` (String) The token for the vendor config. Required for Meraki MVE.
- `vco_activation_code` (String) The VCO activation code for the vendor config. This is provided by Orchestrator after creating the edge device. Required for VMware MVE.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/hashicorp/terraform-plugin-framework-validators v0.12.0
github.com/hashicorp/terraform-plugin-go v0.22.1
github.com/hashicorp/terraform-plugin-log v0.9.0
github.com/megaport/megaportgo v1.1.0
github.com/megaport/megaportgo v1.2.0
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/megaport/megaportgo v1.1.0 h1:D0ZKfFWQO+EV6j0om3rg+gZQ3bE7zVN0yR21soO+pK8=
github.com/megaport/megaportgo v1.1.0/go.mod h1:I+8jJioFFsF+55sxFYCgcKNUENaOpqzwlsIu6NGA7qk=
github.com/megaport/megaportgo v1.2.0 h1:LLI+3OaK4BzUMazuQm1TAptRaQbGrTp+wDxEjkARCNE=
github.com/megaport/megaportgo v1.2.0/go.mod h1:I+8jJioFFsF+55sxFYCgcKNUENaOpqzwlsIu6NGA7qk=
github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
Expand Down
6 changes: 3 additions & 3 deletions internal/provider/mve_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ func toAPIVendorConfig(v *vendorConfigModel) (megaport.VendorConfig, diag.Diagno
ImageID: int(v.ImageID.ValueInt64()),
ProductSize: v.ProductSize.ValueString(),
MVELabel: v.MVELabel.ValueString(),
AdminSSHPublicKey: v.AdminSSHPublicKey.ValueString(),
SSHPublicKey: v.SSHPublicKey.ValueString(),
AdminPasswordHash: v.AdminPasswordHash.ValueString(),
LicenseData: v.LicenseData.ValueString(),
}
Expand Down Expand Up @@ -568,11 +568,11 @@ func (r *mveResource) Schema(_ context.Context, _ resource.SchemaRequest, resp *
Optional: true,
},
"admin_ssh_public_key": schema.StringAttribute{
Description: "The admin SSH public key for the vendor config. Required for Cisco, Fortinet, Palo Alto, and Vmware MVEs.",
Description: "The admin SSH public key for the vendor config. Required for Cisco, Fortinet, and Vmware MVEs.",
Optional: true,
},
"ssh_public_key": schema.StringAttribute{
Description: "The SSH public key for the vendor config. Required for VMWare and Fortinet MVEs. Megaport supports the 2048-bit RSA key type.",
Description: "The SSH public key for the vendor config. Required for VMWare, Palo Alto, and Fortinet MVEs. Megaport supports the 2048-bit RSA key type.",
Optional: true,
},
"cloud_init": schema.StringAttribute{
Expand Down