Skip to content

TEARDOWN_OFF does not seem to work with scopes other than function #42

@adam-turner-j

Description

@adam-turner-j

The following snippet produces an apply and destroy despite the teardown option. Other scopes such as module produce the same result.

@terraform('network', scope='session', teardown=terraform.TEARDOWN_OFF)
def test_network(network):
    assert network['aws_vpc.main.cidr_block'] == '10.0.0.0/16'

When removing the scope argument and letting it default to function, the terraform is applied but not destroyed, as expected. Is there anything I am doing incorrectly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions