github.com/kanishk98/terraform@v1.3.0-dev.0.20220917174235-661ca8088a6a/internal/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  resource "foo" "formerly_count" {
     6    # but not count anymore
     7  }
     8  
     9  resource "foo" "now_count" {
    10    count = 2
    11  }
    12  
    13  resource "foo" "new_no_count" {
    14  }
    15  
    16  resource "foo" "new_count" {
    17    count = 2
    18  }
    19  
    20  resource "foo" "formerly_count_explicit" {
    21    # but not count anymore
    22  }
    23  
    24  moved {
    25    from = foo.formerly_count_explicit[1]
    26    to   = foo.formerly_count_explicit
    27  }
    28  
    29  resource "foo" "now_count_explicit" {
    30    count = 2
    31  }
    32  
    33  moved {
    34    from = foo.now_count_explicit
    35    to   = foo.now_count_explicit[1]
    36  }
    37  
    38  resource "foo" "now_for_each_formerly_count" {
    39    for_each = { a = 1 }
    40  }
    41  
    42  resource "foo" "now_for_each_formerly_no_count" {
    43    for_each = { a = 1 }
    44  }
    45  
    46  resource "foo" "ambiguous" {
    47    # this one doesn't have count in the config, but the test should
    48    # set it up to have both no-key and zero-key instances in the
    49    # state.
    50  }
    51  
    52  module "child" {
    53    source = "./child"
    54  }