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

Feature/add google vpc access connector #391

Conversation

bradkwadsworth-mw
Copy link
Contributor

Description of your changes

Added google_vpc_access_connector. Adding this resource required the cloud_run.service reference in google_compute_region_network_endpoint_group to be disabled because of an import cycle error.
Fixes #218 #162

I have:

  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

Applied to a local Kind cluster.
Screenshot 2023-09-14 at 5 15 42 PM

@jeanduplessis
Copy link
Collaborator

/test-examples="examples/vpcaccess/connector.yaml"

1 similar comment
@bradkwadsworth-mw
Copy link
Contributor Author

/test-examples="examples/vpcaccess/connector.yaml"

@bradkwadsworth-mw bradkwadsworth-mw force-pushed the feature/add-google_vpc_access_connector branch from 7c231ad to 56aad43 Compare September 18, 2023 14:50
@bradkwadsworth-mw
Copy link
Contributor Author

/test-examples="examples/vpcaccess/connector.yaml"

@bradkwadsworth-mw
Copy link
Contributor Author

Not sure why uptest is failing. I applied the same example to a local Kind cluster and the example network and vpc access connector came up fine.

@turkenf
Copy link
Collaborator

turkenf commented Sep 19, 2023

You can check by downloading the controlplane-dump file and opening the provider logs. Open the uptest job > scroll down the page and click on controlplane-dump > click on the upbound-system file > click on the provider-gcp-monolith-provider-gcp-... file. It says:

error": "cannot run refresh: refresh failed: Error when reading or editing VPCAccessConnector \"projects/official-provider-testing/locations/us-central1/connectors/connector\": Get \"https://vpcaccess.googleapis.com/v1/projects/official-provider-testing/locations/us-central1/connectors/connector?alt=json\": oauth2: cannot fetch token: 400 Bad Request\nResponse: {\"error\":\"invalid_grant\",\"error_description\":\"Invalid JWT Signature.\"}: ", "errorVerbose": "refresh failed:

@bradkwadsworth-mw
Copy link
Contributor Author

You can check by downloading the controlplane-dump file and opening the provider logs. Open the uptest job > scroll down the page and click on controlplane-dump > click on the upbound-system file > click on the provider-gcp-monolith-provider-gcp-... file. It says:

error": "cannot run refresh: refresh failed: Error when reading or editing VPCAccessConnector \"projects/official-provider-testing/locations/us-central1/connectors/connector\": Get \"https://vpcaccess.googleapis.com/v1/projects/official-provider-testing/locations/us-central1/connectors/connector?alt=json\": oauth2: cannot fetch token: 400 Bad Request\nResponse: {\"error\":\"invalid_grant\",\"error_description\":\"Invalid JWT Signature.\"}: ", "errorVerbose": "refresh failed:

Is there an API or IAM permission that needs to be granted in the testing project? I don't seem to get this error in the project I have tested.

@turkenf
Copy link
Collaborator

turkenf commented Sep 22, 2023

/test-examples="examples/vpcaccess/connector.yaml"

1 similar comment
@turkenf
Copy link
Collaborator

turkenf commented Sep 22, 2023

/test-examples="examples/vpcaccess/connector.yaml"

@turkenf
Copy link
Collaborator

turkenf commented Sep 22, 2023

@bradkwadsworth-mw, if the uptest run fails again, you can check the logs, and the issue with the secret/permission is solved.

@bradkwadsworth-mw
Copy link
Contributor Author

bradkwadsworth-mw commented Sep 25, 2023

Seeing this error in the log:

Serverless VPC Access API has not been used in project official-provider-testing before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/vpcaccess.googleapis.com/overview?project=official-provider-testing then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry

@turkenf
Copy link
Collaborator

turkenf commented Sep 25, 2023

/test-examples="examples/vpcaccess/connector.yaml"

Copy link
Collaborator

@turkenf turkenf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your effort in this PR @bradkwadsworth-mw, I left two small comments for you to consider.

config/cloudrun/config.go Outdated Show resolved Hide resolved
config/cloudrun/config.go Outdated Show resolved Hide resolved
@turkenf
Copy link
Collaborator

turkenf commented Sep 26, 2023

/test-examples="examples/vpcaccess/connector.yaml"

Copy link
Collaborator

@turkenf turkenf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @bradkwadsworth-mw, LGTM.

@turkenf turkenf merged commit d19d760 into crossplane-contrib:main Sep 26, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Moving vpcaccess(1) resource to v1beta1 version
3 participants