https://pulumi.com logo
#getting-started
Title
# getting-started
m

mammoth-engineer-60103

11/28/2021, 4:08 PM
Hi I'm new to pulumi I'm running the following code
Copy code
server = aws.ec2.Instance(
    "pulumi_made",
    ami=ami.id,
    vpc_security_group_ids=[security_group.id],
    instance_type="t2.micro",
    tags=common_tags,
    key_name=ec2_key_name,
    # availability_zone="us-east-1a",
    ebs_block_devices=[aws.ec2.InstanceEbsBlockDeviceArgs(
        delete_on_termination=True,
        volume_size=10,
        device_name="/dev/sda1"
    )],
    volume_tags=common_tags
)
everytime I run
Copy code
pulumi up
it recreates a new instance even if the code has not changed. what am I doing wrong? i couldnt find anything in docs.
s

steep-beach-52652

11/29/2021, 10:04 AM
where are u storing the state? and are u using the same state backend everytime?
3 Views