Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add computed output field to get the latest cloned version by the provider #190

Merged
merged 2 commits into from
Oct 2, 2019
Merged

Add computed output field to get the latest cloned version by the provider #190

merged 2 commits into from
Oct 2, 2019

Conversation

philippschulte
Copy link
Member

This allows users of the provider to get the latest cloned version by the provider. If the activate field is set to false and the plan output shows changes then the values of active_version and cloned_version are actually different after applying them otherwise, the values are the same. The value of cloned_version is only available after running the terraform apply command. Here are some examples after applying:

  1. Brand new service:
fastly_service_v1.demo: Creating...
fastly_service_v1.demo: Creation complete after 18s [id=5wzq2Rcc7rEg2H6s1AJGdU]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Outputs:

active_version = 1
  1. Updating existing service (activate = true)
fastly_service_v1.demo: Modifying... [id=5wzq2Rcc7rEg2H6s1AJGdU]
fastly_service_v1.demo: Modifications complete after 24s [id=5wzq2Rcc7rEg2H6s1AJGdU]

Apply complete! Resources: 0 added, 1 changed, 0 destroyed.

Outputs:

active_version = 2
cloned_version = 2
  1. Updating existing service (activate = false)
fastly_service_v1.demo: Modifying... [id=5wzq2Rcc7rEg2H6s1AJGdU]
fastly_service_v1.demo: Modifications complete after 25s [id=5wzq2Rcc7rEg2H6s1AJGdU]

Apply complete! Resources: 0 added, 1 changed, 0 destroyed.

Outputs:

active_version = 2
cloned_version = 3

Copy link
Member

@thommahoney thommahoney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 thanks

@philippschulte philippschulte merged commit f518dfe into fastly:master Oct 2, 2019
@philippschulte philippschulte deleted the add-cloned_version-as-computed-schema-field branch October 2, 2019 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants