Skip to content

Commit

Permalink
ci: fix github action
Browse files Browse the repository at this point in the history
  • Loading branch information
mcuadros committed Apr 6, 2021
1 parent d51fb0c commit 105761d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 175 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [1.13.x, 1.14.x]
go-version: [1.15.x, 1.16.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@v2

- name: Allow skip provisioner tests
uses: allenevans/set-env@v1.0.0
uses: allenevans/set-env@v2.0.0
if: matrix.os != 'ubuntu-latest'
with:
ALLOW_PROVISIONER_SKIP: 1
Expand Down
11 changes: 9 additions & 2 deletions starlark/types/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,18 @@ func (s *State) initializeResource(p *Provider, r *states.Resource) error {
mode := addrsResourceModeString(r.Addr.Mode)

var schema providers.Schema
var ok bool
switch r.Addr.Mode {
case addrs.DataResourceMode:
schema = p.dataSources.schemas[typ]
schema, ok = p.dataSources.schemas[typ]
if !ok {
return fmt.Errorf("unknown data resource %s", typ)
}
case addrs.ManagedResourceMode:
schema = p.resources.schemas[typ]
schema, ok = p.resources.schemas[typ]
if !ok {
return fmt.Errorf("unknown resource %s", typ)
}
default:
return fmt.Errorf("invalid resource type")
}
Expand Down
32 changes: 0 additions & 32 deletions starlark/types/fixtures/state/terraform.tfstate
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,6 @@
}
]
},
{
"mode": "data",
"type": "helm_repository",
"name": "stable",
"provider": "provider.helm.default",
"instances": [
{
"schema_version": 0,
"attributes": {
"ca_file": null,
"cert_file": null,
"id": "stable",
"key_file": null,
"metadata": [
{
"name": "stable",
"url": "https://kubernetes-charts.storage.googleapis.com"
}
],
"name": "stable",
"password": null,
"url": "https://kubernetes-charts.storage.googleapis.com",
"username": null
}
}
]
},
{
"mode": "managed",
"type": "google_container_cluster",
Expand Down Expand Up @@ -352,7 +325,6 @@
"reuse_values": false,
"set": [],
"set_sensitive": [],
"set_string": [],
"skip_crds": false,
"status": "deployed",
"timeout": 300,
Expand Down Expand Up @@ -424,7 +396,6 @@
}
],
"set_sensitive": [],
"set_string": [],
"skip_crds": false,
"status": "deployed",
"timeout": 300,
Expand Down Expand Up @@ -498,7 +469,6 @@
}
],
"set_sensitive": [],
"set_string": [],
"skip_crds": false,
"status": "deployed",
"timeout": 300,
Expand Down Expand Up @@ -565,7 +535,6 @@
}
],
"set_sensitive": [],
"set_string": [],
"skip_crds": false,
"status": "deployed",
"timeout": 300,
Expand Down Expand Up @@ -626,7 +595,6 @@
"reuse_values": false,
"set": [],
"set_sensitive": [],
"set_string": [],
"skip_crds": false,
"status": "deployed",
"timeout": 300,
Expand Down
4 changes: 4 additions & 0 deletions starlark/types/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@ func NewResource(
b *configschema.Block, provider *Provider, parent *Resource,
cs starlark.CallStack,
) *Resource {

if b == nil {
b.Attributes["fpoo"] = nil
}
return &Resource{
name: name,
typ: typ,
Expand Down
2 changes: 1 addition & 1 deletion starlark/types/testdata/examples/provider_resource.star
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
helm = tf.provider("helm")
helm = tf.provider("helm", "1.0.0")

podinfo = helm.resource.release("podinfo")
podinfo.chart = "podinfo"
Expand Down
138 changes: 0 additions & 138 deletions starlark/types/testdata/examples/terraform.tfstate
Original file line number Diff line number Diff line change
Expand Up @@ -23,33 +23,6 @@
}
]
},
{
"mode": "data",
"type": "helm_repository",
"name": "stable",
"provider": "provider.helm.default",
"instances": [
{
"schema_version": 0,
"attributes": {
"ca_file": null,
"cert_file": null,
"id": "stable",
"key_file": null,
"metadata": [
{
"name": "stable",
"url": "https://kubernetes-charts.storage.googleapis.com"
}
],
"name": "stable",
"password": null,
"url": "https://kubernetes-charts.storage.googleapis.com",
"username": null
}
}
]
},
{
"mode": "managed",
"type": "google_container_cluster",
Expand All @@ -59,19 +32,6 @@
{
"schema_version": 1,
"attributes": {
"additional_zones": [],
"addons_config": [
{
"horizontal_pod_autoscaling": [],
"http_load_balancing": [],
"kubernetes_dashboard": [],
"network_policy_config": [
{
"disabled": true
}
]
}
],
"authenticator_groups_config": [],
"cluster_autoscaling": [
{
Expand Down Expand Up @@ -127,37 +87,6 @@
"provider": "PROVIDER_UNSPECIFIED"
}
],
"node_config": [
{
"disk_size_gb": 100,
"disk_type": "pd-standard",
"guest_accelerator": [],
"image_type": "COS",
"labels": {},
"local_ssd_count": 0,
"machine_type": "n1-standard-2",
"metadata": {
"disable-legacy-endpoints": "true"
},
"min_cpu_platform": "",
"oauth_scopes": [
"https://www.googleapis.com/auth/logging.write",
"https://www.googleapis.com/auth/monitoring"
],
"preemptible": true,
"sandbox_config": [],
"service_account": "default",
"shielded_instance_config": [
{
"enable_integrity_monitoring": true,
"enable_secure_boot": false
}
],
"tags": [],
"taint": [],
"workload_metadata_config": []
}
],
"node_locations": [
"us-central1-a",
"us-central1-b",
Expand All @@ -181,37 +110,6 @@
"max_pods_per_node": 0,
"name": "primary-node-pool",
"name_prefix": "",
"node_config": [
{
"disk_size_gb": 100,
"disk_type": "pd-standard",
"guest_accelerator": [],
"image_type": "COS",
"labels": {},
"local_ssd_count": 0,
"machine_type": "n1-standard-2",
"metadata": {
"disable-legacy-endpoints": "true"
},
"min_cpu_platform": "",
"oauth_scopes": [
"https://www.googleapis.com/auth/logging.write",
"https://www.googleapis.com/auth/monitoring"
],
"preemptible": true,
"sandbox_config": [],
"service_account": "default",
"shielded_instance_config": [
{
"enable_integrity_monitoring": true,
"enable_secure_boot": false
}
],
"tags": [],
"taint": [],
"workload_metadata_config": []
}
],
"node_count": 1,
"version": "1.14.10-gke.17"
}
Expand Down Expand Up @@ -262,37 +160,6 @@
"max_pods_per_node": null,
"name": "primary-node-pool",
"name_prefix": "",
"node_config": [
{
"disk_size_gb": 100,
"disk_type": "pd-standard",
"guest_accelerator": [],
"image_type": "COS",
"labels": {},
"local_ssd_count": 0,
"machine_type": "n1-standard-2",
"metadata": {
"disable-legacy-endpoints": "true"
},
"min_cpu_platform": "",
"oauth_scopes": [
"https://www.googleapis.com/auth/logging.write",
"https://www.googleapis.com/auth/monitoring"
],
"preemptible": true,
"sandbox_config": [],
"service_account": "default",
"shielded_instance_config": [
{
"enable_integrity_monitoring": true,
"enable_secure_boot": false
}
],
"tags": [],
"taint": [],
"workload_metadata_config": []
}
],
"node_count": 1,
"project": "project-foo",
"region": null,
Expand Down Expand Up @@ -352,7 +219,6 @@
"reuse_values": false,
"set": [],
"set_sensitive": [],
"set_string": [],
"skip_crds": false,
"status": "deployed",
"timeout": 300,
Expand Down Expand Up @@ -424,7 +290,6 @@
}
],
"set_sensitive": [],
"set_string": [],
"skip_crds": false,
"status": "deployed",
"timeout": 300,
Expand Down Expand Up @@ -498,7 +363,6 @@
}
],
"set_sensitive": [],
"set_string": [],
"skip_crds": false,
"status": "deployed",
"timeout": 300,
Expand Down Expand Up @@ -565,7 +429,6 @@
}
],
"set_sensitive": [],
"set_string": [],
"skip_crds": false,
"status": "deployed",
"timeout": 300,
Expand Down Expand Up @@ -626,7 +489,6 @@
"reuse_values": false,
"set": [],
"set_sensitive": [],
"set_string": [],
"skip_crds": false,
"status": "deployed",
"timeout": 300,
Expand Down

0 comments on commit 105761d

Please sign in to comment.