Skip to content

Infra sample bicep template should be idempotent #89

Closed
@jmal1

Description

@jmal1

infra/main.bicep currently defines a seed:

@description('Random seed to be used during generation of new resources suffixes.')
param seed string = newGuid()

The result is that re-running the bicep template (with or without updates) will create an entirely new RG and infra stack, rather than updating existing resources. This violates the idempotent and deterministic properties of bicep/ARM templates

Instead, the user should provide the suffix to be used when creating the resources. This will allow users to reuse the samples as there are more updates or as they make modifications.

I'm thinking something like:

param suffix string // no default value. This template should not be valid without a valid suffix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions