Giter Site home page Giter Site logo

Comments (8)

arjgupta avatar arjgupta commented on July 28, 2024

@Jeppeks1 I have marked this as an enhancement. Right now there is no timeline for when this might be picked up. You can also contribute this feature to the extension by raising a PR and we'd be happy to merge it and release.

from azure-pipelines-terraform.

ynden avatar ynden commented on July 28, 2024

Hello,
I made a pull request @arjgupta, @AmrutaKawade can you please review it.

Thanks!

from azure-pipelines-terraform.

oskarm93 avatar oskarm93 commented on July 28, 2024

Nearly a year later and this is still making my deployments twice as long as they should be, and triggering rate limiting on my providers.

from azure-pipelines-terraform.

MOlausson avatar MOlausson commented on July 28, 2024

Quick update, we've started testing a fix for this.

from azure-pipelines-terraform.

mericstam avatar mericstam commented on July 28, 2024

should work now. Still facing issues? reopen the issue if you do.

from azure-pipelines-terraform.

oskarm93 avatar oskarm93 commented on July 28, 2024

@mericstam Hello. Please re-open this issue. I have managed to reproduce using both TerraformTaskV1@0 (version resolved to 0.203.0) and TerraformTaskV2@2 (version resolved to 2.203.0).

Repro pipeline:

name: $(Rev:rr)
trigger:
- main
variables:
  system.debug: true
  tf_dir: $(Build.SourcesDirectory)/terraform
  azure_connection: <redacted>

steps:
- task: TerraformTaskV2@2
  displayName: init
  inputs:
    provider: azurerm
    command: init
    workingDirectory: $(tf_dir)
    backendServiceArm: $(azure_connection)
    backendAzureRmResourceGroupName: <redacted>
    backendAzureRmStorageAccountName: <redacted>
    backendAzureRmContainerName: terraform-state-files
    backendAzureRmKey: omtest.tfstate

- task: TerraformTaskV2@2
  displayName: plan
  inputs:
    provider: azurerm
    command: plan
    workingDirectory: $(tf_dir)
    environmentServiceNameAzureRM: $(azure_connection)

Task log output (V2):
7.txt

You can see in the debug log that terraform plan command runs twice with different parameters:
1:

2022-04-29T04:19:31.0918453Z ##[debug]exec tool: /usr/local/bin/terraform
2022-04-29T04:19:31.0919238Z ##[debug]arguments:
2022-04-29T04:19:31.0920008Z ##[debug]   plan
2022-04-29T04:19:31.0921103Z ##[debug]   -detailed-exitcode
2022-04-29T04:19:31.0921798Z [command]/usr/local/bin/terraform plan -detailed-exitcode
2022-04-29T04:19:32.9006741Z 
2022-04-29T04:19:32.9035932Z �[0m�[1m�[32mNo changes.�[0m�[1m Your infrastructure matches the configuration.�[0m
2022-04-29T04:19:32.9036513Z 
2022-04-29T04:19:32.9037379Z �[0mTerraform has compared your real infrastructure against your configuration
2022-04-29T04:19:32.9038182Z and found no differences, so no changes are needed.

2:

2022-04-29T04:19:33.0580368Z ##[debug]exec tool: /usr/local/bin/terraform
2022-04-29T04:19:33.0581372Z ##[debug]arguments:
2022-04-29T04:19:33.0582132Z ##[debug]   plan
2022-04-29T04:19:33.0583386Z ##[debug]   -out=/home/vsts/work/1/s/plan-binary-d799e9be-e8f4-4f0a-bb9f-f607e169b205.tfplan

Initially I thought it's just a mistake in the logs so I decided to test how many times plan gets called by using side-effects.
I added a http data resource to terraform file to call an Azure Function and log the number of requests during pipeline by Application Insights.

data "http" "example" {
  url = "https://<redacted>.azurewebsites.net/api/HttpTrigger1?code=<redacted>==&name=test2"
}

image

from azure-pipelines-terraform.

mericstam avatar mericstam commented on July 28, 2024

Hi,
Yes you are right @xenalite , I closed this by mistake. This will be fixed in V3 that is on it way. still facing some Issues in testing V3. Was initially planned for this week. but aiming for next now. I will keep this open util V3 is out

from azure-pipelines-terraform.

mericstam avatar mericstam commented on July 28, 2024

Hi, V3 release is out in version 0.1.17 on the Marketplace.

from azure-pipelines-terraform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.