Skip to content

Commit

Permalink
fix: resource_feature_flag_target_group project_id (#693)
Browse files Browse the repository at this point in the history
  • Loading branch information
rssnyder committed Sep 14, 2023
1 parent 52e9bdb commit 5ae8224
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/resources/platform_feature_flag_target_group.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Resource for creating a Harness Feature Flag Target Group.
```terraform
resource "harness_platform_feature_flag_target_group" "target" {
org_id = "test"
project = "test"
project_id = "test"
identifier = "MY_FEATURE"
environment = "MY_ENVIRONMENT"
Expand Down Expand Up @@ -43,7 +43,7 @@ resource "harness_platform_feature_flag_target_group" "target" {
- `identifier` (String) The unique identifier of the feature flag target group.
- `name` (String) The name of the feature flag target group.
- `org_id` (String) Organization Identifier
- `project` (String) Project Identifier
- `project_id` (String) Project Identifier

### Optional

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func ResourceFeatureFlagTargetGroup() *schema.Resource {
Required: true,
ForceNew: true,
},
"project": {
"project_id": {
Description: "Project Identifier",
Type: schema.TypeString,
Required: true,
Expand Down Expand Up @@ -272,7 +272,7 @@ func buildFFTargetGroupQueryParameters(d *schema.ResourceData) *FFTargetGroupQue
return &FFTargetGroupQueryParameters{
Identifier: d.Get("identifier").(string),
OrgID: d.Get("org_id").(string),
Project: d.Get("project").(string),
Project: d.Get("project_id").(string),
AcountID: d.Get("account_id").(string),
Environment: d.Get("environment").(string),
}
Expand All @@ -282,7 +282,7 @@ func buildFFTargetGroupQueryParameters(d *schema.ResourceData) *FFTargetGroupQue
func buildSegmentRequest(d *schema.ResourceData) *SegmentRequest {
opts := &SegmentRequest{
Identifier: d.Get("identifier").(string),
Project: d.Get("project").(string),
Project: d.Get("project_id").(string),
Environment: d.Get("environment").(string),
Name: d.Get("name").(string),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func TestAccResourceFeatureFlagTargetGroup(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr(resourceName, "identifier", id),
resource.TestCheckResourceAttr(resourceName, "org_id", id),
resource.TestCheckResourceAttr(resourceName, "project", id),
resource.TestCheckResourceAttr(resourceName, "project_id", id),
resource.TestCheckResourceAttr(resourceName, "name", targetName),
),
},
Expand All @@ -39,7 +39,7 @@ func TestAccResourceFeatureFlagTargetGroup(t *testing.T) {
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr(resourceName, "identifier", id),
resource.TestCheckResourceAttr(resourceName, "org_id", id),
resource.TestCheckResourceAttr(resourceName, "project", id),
resource.TestCheckResourceAttr(resourceName, "project_id", id),
resource.TestCheckResourceAttr(resourceName, "name", targetName),
),
},
Expand Down Expand Up @@ -125,7 +125,7 @@ func testAccResourceFeatureFlagTarget(id string, name string, updatedName string
resource "harness_platform_feature_flag_target_group" "test" {
identifier = "%[1]s"
org_id = harness_platform_project.test.org_id
project = harness_platform_project.test.id
project_id = harness_platform_project.test.id
environment = harness_platform_environment.test.id
account_id = harness_platform_project.test.id
name = "%[2]s"
Expand Down

0 comments on commit 5ae8224

Please sign in to comment.