Closed mxm-tr closed 3 months ago
…ions
Changes the type of ip_restrictions in containerregistry_ip_restrictions resources and data from schema.TypeList to schema.TypeSet.
schema.TypeList
schema.TypeSet
Fixes #636
Tests have been added to verify that the order of the ip_restrictions does not influence the configuration and the state.
make testacc TESTARGS="-run ^.*ContainerRegistry.*$"
Test Configuration:
terraform version
terraform { required_providers { ovh = { source = "ovh/ovh" source = "terraform.local/local/ovh" } } } provider "ovh" { endpoint = "ovh-eu" application_key = "xxx" application_secret = "yyy" consumer_key = "zzz" } data "ovh_cloud_project_capabilities_containerregistry_filter" "regcap" { service_name = "xxx" plan_name = "SMALL" region = "GRA" } resource "ovh_cloud_project_containerregistry" "registry" { service_name = data.ovh_cloud_project_capabilities_containerregistry_filter.regcap.service_name plan_id = data.ovh_cloud_project_capabilities_containerregistry_filter.regcap.id region = data.ovh_cloud_project_capabilities_containerregistry_filter.regcap.region name = "mydockerregistry" } resource "ovh_cloud_project_containerregistry_ip_restrictions_management" "my-mgt-iprestrictions" { service_name = ovh_cloud_project_containerregistry.registry.service_name registry_id = ovh_cloud_project_containerregistry.registry.id ip_restrictions = [ { ip_block = "192.168.0.1/32" description = "xxxxxxx" }, { ip_block = "192.168.0.3/32" description = "xxxxxxx" } ] } resource "ovh_cloud_project_containerregistry_ip_restrictions_registry" "my-registry-iprestrictions" { service_name = ovh_cloud_project_containerregistry.registry.service_name registry_id = ovh_cloud_project_containerregistry.registry.id ip_restrictions = [ { ip_block = "192.168.0.1/32" description = "xxxxxxx" }, { ip_block = "192.168.0.4/32" description = "xxxxxxx" } ] }
go mod vendor
go.mod
@mxm-tr any news ?
Yes, I had some questions about the comments on the review, cf the comments above
…ions
Description
Changes the type of ip_restrictions in containerregistry_ip_restrictions resources and data from
schema.TypeList
toschema.TypeSet
.Fixes #636
Type of change
How Has This Been Tested?
Tests have been added to verify that the order of the ip_restrictions does not influence the configuration and the state.
make testacc TESTARGS="-run ^.*ContainerRegistry.*$"
Test Configuration:
terraform version
: Terraform v1.5.6Checklist:
go mod vendor
if I added or modifygo.mod
file