Skip to content

Commit ba1ae8f

Browse files
committed
Revert "(feat): Add data sources for all resources, and add service account resource."
This reverts commit b3b9617.
1 parent 00bf4de commit ba1ae8f

7 files changed

+10
-721
lines changed

example/main.tf

+9-24
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,18 @@ provider "pomerium" {
1414
shared_secret_b64 = "9OkZR6hwfmVD3a7Sfmgq58lUbFJGGz4hl/R9xbHFCAg="
1515
}
1616

17-
# Create resources
18-
resource "pomerium_namespace" "test_namespace" {
19-
name = "test-namespace"
20-
parent_id = "9d8dbd2c-8cce-4e66-9c1f-c490b4a07243"
17+
# resource "pomerium_namespace" "test_namespace" {
18+
# name = "test-namespace"
19+
# parent_id = "9d8dbd2c-8cce-4e66-9c1f-c490b4a07243"
20+
# }
21+
22+
locals {
23+
namespace_id = "9d8dbd2c-8cce-4e66-9c1f-c490b4a07243"
2124
}
2225

2326
resource "pomerium_policy" "test_policy" {
2427
name = "test-policy"
25-
namespace_id = pomerium_namespace.test_namespace.id
28+
namespace_id = local.namespace_id
2629
ppl = <<EOF
2730
- allow:
2831
and:
@@ -32,26 +35,8 @@ EOF
3235

3336
resource "pomerium_route" "test_route" {
3437
name = "test-route"
35-
namespace_id = pomerium_namespace.test_namespace.id
38+
namespace_id = local.namespace_id
3639
from = "https://verify-tf.localhost.pomerium.io"
3740
to = ["https://verify.pomerium.com"]
3841
policies = [pomerium_policy.test_policy.id]
3942
}
40-
41-
# Data source examples
42-
data "pomerium_namespace" "existing_namespace" {
43-
id = "9d8dbd2c-8cce-4e66-9c1f-c490b4a07243"
44-
}
45-
46-
data "pomerium_route" "existing_route" {
47-
id = pomerium_route.test_route.id
48-
}
49-
50-
# Output examples
51-
output "namespace_name" {
52-
value = data.pomerium_namespace.existing_namespace.name
53-
}
54-
55-
output "route_from" {
56-
value = data.pomerium_route.existing_route.from
57-
}

internal/provider/namespace_data_source.go

-100
This file was deleted.

internal/provider/policy_data_source.go

-106
This file was deleted.

internal/provider/provider.go

+1-7
Original file line numberDiff line numberDiff line change
@@ -122,17 +122,11 @@ func (p *PomeriumProvider) Resources(_ context.Context) []func() resource.Resour
122122
NewNamespaceResource,
123123
NewRouteResource,
124124
NewPolicyResource,
125-
NewServiceAccountResource,
126125
}
127126
}
128127

129128
func (p *PomeriumProvider) DataSources(_ context.Context) []func() datasource.DataSource {
130-
return []func() datasource.DataSource{
131-
NewServiceAccountDataSource,
132-
NewRouteDataSource,
133-
NewNamespaceDataSource,
134-
NewPolicyDataSource,
135-
}
129+
return []func() datasource.DataSource{}
136130
}
137131

138132
func (p *PomeriumProvider) Functions(_ context.Context) []func() function.Function {

internal/provider/route_data_source.go

-120
This file was deleted.

0 commit comments

Comments
 (0)