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

Error when creating storage pool in shared vpc with terraform #69

Open
vasil166 opened this issue Aug 4, 2022 · 2 comments
Open

Error when creating storage pool in shared vpc with terraform #69

vasil166 opened this issue Aug 4, 2022 · 2 comments
Assignees
Labels
jira Has an Internal Jira Story

Comments

@vasil166
Copy link

vasil166 commented Aug 4, 2022

I am trying to create a storage pool using terraform. Despite providing the shared vpc host project number, it still tries to look for the network in the service project and gives an error.

` # module.cloud_volumes.netapp-gcp_storage_pool.regional-storage-pool will be created

  • resource "netapp-gcp_storage_pool" "regional-storage-pool" {
    • id = (known after apply)
    • name = "prd-si-storage"
    • network = "prd-si-network"
    • region = "us-east1"
    • secondary_zone = "us-east1-c"
    • service_level = "ZoneRedundantStandardSW"
    • shared_vpc_project_number = "832474926329"
    • size = 1024
    • storage_class = "software"
    • zone = "us-east1-b"
      }
      `

│ Error: Error when creating - VPC peering network for TenancyUnit 'projects/642414531654/global/networks/prd-si-network' not found. Use the correct vpc name and ensure VPC network peering with tenant project has already been established.

There are no issues when trying to create the pool manually and the private service peering is already set up. I also tried to import the manually created pool into terraform, but looks like that feature isn't implemented yet.

@okrause
Copy link
Contributor

okrause commented Aug 4, 2022

@wenjun666 Please have a look.

I looked in the code and looks pools are missing handling of shared_vpc_project_number.
For volume, we read shared_vpc_project_number in resourceGCPVolumeCreate
I don't see us doing that in resourceGCPStoragePoolCreate

Also, in resourceGCPVolumeRead we have some code which we need to mirror for pools.

The special handling we did for importing volumes also isn't in the pool code.

@wenjun666 wenjun666 added the jira Has an Internal Jira Story label Aug 9, 2022
@wenjun666 wenjun666 self-assigned this Aug 9, 2022
@okrause
Copy link
Contributor

okrause commented Oct 13, 2022

Fixed in v22.8.1. Please close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira Has an Internal Jira Story
Projects
None yet
Development

No branches or pull requests

3 participants