GoogleCloudPlatform / GoogleCloudPlatform/database-migration-wave-orchestrator

BUG: Seeing IAP errors if terraform was already executed once

Open
#28 0 comments 0 reactions 1 assignee Claimed by @smpawar View on GitHub
bug
Dominant language
Python
Stars
13
Forks
8
PR merge metrics
No merged PRs in 30d

Description

### Description

Suggestion: There are 2 parts of code which can only deploy once. TF cannot delete it afterward which causes issues when customers deploy and delete. I would suggest we use a separate TF code for the deployment. Providing a manual process may not be a bad idea since it may be created for This will make the Waverunner code run smoothly in TF.

Main.tf - google_iap_brand:

Suggest completely delete the whole block of “google_iap_brand” “project_brand”

Updating the google_iap_client” “project_client” with the brand name from the gcloud command.

#resource "google_iap_brand" "project_brand" {

# support_email = var.oauth_support_contact_email

# application_title = "${var.deployment_name} Application 1"

# project = data.google_project.project.number

# depends_on = [google_project_service.gcp_services]

#}

resource "google_iap_client" "project_client" {

# display_name = "${google_iap_brand.project_brand.application_title} Client"

display_name = "WaveRunner Application"

# brand = [google_iap_brand.project_brand.name](http://google_iap_brand.project_brand.name/)

brand = "projects//brands/"

}

Command to get the brand:

gcloud alpha iap oauth-brands list

Sample Output:

applicationTitle: idmanagement

name: projects//brands/

orgInternalOnly: true

supportEmail:

App_engine.tf - “google_app_engine_application” “app”

#resource "google_app_engine_application" "app" {

# project = var.project_id

# location_id = var.app_engine_location

# iap {

# enabled = true

# oauth2_client_id = google_iap_client.project_client.client_id

# oauth2_client_secret = google_iap_client.project_client.secret

# }

#}

No other modules call variables from this. If we created it manually, It is not required here.

### When do you see the bug

Issue is happening when terraform was already executed once

### Version

latest code

### Priority

priority:2

### What database engine are you seeing the problem on?

None

### Relevant log output

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.