@@ -158,15 +158,15 @@ func TestAccKmsCryptoKey_basic(t *testing.T) {
158158 ResourceName: " google_kms_crypto_key.crypto_key" ,
159159 ImportState: true,
160160 ImportStateVerify: true,
161- ImportStateVerifyIgnore: []string{" labels" , " terraform_labels" },
161+ ImportStateVerifyIgnore: []string{" skip_initial_version_creation " , " labels" , " terraform_labels" },
162162 },
163163 // Test importing with a short id
164164 {
165165 ResourceName: " google_kms_crypto_key.crypto_key" ,
166166 ImportState: true,
167167 ImportStateId: fmt.Sprintf (" %s /%s /%s /%s " , projectId, location, keyRingName, cryptoKeyName),
168168 ImportStateVerify: true,
169- ImportStateVerifyIgnore: []string{" labels" , " terraform_labels" },
169+ ImportStateVerifyIgnore: []string{" skip_initial_version_creation " , " labels" , " terraform_labels" },
170170 },
171171 // Use a separate TestStep rather than a CheckDestroy because we need the project to still exist.
172172 {
@@ -203,25 +203,28 @@ func TestAccKmsCryptoKey_rotation(t *testing.T) {
203203 Config: testGoogleKmsCryptoKey_rotation(projectId, projectOrg, projectBillingAccount, keyRingName, cryptoKeyName, rotationPeriod),
204204 },
205205 {
206- ResourceName: " google_kms_crypto_key.crypto_key" ,
207- ImportState: true,
208- ImportStateVerify: true,
206+ ResourceName: " google_kms_crypto_key.crypto_key" ,
207+ ImportState: true,
208+ ImportStateVerify: true,
209+ ImportStateVerifyIgnore: []string{" skip_initial_version_creation" },
209210 },
210211 {
211212 Config: testGoogleKmsCryptoKey_rotation(projectId, projectOrg, projectBillingAccount, keyRingName, cryptoKeyName, updatedRotationPeriod),
212213 },
213214 {
214- ResourceName: " google_kms_crypto_key.crypto_key" ,
215- ImportState: true,
216- ImportStateVerify: true,
215+ ResourceName: " google_kms_crypto_key.crypto_key" ,
216+ ImportState: true,
217+ ImportStateVerify: true,
218+ ImportStateVerifyIgnore: []string{" skip_initial_version_creation" },
217219 },
218220 {
219221 Config: testGoogleKmsCryptoKey_rotationRemoved(projectId, projectOrg, projectBillingAccount, keyRingName, cryptoKeyName),
220222 },
221223 {
222- ResourceName: " google_kms_crypto_key.crypto_key" ,
223- ImportState: true,
224- ImportStateVerify: true,
224+ ResourceName: " google_kms_crypto_key.crypto_key" ,
225+ ImportState: true,
226+ ImportStateVerify: true,
227+ ImportStateVerifyIgnore: []string{" skip_initial_version_creation" },
225228 },
226229 // Use a separate TestStep rather than a CheckDestroy because we need the project to still exist.
227230 {
@@ -256,17 +259,19 @@ func TestAccKmsCryptoKey_template(t *testing.T) {
256259 Config: testGoogleKmsCryptoKey_template(projectId, projectOrg, projectBillingAccount, keyRingName, cryptoKeyName, algorithm),
257260 },
258261 {
259- ResourceName: " google_kms_crypto_key.crypto_key" ,
260- ImportState: true,
261- ImportStateVerify: true,
262+ ResourceName: " google_kms_crypto_key.crypto_key" ,
263+ ImportState: true,
264+ ImportStateVerify: true,
265+ ImportStateVerifyIgnore: []string{" skip_initial_version_creation" },
262266 },
263267 {
264268 Config: testGoogleKmsCryptoKey_template(projectId, projectOrg, projectBillingAccount, keyRingName, cryptoKeyName, updatedAlgorithm),
265269 },
266270 {
267- ResourceName: " google_kms_crypto_key.crypto_key" ,
268- ImportState: true,
269- ImportStateVerify: true,
271+ ResourceName: " google_kms_crypto_key.crypto_key" ,
272+ ImportState: true,
273+ ImportStateVerify: true,
274+ ImportStateVerifyIgnore: []string{" skip_initial_version_creation" },
270275 },
271276 // Use a separate TestStep rather than a CheckDestroy because we need the project to still exist.
272277 {
@@ -302,7 +307,7 @@ func TestAccKmsCryptoKey_destroyDuration(t *testing.T) {
302307 ResourceName: " google_kms_crypto_key.crypto_key" ,
303308 ImportState: true,
304309 ImportStateVerify: true,
305- ImportStateVerifyIgnore: []string{" labels" , " terraform_labels" },
310+ ImportStateVerifyIgnore: []string{" skip_initial_version_creation " , " labels" , " terraform_labels" },
306311 },
307312 // Use a separate TestStep rather than a CheckDestroy because we need the project to still exist.
308313 {
@@ -344,7 +349,7 @@ func TestAccKmsCryptoKey_keyAccessJustificationsPolicy(t *testing.T) {
344349 ResourceName: " google_kms_crypto_key.crypto_key" ,
345350 ImportState: true,
346351 ImportStateVerify: true,
347- ImportStateVerifyIgnore: []string{" labels" , " terraform_labels" },
352+ ImportStateVerifyIgnore: []string{" skip_initial_version_creation " , " labels" , " terraform_labels" },
348353 },
349354 {
350355 Config: testGoogleKmsCryptoKey_keyAccessJustificationsPolicy(projectId, projectOrg, projectBillingAccount, keyRingName, cryptoKeyName, updatedAllowedAccessReason),
@@ -353,7 +358,7 @@ func TestAccKmsCryptoKey_keyAccessJustificationsPolicy(t *testing.T) {
353358 ResourceName: " google_kms_crypto_key.crypto_key" ,
354359 ImportState: true,
355360 ImportStateVerify: true,
356- ImportStateVerifyIgnore: []string{" labels" , " terraform_labels" },
361+ ImportStateVerifyIgnore: []string{" skip_initial_version_creation " , " labels" , " terraform_labels" },
357362 },
358363 // Use a separate TestStep rather than a CheckDestroy because we need the project to still exist.
359364 {
0 commit comments