kubeform.dev/terraform-backend-sdk@v0.0.0-20220310143633-45f07fe731c5/refactoring/testdata/move-statement-implied/move-statement-implied.tf (about)

     1  # This fixture is useful only in conjunction with a previous run state that
     2  # conforms to the statements encoded in the resource names. It's for
     3  # TestImpliedMoveStatements only.
     4  
     5  terraform {
     6    experiments = [config_driven_move]
     7  }
     8  
     9  resource "foo" "formerly_count" {
    10    # but not count anymore
    11  }
    12  
    13  resource "foo" "now_count" {
    14    count = 2
    15  }
    16  
    17  resource "foo" "new_no_count" {
    18  }
    19  
    20  resource "foo" "new_count" {
    21    count = 2
    22  }
    23  
    24  resource "foo" "formerly_count_explicit" {
    25    # but not count anymore
    26  }
    27  
    28  moved {
    29    from = foo.formerly_count_explicit[1]
    30    to   = foo.formerly_count_explicit
    31  }
    32  
    33  resource "foo" "now_count_explicit" {
    34    count = 2
    35  }
    36  
    37  moved {
    38    from = foo.now_count_explicit
    39    to   = foo.now_count_explicit[1]
    40  }
    41  
    42  resource "foo" "ambiguous" {
    43    # this one doesn't have count in the config, but the test should
    44    # set it up to have both no-key and zero-key instances in the
    45    # state.
    46  }