-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add terraform plan generation methods
- Loading branch information
Showing
9 changed files
with
204 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/main/java/org/eclipse/xpanse/terraform/boot/models/plan/TerraformPlan.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* SPDX-FileCopyrightText: Huawei Inc. | ||
*/ | ||
|
||
package org.eclipse.xpanse.terraform.boot.models.plan; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
/** | ||
* Data model to represent terraform plan output. | ||
*/ | ||
@Data | ||
@Builder | ||
public class TerraformPlan { | ||
|
||
@NotNull | ||
@Schema(description = "Terraform plan as a JSON string") | ||
String plan; | ||
} |
30 changes: 30 additions & 0 deletions
30
...java/org/eclipse/xpanse/terraform/boot/models/plan/TerraformPlanFromDirectoryRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* SPDX-FileCopyrightText: Huawei Inc. | ||
*/ | ||
|
||
package org.eclipse.xpanse.terraform.boot.models.plan; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotNull; | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
import lombok.Data; | ||
|
||
/** | ||
* Data model for the generating terraform plan. | ||
*/ | ||
@Data | ||
public class TerraformPlanFromDirectoryRequest { | ||
|
||
@NotNull | ||
@Schema(description = "Key-value pairs of variables that must be used to execute the " | ||
+ "Terraform request.", | ||
additionalProperties = Schema.AdditionalPropertiesValue.TRUE) | ||
Map<String, Object> variables; | ||
|
||
@Schema(description = "Key-value pairs of variables that must be injected as environment " | ||
+ "variables to terraform process.", | ||
additionalProperties = Schema.AdditionalPropertiesValue.TRUE) | ||
Map<String, String> envVariables = new HashMap<>(); | ||
} |
25 changes: 25 additions & 0 deletions
25
...n/java/org/eclipse/xpanse/terraform/boot/models/plan/TerraformPlanWithScriptsRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* SPDX-FileCopyrightText: Huawei Inc. | ||
* | ||
*/ | ||
|
||
package org.eclipse.xpanse.terraform.boot.models.plan; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.NotNull; | ||
import java.util.List; | ||
import lombok.Data; | ||
|
||
/** | ||
* Data model for the generating terraform plan. | ||
*/ | ||
@Data | ||
public class TerraformPlanWithScriptsRequest extends TerraformPlanFromDirectoryRequest { | ||
|
||
@NotNull | ||
@Schema(description = | ||
"List of terraform script files to be considered for generating terraform plan") | ||
private List<String> scripts; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.