added test for import job

This commit is contained in:
Chaitanya Malpe
2023-10-27 11:53:35 +05:30
parent 5d8ff92471
commit 8a76b10161
2 changed files with 39 additions and 8 deletions

View File

@@ -5,14 +5,15 @@ This module allows creating and managing KMS crypto keys and IAM bindings at bot
When using an existing keyring be mindful about applying IAM bindings, as all bindings used by this module are authoritative, and you might inadvertently override bindings managed by the keyring creator.
<!-- BEGIN TOC -->
- [Protecting against destroy](#protecting-against-destroy)
- [Examples](#examples)
- [Using an existing keyring](#using-an-existing-keyring)
- [Keyring creation and crypto key rotation and IAM roles](#keyring-creation-and-crypto-key-rotation-and-iam-roles)
- [Crypto key purpose](#crypto-key-purpose)
- [Import job](#import-job)
- [Variables](#variables)
- [Outputs](#outputs)
- [Google KMS Module](#google-kms-module)
- [Protecting against destroy](#protecting-against-destroy)
- [Examples](#examples)
- [Using an existing keyring](#using-an-existing-keyring)
- [Keyring creation and crypto key rotation and IAM roles](#keyring-creation-and-crypto-key-rotation-and-iam-roles)
- [Crypto key purpose](#crypto-key-purpose)
- [Import job](#import-job)
- [Variables](#variables)
- [Outputs](#outputs)
<!-- END TOC -->
## Protecting against destroy
@@ -115,6 +116,7 @@ module "kms" {
protection_level = "SOFTWARE"
}
}
# tftest modules=1 resources=2 inventory=import-job.yaml
```
<!-- BEGIN TFDOC -->
## Variables

View File

@@ -0,0 +1,29 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
values:
module.kms.google_kms_key_ring_import_job.default[0]:
import_job_id: my-import-job
import_method: RSA_OAEP_3072_SHA1_AES_256
protection_level: SOFTWARE
module.kms.google_kms_key_ring.default[0]:
location: europe-west1
name: test
project: my-project
counts:
google_kms_key_ring_import_job: 1
google_kms_key_ring: 1
modules: 1
resources: 2