powerflex_firmware_repository (Resource)
This resource is used to manage the Firmware Repository entity of the PowerFlex Array. We can Create and Update the firmware repository using this resource. As part of create operation, we can upload the compliance file and as part of update we can approve the unsigned files.We can also import an existing firmware repository from the PowerFlex array.
Example Usage
/*
Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved.
Licensed under the Mozilla Public License Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://mozilla.org/MPL/2.0/
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
# Example for uploading compliance file. After successful execution, compliance file will be uploaded to the manager.
resource "powerflex_firmware_repository" "upload-test" {
source_location = "https://10.10.10.1/artifactory/Denver/RCMs/SoftwareOnly/PowerFlex_Software_4.5.0.0_287_r1.zip"
username = "user" # To be provided in case of CIFS share
password = "password" # To be provided in case of CIFS share
approve = true # To be used to approve the unsigned file
timeout = 45 #controls that till what time the upload compliance will run
}
After the execution of above resource block, firmware_repository would have been created on the PowerFlex array. For more information, please check the terraform state file.
Schema
Required
source_location
(String) Specfies the path from where it will download the compliance file. Cannot be updated.
Optional
approve
(Boolean) Whether to approve the unsigned file or not.password
(String, Sensitive) Password is only used if specifying a CIFS share Cannot be updated.timeout
(Number) Describes the time in minutes to timeout the job.username
(String) Username is only used if specifying a CIFS share Cannot be updated.
Read-Only
default_catalog
(Boolean) Whether this Firmware Repository is set to default or not.disk_location
(String) Disk location of the Firmware Repositoryfile_name
(String) File Nameid
(String) ID of the Firmware Repositoryname
(String) Name of the Firmware Repository
Import
Import is supported using the following syntax:
# /*
# Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved.
# Licensed under the Mozilla Public License Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://mozilla.org/MPL/2.0/
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# */
# import firmware respository by it's id
terraform import powerflex_firmware_repository.fr_import_by_id "<id>"
# After Import, username and password is not needed for approving the unsigned file in case of CIFS share. For approving the file in case of import, please refer the below config(change the value as per your use-case):
resource "powerflex_firmware_repository" "fr_import_by_id" {
source_location = "https://10.10.10.1/artifactory/Denver/RCMs/SoftwareOnly/PowerFlex_Software_4.5.0.0_287_r1.zip"
approve = true
timeout = 45
}
- This will import the firmware_repository instance with specified ID into your Terraform state.
- After successful import, you can run terraform state list to ensure the resource has been imported successfully.
- Now, you can fill in the resource block with the appropriate arguments and settings that match the imported resource’s real-world configuration.
- Execute terraform plan to see if your configuration and the imported resource are in sync. Make adjustments if needed.
- Finally, execute terraform apply to bring the resource fully under Terraform’s management.
- Now, the resource which was not part of terraform became part of Terraform managed infrastructure.