Skip to content

Commit

Permalink
correcting tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nb-goog committed Nov 18, 2024
1 parent 19e7be4 commit 6de0c29
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
5 changes: 3 additions & 2 deletions examples/autokey-setup/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
*/

module "autokey" {
source = "terraform-google-modules/kms/google//modules/autokey"
version = "3.1.0"
//source = "terraform-google-modules/kms/google//modules/autokey"
//version = "3.1.0"
source = "../../modules/autokey"

autokey_kms_project_id = var.kms_project_id
autokey_folder_number = var.folder_id
Expand Down
2 changes: 1 addition & 1 deletion examples/bucket-setup-using-autokey/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ resource "google_kms_key_handle" "bucket_keyhandle" {
project = var.resource_project_id
name = "${var.bucket_name_prefix}-${random_string.suffix.result}"
location = var.bucket_location
resource_type_selector = var.resource_type_selector
resource_type_selector = var.bucket_resource_type_selector

lifecycle {
ignore_changes = [name]
Expand Down
2 changes: 1 addition & 1 deletion examples/bucket-setup-using-autokey/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ variable "bucket_name_prefix" {
description = "The storage bucket created will have name {bucket_name_prefix}-{random-suffix}"
}

variable "resource_type_selector" {
variable "bucket_resource_type_selector" {
type = string
description = "The resource type selector for bucket"
}
Expand Down
18 changes: 15 additions & 3 deletions test/setup/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,30 @@
* limitations under the License.
*/

output "project_id" {
output "kms_project_id" {
value = module.project_ci_kms.project_id
}

output "autokey_resource_project_id" {
output "resource_project_id" {
value = module.autokey_resource_project.project_id
}

output "autokey_resource_project_number" {
output "resource_project_number" {
value = module.autokey_resource_project.project_number
}

output "bucket_name_prefix" {
value = "ci-kms-bucket"
}

output "bucket_resource_type_selector" {
value = "storage.googleapis.com/Bucket"
}

output "bucket_location" {
value = "us-central1"
}

output "sa_key" {
value = google_service_account_key.int_test.private_key
sensitive = true
Expand Down

0 comments on commit 6de0c29

Please sign in to comment.